# HG changeset patch # User Stefan Vogel # Date 1450188247 -3600 # Node ID e92c9691ef33b7dfbf50a7be82df84050de1505f # Parent ef343ef8ebad1696326c4507fb680273c6264ef7 #OTHER class: Tools::InternationalLanguageTranslationEditor changed: #extractTranslationsFromClass: #extractTranslationsFromMenuSpecMethod: Do not translte subMenu labels diff -r ef343ef8ebad -r e92c9691ef33 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 !