#OTHER
class: Tools::InternationalLanguageTranslationEditor
changed:
#extractTranslationsFromClass:
#extractTranslationsFromMenuSpecMethod:
Do not translte subMenu labels
--- 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
!