[Babel] Looking for more translators

diegogomezdeck at consultar.com diegogomezdeck at consultar.com
Fri Sep 26 11:02:12 UTC 2003


Hi Göran,

[snip to talk about the future and not the past]
> Another question (that somebody else also brought up I think) - what
> happens when the image/packages evolve? What are your thoughts on this?

Babel, in the current stage, support (a simply but still useful) merging of
translations, export of translations, removing of translated/not-translated
phrases, etc.  So I don't expect many problems here. What is still missing
is a *better* merge tool with remove supporting, etc.

The not-translated get filled automatically using the #translated
mechanism, see:

   Language>>translationFor: phraseString
      "answer the receiver's translation for phraseString"
      | oldUntranslatedSize |

      translations
         at: phraseString
         ifPresent: [:translation |
            ^ debug
               ifTrue: [translation , ' (' , phraseString , ')']
               ifFalse: [translation]].

      oldUntranslatedSize := untranslated size.
      untranslated add: phraseString.
      oldUntranslatedSize = untranslated size
         ifFalse: [self changed: #untranslated].

      ^ phraseString

The new packages has only to send #translated to the visible strings and
nothing more.

> regards, Göran
>
> PS. Just downloading the image - the screenshots look really cool!

Thanks!

> PPS. I did hack together a little translation mechanism in Dolphin the
> other week using some become:-tricks (in order to switch String
> instances "in place" inside the UIs, without having to know how to get
> to them) and also hacking the serialization mechanism in there.

I also thought in something like that but the problem is how to handle the
composed-string like:

   'Your morph is named ', morph name.

This phrase will be translated one time per morph in the image.


Cheers,

Diego Gomez Deck
http://www.small-land.org





More information about the Squeak-dev mailing list