[etoys-dev] Etoys: Multilingual-Richo.2.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 23 09:34:47 EDT 2010
A new version of Multilingual was added to project Etoys:
http://source.squeak.org/etoys/Multilingual-Richo.2.mcz
==================== Summary ====================
Name: Multilingual-Richo.2
Author: Richo
Time: 10 May 2010, 9:10:13 pm
UUID: 8a5314fd-2ac1-4640-a7e1-90a253b5f769
Ancestors: Multilingual-bf.1
* A few changes I made to GetTextExporter2 to look for the text domain of the method using its package instead of its class.
* Also, my first attempt to push something to the inbox so please forgive me if I make a mistake. :)
=============== Diff against Multilingual-bf.1 ===============
Item was added:
+ ----- Method: GetTextExporter2>>getTextDomainForPackage: (in category 'as yet unclassified') -----
+ getTextDomainForPackage: aPackageInfo
+ ^TextDomainManager domainForPackage: aPackageInfo!
Item was changed:
----- Method: GetTextExporter2>>appendStringReceivers:into: (in category 'private') -----
appendStringReceivers: aSymbol into: domains
| literals references domainName methodReference keywords found |
found := TranslatedReceiverFinder new stringReceiversWithContext: aSymbol.
found do: [ :assoc |
methodReference := assoc key.
keywords := assoc value.
+ domainName _ self getTextDomainForPackage:
+ (PackageOrganizer default packageOfMethod: methodReference).
- domainName _ self getTextDomainForClassCategory:
- (Smalltalk at: methodReference classSymbol) category.
literals _ domains at: domainName ifAbsentPut: [Dictionary new].
keywords do: [ :literal |
references _ literals at: literal ifAbsentPut: [OrderedCollection new].
references add: methodReference.
].
].
!
Item was changed:
----- Method: GetTextExporter2>>appendVocabularies: (in category 'private') -----
appendVocabularies: domains
+ | literalsForDomain references domainName methodReference |
- | literalsForDomain references domainName |
EToyVocabulary allPhrasesWithContextToTranslate do: [ :r |
+ methodReference := (MethodReference new setStandardClass: (r second) methodSymbol: (r third)).
+ domainName _ self getTextDomainForPackage: (PackageOrganizer default packageOfMethod: methodReference).
- domainName _ self getTextDomainForClassCategory: r first.
literalsForDomain _ domains at: domainName ifAbsentPut: [Dictionary new].
r fourth do: [ :literal |
references _ literalsForDomain at: literal ifAbsentPut: [OrderedCollection new].
+ references add: methodReference.
- references add: (MethodReference new setStandardClass: (r second)
- methodSymbol: (r third)).
].
].
!
Item was removed:
- ----- Method: GetTextExporter2>>appendVocabulary:domains: (in category 'private') -----
- appendVocabulary: aVocabulary domains: domains
- | domainName literalsForDomain literals references |
- literals _ aVocabulary allUntranslatedWordings.
- literals addAll: aVocabulary allUntranslatedDocumentations.
- domainName _ self getTextDomainForClassCategory: aVocabulary class category.
- literalsForDomain _ domains at: domainName ifAbsentPut: Dictionary new.
- literals do: [ :literal |
- references _ literalsForDomain at: literal ifAbsentPut: [OrderedCollection new].
- references add: (MethodReference new setStandardClass: aVocabulary class methodSymbol: #initialize)
- ].
- !
Item was removed:
- ----- Method: GetTextExporter2>>getTextDomainForClassCategory: (in category 'private') -----
- getTextDomainForClassCategory: aClassCategory
- ^TextDomainManager domainForClassCategory: aClassCategory
- !
Item was removed:
- ----- Method: GetTextExporter2>>appendStringReceivers: (in category 'private') -----
- appendStringReceivers: domains
- | literals references ref domainName |
-
- TranslatedReceiverFinder new stringReceiversWithContext do: [ :r |
- domainName _ self getTextDomainForClassCategory: r first.
- literals _ domains at: domainName ifAbsentPut: [Dictionary new].
- r fourth do: [ :literal |
- references _ literals at: literal ifAbsentPut: [OrderedCollection new].
- ref _ OrderedCollection new.
- ref add: r second. "class"
- ref add: r third. "method"
- references add: ref.
- ].
- ]. !
More information about the etoys-dev
mailing list