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

commits at source.squeak.org commits at source.squeak.org
Mon Apr 18 12:35:56 EDT 2011

Ricardo Moran uploaded a new version of GetText to project Etoys:

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

Name: GetText-Richo.14
Author: Richo
Time: 18 April 2011, 1:35:48 pm
UUID: fe80068b-c439-cb4e-b5bb-a659673f623b
Ancestors: GetText-Richo.13

* Exporting a GetTextTranslator was giving a DNU because GetTextExporter>>translationFor:in: was asking "translator translations".
* TextDomainManager class>>allKnownDomains was ignoring the special domain "Etoys-Tiles"

=============== Diff against GetText-Richo.13 ===============

Item was changed:
  ----- Method: GetTextExporter>>translationFor:in: (in category 'private') -----
  translationFor: aKey in: translator
+ 	| translation |
+ 	translator ifNil: [^ ''].
+ 	TextDomainManager allKnownDomains do: [:domain |
+ 		translation := translator translate: aKey inDomain: domain.
+ 		aKey = translation ifFalse: [^translation]
+ 	].
+ 	^ aKey!
- 	translator ifNil: [^''].
- 	translator translations at: aKey ifPresent: [:s | ^s].
- 	"If we have old camelCase translations, make space-separated words"
- 	translator translations at: aKey toCamelCase ifPresent: [:s | 
- 		(s includes: Character space) ifTrue: [^s].
- 		^s fromCamelCase].
- 	^''!

Item was changed:
  ----- Method: TextDomainManager class>>allKnownDomains (in category 'accessing') -----
  "Every package has it's own text domain now so it's not necessary to keep a registry of all domains, we can simply return all the packages in the image.
  PROBLEM: If a package doesn't contain translations, it won't have a mo file but the GetTextTranslator will try to load it anyway. This happens when we switch languages. So far I tested it briefly and it seems to work..."
+ ^PackageOrganizer default packageNames , {'Etoys-Tiles'}!
- ^PackageOrganizer default packageNames!

More information about the etoys-dev mailing list