[etoys-dev] Etoys: GetText-Richo.6.mcz

Bert Freudenberg bert at freudenbergs.de
Wed May 26 03:13:21 EDT 2010


On 26.05.2010, at 02:45, commits at source.squeak.org wrote:
> 
> =============== Diff against GetText-Richo.5 ===============
> 
> Item was added:
> + ----- Method: String>>translatedInAllDomains (in category '*gettext') -----
> + translatedInAllDomains
> + | translation |
> + Transcript show: self printString, ' translatedInAllDomains'; cr.
> + TextDomainManager allKnownDomains do: [:domain |
> + 	translation := self translatedInDomain: domain.
> + 	self = translation ifFalse: [^translation]
> + ].
> + ^self!

> Item was changed:
>  ----- Method: MOFile>>translationFor: (in category 'public') -----
>  translationFor: aString 
> + 	| |
> - 	| file |
>  	aString size = 0 ifTrue: [^ '']. "Gettext header"
>  	^ (self searchByDictionary: aString) ifNil: [
> + "file := (fileName subStrings: '\').
> + Transcript show: aString printString, ' not found in ', (file last); cr."
> + ^aString]
> - file := (fileName subStrings: '\').
> - Transcript show: aString printString, ' not found in ', "(file atLast: 3),'\', "(file last); cr.^aString]
>  !

The formatting in these method looks odd - we usually indent everything except for the method pattern by one tab.


> Item was changed:
>  ----- Method: String>>translated (in category '*gettext') -----
>  translated
>  	"answer the receiver translated to the default language"
> + 	| translation |
> + 	translation := self
> - 	^ self
>  		translatedTo: LocaleID current
> + 		inDomain: (TextDomainManager domainOfMethod: thisContext sender method).
> + 	self = translation ifTrue: [^self translatedInAllDomains].
> + 	^translation!
> - 		inDomain: (TextDomainManager domainOfMethod: thisContext sender method) !

I'd use self == translation here.


- Bert -




More information about the etoys-dev mailing list