Levente Uzonyi uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-ul.153.mcz
==================== Summary ====================
Name: Multilingual-ul.153 Author: ul Time: 17 July 2011, 7:42:44.653 pm UUID: e3f7831d-792b-6241-8fe2-1f4b375edc10 Ancestors: Multilingual-ul.152
Use #allSelectorsAndMethodsDo: instead of #allSelect:. Avoid duplication of #numberOfTimesStringIsUsed:. Don't flush the Transcript so eagerly.
=============== Diff against Multilingual-ul.152 ===============
Item was changed: ----- Method: LanguageEditor>>identifyUnusedStrings (in category 'stef') ----- identifyUnusedStrings + "(self on: 'en') identifyUnusedStrings" + + translationsList getList do: [ :each | + Transcript + nextPutAll: each; + show: (self numberOfTimesStringIsUsed: each); + cr ]! - "self new identifyUnusedStrings" - translationsList getList - do: [:each | - Transcript show: each. - Transcript show: (Smalltalk - allSelect: [:method | method - hasLiteralSuchThat: [:lit | lit isString - and: [lit includesSubstring: each caseSensitive: true]]]) size printString; cr]!
Item was changed: ----- Method: LanguageEditor>>numberOfTimesStringIsUsed: (in category 'stef') ----- numberOfTimesStringIsUsed: aString
+ | count | + count := 0. + self systemNavigation allSelectorsAndMethodsDo: [ :behavior :selector :method | + (method hasLiteralSuchThat: [:lit | + lit isString and: [lit includesSubstring: aString caseSensitive: true] ]) ifTrue: [ + count := count + 1 ] ]. + ^count! - ^ (self systemNavigation allSelect: [:method | method - hasLiteralSuchThat: [:lit | lit isString - and: [lit includesSubstring: aString caseSensitive: true]]]) size!
Item was changed: ----- Method: LanguageEditor>>removeTranslatedButUnusedStrings (in category 'stef') ----- removeTranslatedButUnusedStrings + (self confirm: 'Are you sure that you want to remove unused strings?' translated) ifFalse: [^ self]. translationsList getList do: [:each | | timesUsed | timesUsed := self numberOfTimesStringIsUsed: each. + Transcript + nextPutAll: each; + show: timesUsed; + cr. - Transcript show: each. - Transcript show: timesUsed printString; - cr. timesUsed isZero ifTrue: [self translator removeTranslationFor: each]]!
Item was changed: ----- Method: LanguageEditor>>removeUntranslatedButUnusedStrings (in category 'stef') ----- removeUntranslatedButUnusedStrings + (self confirm: 'Are you sure that you want to remove unused strings?' translated) ifFalse: [^ self]. untranslatedList getList do: [:each | | timesUsed | timesUsed := self numberOfTimesStringIsUsed: each. + Transcript + nextPutAll: each; + show: timesUsed; - Transcript show: each. - Transcript show: timesUsed printString; cr. timesUsed isZero ifTrue: [self translator removeUntranslated: each]].
self update: #untranslated. !
packages@lists.squeakfoundation.org