Hello list!
Translating the eToys vocabulary to spanish, I found (like many people do) that *too* many thinks get not tranlation with the current translation-support.
We need a more complete solution to this problem. I propose to atack it in 2 fronts:
1) String 2) Date, Time and Number
For 1) I created some methods in String (and a class variable named Languages and a few class methods to initialize and fill it)
String>>translated ^ self translatedTo: World currentNaturalLanguage
String>>translatedTo: languageSymbol | language |
language := Languages at: languageSymbol ifAbsent:[Transcipt show:'*Language: ', languageSymbol, ' not present!'; cr. ^ self].
^ language at: self ifAbsent:[Transcipt show:'*Sentence:', self, ' not present!'; cr. self]
I took the Browser class and added #translated message to all hard-code strings. Then, watching in the Transcript for warnings about missing sentences, I translated the complete browser in just 1/2 hour.
Example: Browser>>defaultBrowserTitle ^ 'System Browser' translated
This mechanism could be not the best, but we need regionalized Squeaks to teach kids (or kids to teach us :)...
I'd like to hear your comments...
Cheers,
Diego Gomez Deck
Diego Gomez Deck DiegoGomezDeck@ConsultAr.com said:
String>>translated ^ self translatedTo: World currentNaturalLanguage
I think that's a usable approach. It has some drawbacks (if someone changes a fixed string somewhere e.g. to fix up a comma or a speling error the translation strings won't work anymore - that's why VisualWorks uses symbols to index a message catalog), but it is very lightweight and easy to add to the image. With some minimal tooling around changesets it's probably possible to fix the drawbacks as well (find strings pre and post a changeset and use these to see what translations could possibly have been broken).
Personally, I'm aiming at translating just the Etoys stuff. As it stands now, you need to be able to cope with English anyway to work with Squeak on the Smalltalk level (comments, selector names, etcetera) so I'm trying to find a path from Etoys/Dutch towards Smalltalk/English. Even an incomplete Etoys translation is not so bad in this respect.
However, it would be good to have this in the image - a central repository of strings and some well-chosen applications of the #translated message would really speed up translation of the other 'non-Smalltalk' stuff, like the flaps and authoring tools.
squeak-dev@lists.squeakfoundation.org