[Etoys] How to translate Etoys
tak at metatoys.org
Mon Jul 23 19:04:29 EDT 2007
Just a quick report.
I measured how much keywords are covered by new gettext exporter.
Detected keywords by GetTextExporter2: 2630
All known phrases in NaturalLanguageTranslator: 4526
| categories keys diff |
categories := Dictionary new.
GetTextExporter2 new appendStringReceivers: categories.
GetTextExporter2 new appendVocabularies: categories.
keys := categories values
inject: Set new
into: [:set :next | set addAll: next keys;
diff := NaturalLanguageTranslator allKnownPhrases keys difference: keys.
Transcript cr; show: 'Detected keywords by GetTextExporter2: ' , keys size printString.
Transcript cr; show: 'All known phrases in NaturalLanguageTranslator: ' , NaturalLanguageTranslator allKnownPhrases size printString.
Transcript cr; show: 'Coverage: ' , (keys size / NaturalLanguageTranslator allKnownPhrases size * 100.0) printString , '%'.
Although, All known phrases includes much unused keywords.
>>> And I notice that some Comments are not too helpful - like, all
>>> comments in Protocols.pot are the same.
>> I know, current one is just a hack. The gettext exporter only works
>> literal receivers properly. We should fix, but it will need more a
> Well, if it takes that time so be it. We need to get it right. Btw, I
> think the vocabulary translations belong to the classes they are
> declared in, rather than in a central file.
More information about the Etoys