translated Smalltalk (was: english)
Jecel Assumpcao Jr
jecel at merlintec.com
Wed Jun 16 16:51:04 UTC 2004
On Tuesday 15 June 2004 23:47, David Farber wrote:
> How sucessful do you feel your translation was? How happy were you
> with the result? 'auto' does seem awkward at first, but it is not
> _that_ bad--it falls in with 'autoconfiança', 'autocontrole' and
I wrote a reasonably long Smalltalk application on paper using this
translation (a bytecodeless Smalltalk-in-Smalltalk which was later
converted to English here http://www.lsi.usp.br/~jecel/st84.txt) and
was pleased with the result.
Luiz Fernando Bier Melgarejo came up with an interesting solution to
this problem for the Agora language, implemented by Marcio Q. Marchini
on top of LindaTalk (http://www.magma.ca/~mqm/mqm-cv.html). "Self" has
three different roles: as a receiver for action messages, the receiver
for accessor messages and as an argument. He did not attempt a single
translation for all cased but had
devo crescer ([I] should grow)
meu conteudo (my content)
minha cor (my color)
I don't remember what "self" was translated to (if at all) when used as
> [Apple IIGS]
I was just kidding - see how much Squeak grew from 1.13 to 3.7, meaning
what I did is such a small fraction of what would be needed today that
it isn't worth trying to recover it.
> English also let you compound words more aggresively than the
> romanace languages. So we get ReadWriteStream without much effort.
> What did you come up with in Portuguese?
I just added "de" and "do" making it a little longer than the English
version. "Stream" and "String" were particularly difficult to translate
and I don't remember right now what I used for them. ReadWriteStream
could be FluxoDeLeituraEEscrita, for example.
> So back to our original post--what would it take to translate
> Smalltalk/Etoys to Portuguese? How hard would it be to run a simple
> word counter on the source code and spit out, say, the 100 most used
> words (after splitting keyword:messages: and ClassNames) and then the
> 100 most used method names. That might be a place to start. That
> might also be a nice tool to have in general for other translation
There are four levels in inscreasing effort:
1) eToys vocabularies - this has been included in the system for a few
years, now (see methods in EToyVocabulary) and has Dutch, English,
German, Kiswahili(?), Norwegian, Spanish and Swedish as of Squeak 3.6.
You just have to copy a very long method and edit the two tables it
includes in order to do a translation for a new language.
2) Babel - Diego's new system which requires small changes to the code
which generates text for user interface elements. I think Squeak 3.6
(but certainly 3.7) includes his patch so that Babel can also provide
the translation for eToys when the vocabulary thing mentioned above
doesn't exist for a given language. The actual tools to do the
translation aren't part of the basic Squeak but are in a separate
package you can download. You don't need the tools just to use a
translated image. The idea is to eventually include every UI text in
this system so that all menus, ballon help messages, buttons and so on
can be translated.
3) many years ago I did a quick test in Smalltalk V of what I called
MultiSymbols - this was a subclass of Symbol where more then one String
could map to a single MultiSymbol. The reverse mapping (when pretty
printing, for example) was controlled by a global. This was for
translating Smalltalk itself, and allowed you to type in a German
Smalltalk code and then read it in Spanish. Comments weren't translated
(which, sadly, doesn't make as much of a difference as it should given
how much Smalltalkers actually comment) and neither were UI texts (so
something like Babel would still be needed). This would only solve the
problem for the core Smalltalk - any new symbols created when
programming applications would not normally include translations. The
pretty printing system in Squeak is rather complex, so this would take
a lot more work than it did in Smalltalk V.
4) a proper translation system - with everything stored in an
intermediate language (like the UN universal network language
http://www.ias.unu.edu/research/unl.cfm) and rendered automatically
into the user's natural language on demand.
I feel that any translation must be complete even if within some limited
domain (eToys only, for example). A partial translation is actually
worse than nothing since whatever is left untranslated will be terribly
frustrating for the users who wouldn't even have tried the system if it
didn't seem to be available in their language.
More information about the Squeak-dev