[etoys-dev] Etoys: GetText-Richo.6.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue May 25 22:45:32 EDT 2010
Ricardo Moran uploaded a new version of GetText to project Etoys:
http://source.squeak.org/etoys/GetText-Richo.6.mcz
==================== Summary ====================
Name: GetText-Richo.6
Author: Richo
Time: 25 May 2010, 11:45:39 pm
UUID: 0fe14be9-f575-e74b-951a-be395bae107e
Ancestors: GetText-Richo.5
* Changed String>>#translated to look in all domains if the translation wasn't found.
=============== 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]
!
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) !
Item was removed:
- ----- Method: String>>translatedInAnyDomain (in category '*gettext') -----
- translatedInAnyDomain
- | translation |
- Transcript show: self printString, ' translatedInAnyDomain'; cr.
- TextDomainManager allKnownDomains do: [:domain |
- translation := self translatedInDomain: domain.
- self = translation ifFalse: [^translation]
- ].
- ^self!
More information about the etoys-dev
mailing list