*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 06 Mar 2006 20:25:39 +0100
changeset 2034 23d558e4d32e
parent 2033 2c1264ae2c1c
child 2035 ea8ec7c3fbeb
*** empty log message ***
Tools__InternationalLanguageTranslationEditor.st
--- a/Tools__InternationalLanguageTranslationEditor.st	Mon Mar 06 20:09:43 2006 +0100
+++ b/Tools__InternationalLanguageTranslationEditor.st	Mon Mar 06 20:25:39 2006 +0100
@@ -880,13 +880,29 @@
 !InternationalLanguageTranslationEditor methodsFor:'private-key extraction'!
 
 addAllTranslations:newTranslations
-    |newTranslationKeys|
+    |newTranslationKeys stringKeys nonStringKeys|
 
-    newTranslationKeys := newTranslations select:[:k | k notEmpty and:[k isBlank not]].
+    newTranslationKeys := newTranslations select:[:k | k notEmpty and:[k isString not or:[k isBlank not]]].
     newTranslationKeys := newTranslationKeys select:[:k | (keyStringsToLanguageMappings includesKey:k) not].
+    newTranslationKeys := newTranslationKeys 
+                                collect:[:k | 
+                                        (k endsWith:'...') ifTrue:[
+                                            k copyWithoutLast:3.
+                                        ] ifFalse:[
+                                            ('.:' includes:k last) ifTrue:[
+                                                k copyWithoutLast:1.
+                                            ] ifFalse:[
+                                                k
+                                        ]]].
+    newTranslationKeys := newTranslationKeys asSet.
+
     newTranslationKeys notEmpty ifTrue:[
-        newTranslationKeys := newTranslationKeys asSortedCollection.
-        keyStringsToLanguageMappings addKeys:newTranslationKeys.
+        stringKeys := newTranslationKeys select:[:k | k isString].
+        nonStringKeys := newTranslationKeys select:[:k | k isString not].
+
+        stringKeys := stringKeys asSortedCollection.
+        keyStringsToLanguageMappings addKeys:stringKeys.
+        keyStringsToLanguageMappings addKeys:nonStringKeys.
         modified := true.
     ].
 !