ResourcePack.st
changeset 4035 a785efbbc5c9
parent 4030 34cdc7a25687
child 4036 4978ac9fbe27
--- a/ResourcePack.st	Tue Feb 24 13:26:57 2004 +0100
+++ b/ResourcePack.st	Tue Feb 24 14:52:55 2004 +0100
@@ -356,7 +356,22 @@
 !
 
 at:aKey ifAbsent:defaultValue
-    "translate a string"
+    "translate a string.
+     Some special 'intelligence' has been added:
+        if no value for aKey is found,
+        and aKey ends with a ':', then lookup aKey without ':' and append ':' to the result.
+        or aKey ends with a '=', then lookup aKey without '=' and append '=' to the result.
+        or aKey ends with a ' ', then lookup aKey without ' '.
+        or aKey ends with a ' ...', then lookup aKey without ' ...' and append '...' to the result.
+        or aKey ends with a '...', then lookup aKey without '...' and append '...' to the result.
+        or aKey includes '&', then lookup aKey without '&'.
+
+     This means, that only a single translation is required to provide local translations for
+     things like 
+        'search'
+        'search:'
+        'search...'
+    "
 
     |val alternativeKey rest usedKey idx|
 
@@ -939,7 +954,7 @@
 !ResourcePack class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.87 2004-02-22 15:40:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.88 2004-02-24 13:52:55 cg Exp $'
 ! !
 
 ResourcePack initialize!