#OTHER expecco_2_8_0 expecco_2_8_0a expecco_2_8_0b
authorStefan Vogel <sv@exept.de>
Tue, 15 Dec 2015 15:04:07 +0100
changeset 3248 e92c9691ef33
parent 3247 ef343ef8ebad
child 3249 a322cc9c9193
#OTHER class: Tools::InternationalLanguageTranslationEditor changed: #extractTranslationsFromClass: #extractTranslationsFromMenuSpecMethod: Do not translte subMenu labels
Tools__InternationalLanguageTranslationEditor.st
--- a/Tools__InternationalLanguageTranslationEditor.st	Mon Dec 14 22:11:05 2015 +0100
+++ b/Tools__InternationalLanguageTranslationEditor.st	Tue Dec 15 15:04:07 2015 +0100
@@ -2151,12 +2151,15 @@
     newTranslations := Set new.
 
     self withWaitCursorDo:[
-	"/ now, the hard part:
-	"/ possible translations are in the specs,
-	"/ and all arguments to (resources string:) messages.
-	aClass instAndClassMethodsDo:[:eachMethod |
-	    newTranslations addAll:( self extractTranslationsFromMethod:eachMethod ).
-	].
+        "/ now, the hard part:
+        "/ possible translations are in the specs,
+        "/ and all arguments to (resources string:) messages.
+        aClass instAndClassMethodsDo:[:eachMethod |
+            newTranslations addAll:( self extractTranslationsFromMethod:eachMethod ).
+        ].
+    ].
+    newTranslations := newTranslations select:[:eachTranslation|
+        (aClass resources at:eachTranslation ifAbsent:nil) isNil
     ].
     ^ newTranslations
 !
@@ -2225,16 +2228,16 @@
     menu isNil ifTrue:[ ^ #() ].
 
     (menu isKindOf:Menu) ifFalse:[
-	menu := Menu new fromLiteralArrayEncoding:menu
+        menu := Menu new fromLiteralArrayEncoding:menu
     ].
 
     resourceKeys := Set new.
     menu allItemsDo:[:aMenuItem |
-	aMenuItem translateLabel ifTrue:[
-	    aMenuItem isSeparatorItem ifFalse:[
-		resourceKeys add:aMenuItem label.
-	    ]
-	]
+        aMenuItem translateLabel ifTrue:[
+            (aMenuItem isSeparatorItem or:[aMenuItem isMenuSlice])  ifFalse:[
+                resourceKeys add:aMenuItem label.
+            ]
+        ]
     ].
     ^ resourceKeys
 !