[Pkg] The Trunk: Multilingual-edc.155.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 14 09:44:50 UTC 2012


Edgar J. De Cleene uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-edc.155.mcz

==================== Summary ====================

Name: Multilingual-edc.155
Author: edc
Time: 14 March 2012, 6:45:23.572 am
UUID: 848a0ddb-ae7a-4945-87ec-2e7490d20db2
Ancestors: Multilingual-ul.154

Changes for include GetText in trunk

=============== Diff against Multilingual-ul.154 ===============

Item was removed:
- SystemWindow subclass: #LanguageEditor
- 	instanceVariableNames: 'translator selectedTranslation selectedTranslations selectedUntranslated translationsList untranslatedList translationText translationsFilter untranslatedFilter newerKeys'
- 	classVariableNames: 'CheckMethods'
- 	poolDictionaries: ''
- 	category: 'Multilingual-Editor'!
- 
- !LanguageEditor commentStamp: 'dgd 11/16/2003 15:02' prior: 0!
- Editor for Babel's languages.
- 
- Open it from
- 
- 	World Menu >> open... >> Language Editor			(to open on default language)
- 	World Menu >> open... >> Language Editor for...	(to choose the language)
- 
- Or click:
- 
- 	LanguageEditor openOnDefault.
- 	LanguageEditor open.
- 
- See http://swiki.agro.uba.ar/small_land/191 for documentation
- !

Item was removed:
- ----- Method: LanguageEditor class>>checkMethods (in category 'private') -----
- checkMethods
- 	^CheckMethods ifNil: [CheckMethods := self initCheckMethods]!

Item was removed:
- ----- Method: LanguageEditor class>>ensureVisibilityOfWindow: (in category 'private') -----
- ensureVisibilityOfWindow: aWindow 
- 	"private - activate the window"
- 	| |
- 	aWindow expand.
- 	aWindow comeToFront.
- 	""
- 	aWindow
- 		right: (aWindow right min: World right).
- 	aWindow
- 		bottom: (aWindow bottom min: World bottom).
- 	aWindow
- 		left: (aWindow left max: World left).
- 	aWindow
- 		top: (aWindow top max: World top).
- 	""
- 	aWindow flash; flash!

Item was removed:
- ----- Method: LanguageEditor class>>initCheckMethods (in category 'initialize-release') -----
- initCheckMethods
- 	"LanguageEditor initCheckMethods"
- 
- 	| registry |
- 	registry := Dictionary new
- 		at: 'es' put: #checkSpanishPhrase:translation:;
- 		yourself.
- 	^registry!

Item was removed:
- ----- Method: LanguageEditor class>>initialize (in category 'initialize-release') -----
- initialize
- 	"initialize the receiver"
- 	(TheWorldMenu respondsTo: #registerOpenCommand:)
- 		ifTrue: [""
- 			TheWorldMenu registerOpenCommand: {'Language Editor'. {self. #openOnDefault}}.
- 			TheWorldMenu registerOpenCommand: {'Language Editor for...'. {self. #open}}]!

Item was removed:
- ----- Method: LanguageEditor class>>on: (in category 'instance creation') -----
- on: aLanguage
- 	"answer an instance of the receiver on aLanguage"
- 	^ self new initializeOn: (NaturalLanguageTranslator localeID: aLanguage)!

Item was removed:
- ----- Method: LanguageEditor class>>open (in category 'opening') -----
- open
- 	"open the receiver on any language"
- 	" 
- 	LanguageEditor open. 
- 	"
- 	| menu |
- 	menu := MenuMorph new defaultTarget: self.
- 	menu addTitle: 'Language Editor for...' translated.
- 	""
- 	(NaturalLanguageTranslator availableLanguageLocaleIDs
- 		asSortedCollection: [:x :y | x asString <= y asString])
- 		do: [:eachLanguage | ""
- 			menu
- 				add: eachLanguage name
- 				target: self
- 				selector: #openOn:
- 				argument: eachLanguage].
- 	""
- 	menu popUpInWorld!

Item was removed:
- ----- Method: LanguageEditor class>>openOn: (in category 'instance creation') -----
- openOn: aLanguage 
- 	"open an instance on aLanguage"
- 	World submorphs
- 		do: [:each | ""
- 			((each isKindOf: LanguageEditor)
- 					and: [each translator == aLanguage])
- 				ifTrue: [""
- 					self ensureVisibilityOfWindow: each.
- 					^ self]].
- 	""
- 	^ (self on: aLanguage) openInWorld!

Item was removed:
- ----- Method: LanguageEditor class>>openOnDefault (in category 'opening') -----
- openOnDefault
- 	"open the receiver on the default language"
- 	self openOn: LocaleID current!

Item was removed:
- ----- Method: LanguageEditor class>>unload (in category 'initialize-release') -----
- unload
- 	"the receiver is being unloaded"
- 	(TheWorldMenu respondsTo: #registerOpenCommand:)
- 		ifTrue: [""
- 			TheWorldMenu unregisterOpenCommand: 'Language Editor'.
- 			TheWorldMenu unregisterOpenCommand: 'Language Editor for...'] !

Item was removed:
- ----- Method: LanguageEditor>>addTranslation (in category 'gui methods') -----
- addTranslation
- 	"translate a phrase"
- 	| phrase |
- 	phrase := UIManager default
- 				request: 'enter the original:'
- 				initialAnswer: ''.
- 
- 	(phrase isNil
- 			or: [phrase = ''])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self translatePhrase: phrase!

Item was removed:
- ----- Method: LanguageEditor>>applyTranslations (in category 'gui methods') -----
- applyTranslations
- 	"private - try to apply the translations as much as possible all  
- 	over the image"
- 	Project current updateLocaleDependents!

Item was removed:
- ----- Method: LanguageEditor>>asHtml: (in category 'reporting') -----
- asHtml: aString 
- 	| stream |
- 	stream := String new writeStream.
- 
- 	aString
- 		do: [:each | 
- 			each caseOf: {
- 				[Character cr] -> [stream nextPutAll: '<br>'].
- 				[$&] -> [stream nextPutAll: '&amp;'].
- 				[$<] -> [stream nextPutAll: '&lt;'].
- 				[$>] -> [stream nextPutAll: '&gt;'].
- 				[$*] -> [stream nextPutAll: '&star;'].
- 				[$@] -> [stream nextPutAll: '&at;']}
- 				 otherwise: [stream nextPut: each]].
- 
- 	^ stream contents!

Item was removed:
- ----- Method: LanguageEditor>>browseMethodsWithTranslation (in category 'gui methods') -----
- browseMethodsWithTranslation
- 	| translation |
- 	self selectedTranslation isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			self inform: 'select the translation to look for' translated.
- 			^ self].
- 	""
- 	translation := self translations at: self selectedTranslation.
- 	self systemNavigation browseMethodsWithLiteral: translation!

Item was removed:
- ----- Method: LanguageEditor>>browseMethodsWithUntranslated (in category 'gui methods') -----
- browseMethodsWithUntranslated
- 	| untranslated |
- 	self selectedUntranslated isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			self inform: 'select the untranslated phrase to look for' translated.
- 			^ self].
- 	""
- 	untranslated := self untranslated at: self selectedUntranslated.
- 	SystemNavigation default browseMethodsWithLiteral: untranslated.
- !

Item was removed:
- ----- Method: LanguageEditor>>check (in category 'private') -----
- check
- 	"check the translations and answer a collection with the results"
- 	| results counter phrasesCount  untranslated translations checkMethod |
- 	results := OrderedCollection new.
- 	untranslated := self translator untranslated.
- 	translations := self translator translations.
- 	phrasesCount := translations size + untranslated size.
- 	counter := 0.
- 	checkMethod := self class checkMethods at: self translator localeID printString ifAbsent: [^results].
- 	
- 	translations
- 		keysAndValuesDo: [:phrase :translation | 
- 			| result | 
- 			result := self perform: checkMethod with: phrase with: translation.
- 			(result notNil
- 					and: [result notEmpty])
- 				ifTrue: [results add: {phrase. translation. result}].
- 		
- 			counter := counter + 1.
- 			(counter isDivisibleBy: 50)
- 				ifTrue: [| percent | 
- 					percent := counter / phrasesCount * 100 roundTo: 0.01.
- 					Transcript
- 						show: ('- checked {1} phrases of {2} ({3}%)...' translated format: {counter. phrasesCount. percent});
- 						 cr]].
- 
- 	untranslated
- 		do: [:phrase | 
- 			| result | 
- 			result := self checkUntranslatedPhrase: phrase.
- 			(result notNil
- 					and: [result notEmpty])
- 				ifTrue: [results add: {phrase. nil. result}].
- 		
- 			counter := counter + 1.
- 			(counter isDivisibleBy: 50)
- 				ifTrue: [| percent | 
- 					percent := counter / phrasesCount * 100 roundTo: 0.01.
- 					Transcript
- 						show: ('- checked {1} phrases of {2} ({3}%)...' translated format: {counter. phrasesCount. percent});
- 						 cr]].
- 
- 	^ results!

Item was removed:
- ----- Method: LanguageEditor>>checkPhrase:translation: (in category 'private') -----
- checkPhrase: phraseString translation: translationString
- 	^nil!

Item was removed:
- ----- Method: LanguageEditor>>checkSpanishPhrase:translation: (in category 'private') -----
- checkSpanishPhrase: phraseString translation: translationString 
- 	"check the translation an aswer a string with a comment or a  
- 	nil meaning no-comments"
- 	| superResult |
- 	superResult := self checkPhrase: phraseString translation: translationString.
- 
- 	superResult isNil
- 		ifFalse: [^ superResult].
- "For some reason, MCInstaller couldn't read Spanish character."
- "	((translationString withBlanksTrimmed includes: $?)
- 			and: [(translationString withBlanksTrimmed includes: $é…) not])
- 		ifTrue: [^ 'é…OlvidƧ el signo de pregunta?'].
- 	((translationString withBlanksTrimmed includes: $!!)
- 			and: [(translationString withBlanksTrimmed includes: $éÄ) not])
- 		ifTrue: [^ 'é…OlvidƧ el signo de admiraciƧn?'].
- "
- 	^ nil!

Item was removed:
- ----- Method: LanguageEditor>>checkUntranslatedPhrase: (in category 'private') -----
- checkUntranslatedPhrase: phraseString 
- 	"check the phrase an aswer a string with a comment or a nil  
- 	meaning no-comments"
- 
- 	(self translations includes: phraseString)
- 		ifTrue: [^ 'possible double-translation' translated].
- 
- 	^ nil!

Item was removed:
- ----- Method: LanguageEditor>>codeSelectedTranslation (in category 'gui methods') -----
- codeSelectedTranslation
- 	| keys code |
- 	keys := selectedTranslations
- 				collect: [:key | self translations at: key].
- 	code := String
- 				streamContents: [:aStream | self translator fileOutOn: aStream keys: keys].
- 	(StringHolder new contents: code)
- 		openLabel: 'exported codes'!

Item was removed:
- ----- Method: LanguageEditor>>codeSelectedTranslationAsMimeString (in category 'gui methods') -----
- codeSelectedTranslationAsMimeString
- 	| keys code tmpStream s2 gzs cont |
- 	keys := selectedTranslations
- 				collect: [:key | self translations at: key].
- 	code := String
- 				streamContents: [:aStream | self translator fileOutOn: aStream keys: keys].
- 
- 	tmpStream := MultiByteBinaryOrTextStream on: ''.
- 	tmpStream converter: UTF8TextConverter new.
- 	translator fileOutHeaderOn: tmpStream.
- 	tmpStream nextPutAll: code.
- 	s2 := RWBinaryOrTextStream on: ''.
- 	gzs := GZipWriteStream on: s2.
- 	tmpStream reset.
- 	gzs nextPutAll: (tmpStream binary contentsOfEntireFile asString) contents.
- 	gzs close.
- 	s2 reset.
- 
- 	cont := String streamContents: [:strm |
- 		strm nextPutAll: '"Gzip+Base64 encoded translation for;'; cr.
- 		strm nextPutAll: '#('.
- 		keys do: [:each | strm  nextPutAll: '''', each, ''' '.].
- 		strm nextPutAll: ')"'; cr; cr.
- 		strm nextPutAll: 'NaturalLanguageTranslator loadForLocaleIsoString: '.
- 		strm nextPut: $'.
- 		strm nextPutAll: translator localeID isoString.
- 		strm nextPut: $'.
- 		strm nextPutAll: ' fromGzippedMimeLiteral: '.
- 		strm nextPut: $'.
- 		strm nextPutAll: (Base64MimeConverter mimeEncode: s2) contents.
- 		strm nextPutAll: '''.'.
- 		strm cr.
- 	].
- 	
- 	(StringHolder new contents: cont)
- 		openLabel: 'exported codes in Gzip+Base64 encoding'!

Item was removed:
- ----- Method: LanguageEditor>>createButtonLabel:action:help: (in category 'initialization - toolbar') -----
- createButtonLabel: aString action: actionSelector help: helpString 
- 	"create a toolbar for the receiver"
- 	| button |
- 	button := SimpleButtonMorph new target: self;
- 				 label: aString translated "font: Preferences standardButtonFont";
- 				 actionSelector: actionSelector;
- 				 setBalloonText: helpString translated;
- 				 color: translator defaultBackgroundColor twiceDarker;
- 				 borderWidth: 2;
- 				 borderColor: #raised.
- 	""
- 	^ button!

Item was removed:
- ----- Method: LanguageEditor>>createMainToolbar (in category 'initialization - toolbar') -----
- createMainToolbar
- 	"create a toolbar for the receiver"
- 	| toolbar |
- 	toolbar := self createRow.
- 	""
- "	toolbar
- 		addMorphBack: (self
- 				createUpdatingButtonWording: #debugWording
- 				action: #switchDebug
- 				help: 'Switch the debug flag')."
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	""
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'save'
- 				action: #saveToFile
- 				help: 'Save the translations to a file').
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'load'
- 				action: #loadFromFile
- 				help: 'Load the translations from a file').
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'merge'
- 				action: #mergeFromFile
- 				help: 'Merge the current translations with the translations in a file').
- 	""
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'apply'
- 				action: #applyTranslations
- 				help: 'Apply the translations as much as possible.').
- 	""
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'check translations'
- 				action: #check
- 				help: 'Check the translations and report the results.').
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'report'
- 				action: #report
- 				help: 'Create a report.').
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'gettext export'
- 				action: #getTextExport
- 				help: 'Exports the translations in GetText format.').
- 	""
- 	^ toolbar!

Item was removed:
- ----- Method: LanguageEditor>>createRow (in category 'initialization - toolbar') -----
- createRow
- 	"create a row"
- 	| row |
- 	row := AlignmentMorph newRow.
- 	row layoutInset: 3;
- 		 wrapCentering: #center;
- 		 cellPositioning: #leftCenter.
- 	""
- 	^ row!

Item was removed:
- ----- Method: LanguageEditor>>createStatusbar (in category 'initialization - statusbar') -----
- createStatusbar
- 	"create the statusbar for the receiver"
- 	| statusbar |
- 	statusbar := self createRow.
- 	statusbar addMorph: ((UpdatingStringMorph on: self selector: #status) growable: true;
- 			 useStringFormat;
- 			 hResizing: #spaceFill;
- 			 stepTime: 2000).
- 	^ statusbar!

Item was removed:
- ----- Method: LanguageEditor>>createTranslationsToolbar (in category 'initialization - toolbar') -----
- createTranslationsToolbar
- 	"create a toolbar for the receiver"
- 	| toolbar |
- 	toolbar := self createRow.
- 	""
- 	toolbar
- 		addMorphBack: (self
- 				createUpdatingButtonWording: #translationsFilterWording
- 				action: #filterTranslations
- 				help: 'Filter the translations list.').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	""
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'search'
- 				action: #searchTranslation
- 				help: 'Search for a translation containing...').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'remove'
- 				action: #removeTranslation
- 				help: 'Remove the selected translation.  If none is selected, ask for the one to remove.').
- 	""
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'where'
- 				action: #browseMethodsWithTranslation
- 				help: 'Launch a browser on all methods that contain the phrase as a substring of any literal String.').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'r-unused'
- 				action: #removeTranslatedButUnusedStrings
- 				help: 'Remove all the strings that are not used by the system').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'add '
- 				action: #addTranslation
- 				help: 'Add a new phrase').
- 
- 	^ toolbar!

Item was removed:
- ----- Method: LanguageEditor>>createUntranslatedToolbar (in category 'initialization - toolbar') -----
- createUntranslatedToolbar
- 	"create a toolbar for the receiver"
- 	| toolbar |
- 	toolbar := self createRow.
- 	""
- 	toolbar
- 		addMorphBack: (self
- 				createUpdatingButtonWording: #untranslatedFilterWording
- 				action: #filterUntranslated
- 				help: 'Filter the untranslated list.').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	""
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'search'
- 				action: #searchUntranslated
- 				help: 'Search for a untranslated phrase containing...').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'remove'
- 				action: #removeUntranslated
- 				help: 'Remove the selected untranslated phrease.  If none is selected, ask for the one to remove.').
- 	""
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'translate'
- 				action: #translate
- 				help: 'Translate the selected untranslated phrase or a new phrase').
- 	""
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'where'
- 				action: #browseMethodsWithUntranslated
- 				help: 'Launch a browser on all methods that contain the phrase as a substring of any literal String.').
- 	toolbar addTransparentSpacerOfSize: 5 @ 0.
- 	toolbar
- 		addMorphBack: (self
- 				createButtonLabel: 'r-unused'
- 				action: #removeUntranslatedButUnusedStrings
- 				help: 'Remove all the strings that are not used by the system').
- 	^ toolbar!

Item was removed:
- ----- Method: LanguageEditor>>createUpdatingButtonWording:action:help: (in category 'initialization - toolbar') -----
- createUpdatingButtonWording: wordingSelector action: actionSelector help: helpString 
- 	"create a toolbar for the receiver"
- 	| button |
- 	button := (UpdatingSimpleButtonMorph newWithLabel: '-') target: self;
- 				 wordingSelector: wordingSelector;
- 				 actionSelector: actionSelector;
- 				 setBalloonText: helpString translated;
- 				 color: translator defaultBackgroundColor twiceDarker;
- 				 borderWidth: 1;
- 				 borderColor: #raised; cornerStyle: #square.
- 	""
- 	^ button!

Item was removed:
- ----- Method: LanguageEditor>>delete (in category 'open/close') -----
- delete
- 	"Remove the receiver as a submorph of its owner"
- 	self model: nil.
- 	super delete !

Item was removed:
- ----- Method: LanguageEditor>>deselectAllTranslation (in category 'gui methods') -----
- deselectAllTranslation
- 	selectedTranslations := IdentitySet new.
- 	self changed: #allSelections!

Item was removed:
- ----- Method: LanguageEditor>>filterTranslations (in category 'gui methods') -----
- filterTranslations
- 	| filter |
- 	filter := UIManager default request: 'filter with
- (empty string means no-filtering)' translated initialAnswer: self translationsFilter.
- 	""
- 	self filterTranslations: filter!

Item was removed:
- ----- Method: LanguageEditor>>filterTranslations: (in category 'gui methods') -----
- filterTranslations: aString 
- | filter |
- filter := aString ifNil:[''].
- ""
- 	translationsFilter := filter.
- self update: #translations.
- !

Item was removed:
- ----- Method: LanguageEditor>>filterUntranslated (in category 'gui methods') -----
- filterUntranslated
- 	| filter |
- 	filter := UIManager default request: 'filter with
- (empty string means no-filtering)' translated initialAnswer: self untranslatedFilter.
- 	""
- 	self filterUntranslated: filter!

Item was removed:
- ----- Method: LanguageEditor>>filterUntranslated: (in category 'gui methods') -----
- filterUntranslated: aString 
- 	| filter |
- 	filter := aString
- 				ifNil: [''].
- 	""
- 	untranslatedFilter := filter.
- 	self update: #untranslated!

Item was removed:
- ----- Method: LanguageEditor>>getTextExport (in category 'gui methods') -----
- getTextExport
- 	(Smalltalk at: #GetTextExporter) new export: self model!

Item was removed:
- ----- Method: LanguageEditor>>identifyUnusedStrings (in category 'stef') -----
- identifyUnusedStrings
- 	"(self on: 'en') identifyUnusedStrings"
- 	
- 	translationsList getList do: [ :each | 
- 		Transcript 
- 			nextPutAll: each;
- 			show: (self numberOfTimesStringIsUsed: each);
- 			cr ]!

Item was removed:
- ----- Method: LanguageEditor>>initializeNewerKeys (in category 'initialization') -----
- initializeNewerKeys
- 
- 	newerKeys := Set new.
- !

Item was removed:
- ----- Method: LanguageEditor>>initializeOn: (in category 'initialization') -----
- initializeOn: aLanguage 
- 	"initialize the receiver on aLanguage"
- 	""
- 	selectedTranslation := 0.
- 	selectedUntranslated := 0.
- 	selectedTranslations := IdentitySet new.
- 	""
- 	translator := aLanguage.
- 	""
- 	self setLabel: 'Language editor for: ' translated , self translator name.
- 	""
- 	self initializeToolbars.
- 	self initializePanels.
- 	self initializeStatusbar.
- 	self initializeNewerKeys.
- !

Item was removed:
- ----- Method: LanguageEditor>>initializePanels (in category 'initialization') -----
- initializePanels
- 	"initialize the receiver's panels"
- 	translationsList := PluggableListMorphOfMany
- 				on: self
- 				list: #translations
- 				primarySelection: #selectedTranslation
- 				changePrimarySelection: #selectedTranslation:
- 				listSelection: #selectedTranslationsAt:
- 				changeListSelection: #selectedTranslationsAt:put:
- 				menu: #translationsMenu:
- 				keystroke: #translationsKeystroke:.
- 	translationsList setBalloonText: 'List of all the translated phrases.' translated.
- 	""
- 	untranslatedList := PluggableListMorph
- 				on: self
- 				list: #untranslated
- 				selected: #selectedUntranslated
- 				changeSelected: #selectedUntranslated:
- 				menu: #untranslatedMenu:
- 				keystroke: #untranslatedKeystroke:.
- 	untranslatedList setBalloonText: 'List of all the untranslated phrases.' translated.
- 	""
- 	translationText := PluggableTextMorph
- 				on: self
- 				text: #translation
- 				accept: #translation:
- 				readSelection: nil
- 				menu: nil.
- 	translationText setBalloonText: 'Translation for the selected phrase in the upper list.' translated.
- 	""
- 	self
- 		addMorph: translationsList
- 		frame: (0 @ 0.18 corner: 0.5 @ 0.66).
- 	self
- 		addMorph: untranslatedList
- 		frame: (0.5 @ 0.18 corner: 1 @ 0.93).
- 	self
- 		addMorph: translationText
- 		frame: (0 @ 0.66 corner: 0.5 @ 0.93)!

Item was removed:
- ----- Method: LanguageEditor>>initializeStatusbar (in category 'initialization - statusbar') -----
- initializeStatusbar
- 	"initialize the receiver's statusbar"
- 	self
- 		addMorph: self createStatusbar
- 		frame: (0 @ 0.93 corner: 1 @ 1)!

Item was removed:
- ----- Method: LanguageEditor>>initializeToolbars (in category 'initialization - toolbar') -----
- initializeToolbars
- 	"initialize the receiver's toolbar"
- 	self
- 		addMorph: self createMainToolbar
- 		frame: (0 @ 0 corner: 1 @ 0.09).
- 	""
- 	self
- 		addMorph: self createTranslationsToolbar
- 		frame: (0 @ 0.09 corner: 0.5 @ 0.18).
- 	self
- 		addMorph: self createUntranslatedToolbar
- 		frame: (0.5 @ 0.09 corner: 1 @ 0.18)!

Item was removed:
- ----- Method: LanguageEditor>>loadFromFile (in category 'gui methods') -----
- loadFromFile
- 	| fileName |
- 	fileName := self selectTranslationFileName.
- 	fileName isNil
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	Cursor wait
- 		showWhile: [
- 			self translator loadFromFileNamed: fileName.
- 			self changed: #translations.
- 			self changed: #untranslated]!

Item was removed:
- ----- Method: LanguageEditor>>mergeFromFile (in category 'gui methods') -----
- mergeFromFile
- 	| fileName |
- 	fileName := self selectTranslationFileName.
- 	fileName isNil
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	Cursor wait
- 		showWhile: [
- 			self translator loadFromFileNamed: fileName.
- 			self changed: #translations.
- 			self changed: #untranslated]!

Item was removed:
- ----- 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!

Item was removed:
- ----- Method: LanguageEditor>>okToChange (in category 'updating') -----
- okToChange
- 	"Allows a controller to ask this of any model"
- 	self selectedTranslation isZero ifTrue: [^ true].
- 	translationText hasUnacceptedEdits
- 		ifFalse: [^ true].
- 	^ (UIManager default 
- 		confirm: 'Discard the changes to currently selected translated phrase?' translated)
- 		and: [translationText hasUnacceptedEdits: false.
- 			true]!

Item was removed:
- ----- Method: LanguageEditor>>perform:orSendTo: (in category 'message handling') -----
- perform: selector orSendTo: otherTarget 
- 	"I wish to intercept and handle selector myself"
- 	^ self perform: selector!

Item was removed:
- ----- Method: LanguageEditor>>phrase:translation: (in category 'gui methods') -----
- phrase: phraseString translation: translationString 
- 	"set the models's translation for phraseString"
- 	self translator phrase: phraseString translation: translationString.
- 	self changed: #translations.
- 	self changed: #untranslated.
- 
- 	newerKeys add: phraseString.
- !

Item was removed:
- ----- Method: LanguageEditor>>phraseToTranslate (in category 'gui methods') -----
- phraseToTranslate
- 	"answer a phrase to translate.  use the selected untranslated phrase or ask for a new one"
- 	^ self selectedUntranslated isZero
- 		ifTrue: [UIManager default
- 				multiLineRequest: 'new phrase to translate' translated
- 				centerAt: Sensor cursorPoint
- 				initialAnswer: ''
- 				answerHeight: 200]
- 		ifFalse: [self untranslated at: self selectedUntranslated]!

Item was removed:
- ----- Method: LanguageEditor>>printHeaderReportOn: (in category 'reporting') -----
- printHeaderReportOn: aStream 
- 	"append to aStream a header report of the receiver with swiki  
- 	format"
- 	aStream nextPutAll: '!!!!';
- 		
- 		nextPutAll: ('Language: {1}' translated format: {self translator localeID isoString});
- 		 cr.
- 
- 	aStream nextPutAll: '- ';
- 		
- 		nextPutAll: ('{1} translated phrases' translated format: {self translator translations size});
- 		 cr.
- 
- 	aStream nextPutAll: '- ';
- 		
- 		nextPutAll: ('{1} untranslated phrases' translated format: {self translator untranslated size});
- 		 cr.
- 
- 	aStream cr; cr!

Item was removed:
- ----- Method: LanguageEditor>>printReportOn: (in category 'reporting') -----
- printReportOn: aStream 
- 	"append to aStream a report of the receiver with swiki format"
- 	self printHeaderReportOn: aStream.
- 	self printUntranslatedReportOn: aStream.
- 	self printTranslationsReportOn: aStream!

Item was removed:
- ----- Method: LanguageEditor>>printTranslationsReportOn: (in category 'reporting') -----
- printTranslationsReportOn: aStream 
- 	"append to aStream a report of the receiver's translations"
- 	| originalPhrases |
- 	aStream nextPutAll: '!!';
- 		 nextPutAll: 'translations' translated;
- 		 cr.
- 
- 	originalPhrases := self translator translations keys asArray sort.
- 
- 	originalPhrases
- 		do: [:each | 
- 			aStream
- 				nextPutAll: ('|{1}|{2}|' format: {self asHtml: each. self
- 							asHtml: (self translator translationFor: each)});
- 				 cr].
- 
- 	aStream cr; cr!

Item was removed:
- ----- Method: LanguageEditor>>printUntranslatedReportOn: (in category 'reporting') -----
- printUntranslatedReportOn: aStream 
- 	"append to aStream a report of the receiver's translations"
- 	aStream nextPutAll: '!!';
- 		 nextPutAll: 'not translated' translated;
- 		 cr.
- 
- 	self untranslated asSortedCollection
- 		do: [:each | 
- 			aStream
- 				nextPutAll: ('|{1}|' format: {self asHtml: each});
- 				 cr].
- 
- 	aStream cr; cr!

Item was removed:
- ----- Method: LanguageEditor>>refreshTranslations (in category 'updating') -----
- refreshTranslations
- 	"refresh the translations panel"
- 	self changed: #translations.
- 	self selectedTranslation: 0!

Item was removed:
- ----- Method: LanguageEditor>>refreshUntranslated (in category 'updating') -----
- refreshUntranslated
- "refresh the untranslated panel"
- 	self changed: #untranslated.
- 	self selectedUntranslated: 0!

Item was removed:
- ----- 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.
- 			timesUsed isZero
- 				ifTrue: [self translator removeTranslationFor: each]]!

Item was removed:
- ----- Method: LanguageEditor>>removeTranslation (in category 'gui methods') -----
- removeTranslation
- 	"remove the selected translation"
- 	| translation |
- 	self selectedTranslation isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			self inform: 'select the translation to remove' translated.
- 			^ self].
- 	""
- 	translation := self translations at: self selectedTranslation.
- ""
- 	(self
- 			confirm: ('Removing "{1}".
- Are you sure you want to do this?' translated format: {translation}))
- 		ifFalse: [^ self].
- ""
- 	self translator removeTranslationFor: translation.
- 	self changed: #translations.
- 	self changed: #untranslated.!

Item was removed:
- ----- Method: LanguageEditor>>removeUntranslated (in category 'gui methods') -----
- removeUntranslated
- 	"remove the selected untranslated phrase"
- 	| untranslated |
- 	self selectedUntranslated isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			self inform: 'select the untranslated phrase to remove' translated.
- 			^ self].
- 	""
- 	untranslated := self untranslated at: self selectedUntranslated.
- 	""
- 	(self
- 			confirm: ('Removing "{1}".
- Are you sure you want to do this?' translated format: {untranslated}))
- 		ifFalse: [^ self].
- 	""
- 	self translator removeUntranslated: untranslated!

Item was removed:
- ----- 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;
- 				 cr.
- 			timesUsed isZero 
- 				ifTrue: [self translator removeUntranslated: each]].
- 
- 	self update: #untranslated.
- !

Item was removed:
- ----- Method: LanguageEditor>>report (in category 'gui methods') -----
- report
- 	self reportString openInWorkspaceWithTitle: 'report' translated!

Item was removed:
- ----- Method: LanguageEditor>>reportString (in category 'reporting') -----
- reportString
- 	"answer a string with a report of the receiver"
- 	| stream |
- 	stream := String new writeStream.
- 	self printReportOn: stream.
- 	^ stream contents!

Item was removed:
- ----- Method: LanguageEditor>>resetNewerKeys (in category 'gui methods') -----
- resetNewerKeys
- 
- 	self initializeNewerKeys.
- !

Item was removed:
- ----- Method: LanguageEditor>>saveToFile (in category 'gui methods') -----
- saveToFile
- 	"save the translator to a file"
- 	| fileName |
- 	fileName := UIManager default request: 'file name' translated initialAnswer: translator localeID isoString , '.translation'.
- 	(fileName isNil
- 			or: [fileName isEmpty])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- Cursor wait
- 		showWhile: [
- 	self translator saveToFileNamed: fileName]!

Item was removed:
- ----- Method: LanguageEditor>>searchTranslation (in category 'gui methods') -----
- searchTranslation
- 	| search |
- 	search := UIManager default request: 'search for' translated initialAnswer: ''.
- 	(search isNil
- 			or: [search isEmpty])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- ""
- self searchTranslation: search!

Item was removed:
- ----- Method: LanguageEditor>>searchTranslation: (in category 'gui methods') -----
- searchTranslation: aString 
- 	| translations results index |
- 	translations := self translations.
- 	results := translations
- 				select: [:each | ""
- 					('*' , aString , '*' match: each)
- 						or: ['*' , aString , '*' match: (self translator translationFor: each)]].
- 	""
- 	results isEmpty
- 		ifTrue: [""
- 			self inform: 'no matches for' translated , ' ''' , aString , ''''.
- 			^ self].
- 	""
- 	results size = 1
- 		ifTrue: [""
- 			self selectTranslationPhrase: results first.
- 			^ self].
- 	""
- 	index := (UIManager default 
- 				chooseFrom: (results
- 						collect: [:each | ""
- 							(each copy replaceAll: Character cr with: $\)
- 								, ' -> '
- 								, ((self translator translationFor: each) copy replaceAll: Character cr with: $\)])
- 				title: 'select the translation...' translated).
- 	""
- 	index isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self
- 		selectTranslationPhrase: (results at: index)!

Item was removed:
- ----- Method: LanguageEditor>>searchUntranslated (in category 'gui methods') -----
- searchUntranslated
- 	| search |
- 	search := UIManager default request: 'search for' translated initialAnswer: ''.
- 	(search isNil
- 			or: [search isEmpty])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self searchUntranslated: search!

Item was removed:
- ----- Method: LanguageEditor>>searchUntranslated: (in category 'gui methods') -----
- searchUntranslated: aString 
- 	| untranslateds results index |
- 	untranslateds := self untranslated.
- 	results := untranslateds
- 				select: [:each | '*' , aString , '*' match: each].
- 	""
- 	results isEmpty
- 		ifTrue: [""
- 			self inform: 'no matches for' translated , ' ''' , aString , ''''.
- 			^ self].
- 	""
- 	results size = 1
- 		ifTrue: [""
- 			self selectUntranslatedPhrase: results first.
- 			^ self].
- 	""
- 	index := (UIManager default 
- 				chooseFrom: (results
- 						collect: [:each | each copy replaceAll: Character cr with: $\])
- 				title: 'select the untranslated phrase...' translated).
- 	""
- 	index isZero
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self
- 		selectUntranslatedPhrase: (results at: index)!

Item was removed:
- ----- Method: LanguageEditor>>selectAllTranslation (in category 'gui methods') -----
- selectAllTranslation
- 	selectedTranslations := (1 to: self translations size) asIdentitySet.
- 	self changed: #allSelections!

Item was removed:
- ----- Method: LanguageEditor>>selectNewerKeys (in category 'gui methods') -----
- selectNewerKeys
- 
- 	| translations |
- 	self deselectAllTranslation.
- 	translations := self translations.
- 	newerKeys do: [:k |
- 		| index |
- 		index := translations indexOf: k ifAbsent: [0].
- 		index > 0 ifTrue: [
- 			self selectedTranslationsAt: index put: true
- 		].
- 	].
- !

Item was removed:
- ----- Method: LanguageEditor>>selectTranslationFileName (in category 'gui methods') -----
- selectTranslationFileName
- 	"answer a file with a translation"
- 	| file |
- 	file := (StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*.translation')
- 				startUpWithCaption: 'Select the file...' translated.
- 	^ file isNil
- 		ifFalse: [file directory fullNameFor: file name]!

Item was removed:
- ----- Method: LanguageEditor>>selectTranslationPhrase: (in category 'gui methods') -----
- selectTranslationPhrase: phraseString 
- 	self selectedTranslation: (self translations indexOf: phraseString)!

Item was removed:
- ----- Method: LanguageEditor>>selectUntranslatedPhrase: (in category 'gui methods') -----
- selectUntranslatedPhrase: phraseString 
- 	self
- 		selectedUntranslated: (self untranslated indexOf: phraseString)!

Item was removed:
- ----- Method: LanguageEditor>>selectedTranslation (in category 'accessing') -----
- selectedTranslation
- 	"answer the selectedTranslation"
- 	^ selectedTranslation!

Item was removed:
- ----- Method: LanguageEditor>>selectedTranslation: (in category 'accessing') -----
- selectedTranslation: anInteger 
- 	"change the receiver's selectedTranslation"
- 	selectedTranslation := anInteger.
- 	""
- 	self changed: #selectedTranslation.
- 	self changed: #translation!

Item was removed:
- ----- Method: LanguageEditor>>selectedTranslationsAt: (in category 'accessing') -----
- selectedTranslationsAt: index
- 	^ selectedTranslations includes: index!

Item was removed:
- ----- Method: LanguageEditor>>selectedTranslationsAt:put: (in category 'accessing') -----
- selectedTranslationsAt: index put: value 
- 	value = true
- 		ifTrue: [selectedTranslations add: index]
- 		ifFalse: [selectedTranslations
- 				remove: index
- 				ifAbsent: []]!

Item was removed:
- ----- Method: LanguageEditor>>selectedUntranslated (in category 'accessing') -----
- selectedUntranslated
- 	"answer the selectedUntranslated"
- 	^ selectedUntranslated!

Item was removed:
- ----- Method: LanguageEditor>>selectedUntranslated: (in category 'accessing') -----
- selectedUntranslated: anInteger 
- 	"change the selectedUntranslated"
- 	selectedUntranslated := anInteger.
- 	""
- 	self changed: #selectedUntranslated!

Item was removed:
- ----- Method: LanguageEditor>>status (in category 'gui methods') -----
- status
- 	"answer a status string"
- 	| translationsSize untranslatedSize |
- 	translationsSize := self translator translations size.
- 	untranslatedSize := self translator untranslated size.
- 	^ 'ÆÀ {1} phrases ÆÀ {2} translated ÆÀ {3} untranslated ÆÀ' translated format: {translationsSize + untranslatedSize. translationsSize. untranslatedSize}!

Item was removed:
- ----- Method: LanguageEditor>>translate (in category 'gui methods') -----
- translate
- 	"translate a phrase"
- 	| phrase |
- 	phrase := self phraseToTranslate.
- 	""
- 	(phrase isNil
- 			or: [phrase = ''])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self translatePhrase: phrase!

Item was removed:
- ----- Method: LanguageEditor>>translatePhrase: (in category 'gui methods') -----
- translatePhrase: aString 
- 	"translate aString"
- 	| translation |
- 	translation := UIManager default
- 				multiLineRequest: 'translation for: ' translated , '''' , aString , ''''
- 				centerAt: Sensor cursorPoint
- 				initialAnswer: aString
- 				answerHeight: 200.
- 	""
- 	(translation isNil
- 			or: [translation = ''])
- 		ifTrue: [""
- 			Beeper beep.
- 			^ self].
- 	""
- 	self phrase: aString translation: translation!

Item was removed:
- ----- Method: LanguageEditor>>translation (in category 'accessing') -----
- translation
- 	"answer the translation for the selected phrase"
- 	self selectedTranslation isZero
- 		ifTrue: [^ '<select a phrase from the upper list>' translated].
- 	""
- 	^ self translator
- 		translationFor: (self translations at: self selectedTranslation)!

Item was removed:
- ----- Method: LanguageEditor>>translation: (in category 'accessing') -----
- translation: aStringOrText 
- 	"change the translation for the selected phrase"
- 	| phrase |
- 	self selectedTranslation isZero
- 		ifTrue: [^ self].
- 	phrase := self translations at: self selectedTranslation.
- 	translator
- 		phrase: phrase
- 		translation: aStringOrText asString.
- 	newerKeys add: phrase.
- 	^ true!

Item was removed:
- ----- Method: LanguageEditor>>translations (in category 'accessing') -----
- translations
- 	"answet the translator's translations"
- 	| allTranslations filterString |
- 	allTranslations := self translator translations keys.
- 	""
- 	filterString := self translationsFilter.
- 	""
- 	filterString isEmpty
- 		ifFalse: [allTranslations := allTranslations
- 						select: [:each | ""
- 							('*' , filterString , '*' match: each)
- 								or: ['*' , filterString , '*'
- 										match: (self translator translationFor: each)]]].
- ""
- 	^ allTranslations asSortedCollection!

Item was removed:
- ----- Method: LanguageEditor>>translationsFilter (in category 'accessing') -----
- translationsFilter
- ^translationsFilter ifNil:['']!

Item was removed:
- ----- Method: LanguageEditor>>translationsFilterWording (in category 'gui methods') -----
- translationsFilterWording
- 	^ (self translationsFilter isEmpty
- 		ifTrue: ['filter' translated]
- 		ifFalse: ['filtering: {1}' translated format:{self translationsFilter}]) !

Item was removed:
- ----- Method: LanguageEditor>>translationsKeystroke: (in category 'gui methods') -----
- translationsKeystroke: aChar 
- 	"Respond to a Command key in the translations list."
- 	aChar == $x
- 		ifTrue: [^ self removeTranslation].
- 	aChar == $E
- 		ifTrue: [^ self browseMethodsWithTranslation]!

Item was removed:
- ----- Method: LanguageEditor>>translationsMenu: (in category 'gui methods') -----
- translationsMenu: aMenu 
- 	^ aMenu add: 'remove (x)' translated action: #removeTranslation;
- 		 add: 'where (E)' translated action: #browseMethodsWithTranslation;
- 		 add: 'select all' translated action: #selectAllTranslation;
- 		 add: 'deselect all' translated action: #deselectAllTranslation;
- 		 add: 'select changed keys' translated action: #selectNewerKeys;
- 		 add: 'export selection' translated action: #codeSelectedTranslation;
- 		 add: 'export selection in do-it form' translated action: #codeSelectedTranslationAsMimeString;
- 		 add: 'reset changed keys' translated action: #resetNewerKeys;
- 		 yourself!

Item was removed:
- ----- Method: LanguageEditor>>translator (in category 'private') -----
- translator
- 	^translator!

Item was removed:
- ----- Method: LanguageEditor>>untranslated (in category 'accessing') -----
- untranslated
- 	"answer the translator's untranslated phrases"
- 	
- 
- | all filterString |
- 	all := self translator untranslated.
- 	""
- 	filterString := self untranslatedFilter.
- 	""
- 	filterString isEmpty
- 		ifFalse: [all := all
- 						select: [:each | ""
- 							('*' , filterString , '*' match: each)
- 								or: ['*' , filterString , '*'
- 										match: (self translator translationFor: each)]]].
- 	""
- 	^ all asSortedCollection!

Item was removed:
- ----- Method: LanguageEditor>>untranslatedFilter (in category 'accessing') -----
- untranslatedFilter
- 	^ untranslatedFilter
- 		ifNil: ['']!

Item was removed:
- ----- Method: LanguageEditor>>untranslatedFilterWording (in category 'gui methods') -----
- untranslatedFilterWording
- 	^ self untranslatedFilter isEmpty
- 		ifTrue: ['filter' translated]
- 		ifFalse: ['filtering: {1}' translated format: {self untranslatedFilter}]!

Item was removed:
- ----- Method: LanguageEditor>>untranslatedKeystroke: (in category 'gui methods') -----
- untranslatedKeystroke: aChar 
- 	"Respond to a Command key in the translations list."
- 	aChar == $t
- 		ifTrue: [^ self translate].
- 	aChar == $E
- 		ifTrue: [^ self browseMethodsWithUntranslated]!

Item was removed:
- ----- Method: LanguageEditor>>untranslatedMenu: (in category 'gui methods') -----
- untranslatedMenu: aMenu 
- 	^ aMenu add: 'remove' translated action: #removeUntranslated;
- 		 add: 'translate (t)' translated action: #translate;
- 		 add: 'where (E)' translated action: #browseMethodsWithUntranslated;
- 		 yourself!

Item was removed:
- ----- Method: LanguageEditor>>update: (in category 'updating') -----
- update: aSymbol 
- 	"Receive a change notice from an object of whom the receiver  
- 	is a dependent."
- 	super update: aSymbol.
- 	""
- 	aSymbol == #untranslated
- 		ifTrue: [self refreshUntranslated].
- 	aSymbol == #translations
- 		ifTrue: [self refreshTranslations]!

Item was removed:
- Object subclass: #TranslatedReceiverFinder
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Multilingual-Editor'!

Item was removed:
- ----- Method: TranslatedReceiverFinder class>>makeJapaneseTranslationFile (in category 'as yet unclassified') -----
- makeJapaneseTranslationFile
- 	| t n |
- 	NaturalLanguageTranslator initializeKnownPhrases.
- 	t := TranslatedReceiverFinder new senders.
- 	n := NaturalLanguageTranslator
- 				localeID: (LocaleID isoLanguage: 'ja').
- 	t
- 		do: [:w | 
- 			NaturalLanguageTranslator registerPhrase: w.
- 			self
- 				at: w
- 				ifPresent: [:k | n phrase: w translation: k]].
- 	n saveToFileNamed: 'ja.translation'!

Item was removed:
- ----- Method: TranslatedReceiverFinder>>searchBlockNode:addTo: (in category 'as yet unclassified') -----
- searchBlockNode: aBlockNode addTo: aCollection
- 
- 	aBlockNode statements do: [:e |
- 		(e isMemberOf: MessageNode) ifTrue: [self searchMessageNode: e addTo: aCollection].
- 		(e isMemberOf: ReturnNode) ifTrue: [self searchReturnNode: e addTo: aCollection].
- 	].
- !

Item was removed:
- ----- Method: TranslatedReceiverFinder>>searchMessageNode:addTo: (in category 'as yet unclassified') -----
- searchMessageNode: aMessageNode addTo: aCollection
- 
- 	((aMessageNode receiver isMemberOf: LiteralNode) and: [(aMessageNode selector isMemberOf: SelectorNode) and: [aMessageNode selector key = #translated]]) ifTrue: [
- 		aCollection add: aMessageNode receiver key.
- 	].
- 
- 	(aMessageNode receiver isMemberOf: BlockNode) ifTrue: [self searchBlockNode: aMessageNode receiver addTo: aCollection].
- 	(aMessageNode receiver isMemberOf: MessageNode) ifTrue: [self searchMessageNode: aMessageNode receiver addTo: aCollection].
- 	(aMessageNode receiver isMemberOf: ReturnNode) ifTrue: [self searchReturnNode: aMessageNode receiver addTo: aCollection].
- 
- 	aMessageNode arguments do: [:a |
- 		(a isMemberOf: BlockNode) ifTrue: [self searchBlockNode: a addTo: aCollection].
- 		(a isMemberOf: MessageNode) ifTrue: [self searchMessageNode: a addTo: aCollection].
- 		(a isMemberOf: ReturnNode) ifTrue: [self searchReturnNode: a addTo: aCollection].
- 	].
- !

Item was removed:
- ----- Method: TranslatedReceiverFinder>>searchMethodNode:addTo: (in category 'as yet unclassified') -----
- searchMethodNode: aMethodNode addTo: aCollection
- 
- 	(aMethodNode block isMemberOf: BlockNode) ifTrue: [self searchBlockNode: aMethodNode block addTo: aCollection].
- 	(aMethodNode block isMemberOf: MessageNode) ifTrue: [self searchMessageNode: aMethodNode block addTo: aCollection].
- 	(aMethodNode block isMemberOf: ReturnNode) ifTrue: [self searchReturnNode: aMethodNode block addTo: aCollection].
- !

Item was removed:
- ----- Method: TranslatedReceiverFinder>>searchReturnNode:addTo: (in category 'as yet unclassified') -----
- searchReturnNode: aReturnNode addTo: aCollection
- 
- 	(aReturnNode expr isMemberOf: BlockNode) ifTrue: [self searchBlockNode: aReturnNode expr addTo: aCollection].
- 	(aReturnNode expr isMemberOf: MessageNode) ifTrue: [self searchMessageNode: aReturnNode expr addTo: aCollection].
- !

Item was removed:
- ----- Method: TranslatedReceiverFinder>>senders (in category 'as yet unclassified') -----
- senders
- 
- 	| m o |
- 	m := SystemNavigation default allCallsOn: #translated.
- 	m := m collect: [:e |
- 		e classIsMeta ifTrue: [
- 			(Smalltalk at: e classSymbol) class decompile: e methodSymbol.
- 		] ifFalse: [
- 			(Smalltalk at: e classSymbol) decompile: e methodSymbol.
- 		]
- 	].
- 
- 	o := OrderedCollection new.
- 	m do: [:e | self searchMethodNode: e addTo: o].
- 	^ o sort
- !



More information about the Packages mailing list