[Babel] Looking for more translators

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Sat Sep 27 15:52:32 UTC 2003


  Scott and everyone,

  Nice and concise document!  Here are some comments.

> Menus
> -----
> 
> add: aString target: target selector: aSymbol argumentList: argList
>         "Append a menu item whose label is the given string translated into the current natural language..."
>         | item |
>         item _ MenuItemMorph new
>                 contents: aString translated;
>                 target: target;
>         selector: aSymbol;
>               arguments: argList asArray.
>         self addMorphBack: item.

  We will want those manus to handle more than one language at a time.
So, the most internal method would look like:

add: aString target: target selector: aSymbol argumentList: argList translationDict: dict
        "Append a menu item whose label is the given string translated into the current natural language..."
        | item |
        item _ MenuItemMorph new
                contents: (aString translatedWith: dict);
                target: target;
        selector: aSymbol;
              arguments: argList asArray.
        self addMorphBack: item.

The method #add:target:selector:argumentList: grab the default
dictionary from somewhere (In the m17n 3.6, it would be "Smalltalk
primaryLanguage") and calls this one.

> addWithoutTranslation:target:selector:argument:
> addWithoutTranslation:action:
> addWithoutTranslation:selector:argument:
> addWithoutTranslation:selector:argumentList:
> addWithoutTranslation:subMenu:
> addWithoutTranslation:subMenu:target:selector:argumentList:

  Instead of this, passing "non-translating" dictionary to the above
method would be clearner.

> Dynamically-updating menu items
> ----------- -------- ---- -----
> 
> Here, most cases can be transparently handled by changing the line in MenuMorph  method #contents:withMarkers:inverse:
> that currently reads
> 
>         super contents: indent, (aString copyFrom: markerIndex+1 to: aString size).
> 
> so that instead it reads
> 
>         super contents: indent, (aString copyFrom: markerIndex+1 to: aString size) translated.
> 
> -------------------------------------------------------------
> 
> ... or has this generic approach to textual-UI translation already been discussed and rejected?  Perhaps there are fears
> that the potential gotchas will outweigh the potential gains?

  In Nihongo images it looks like the bottom one.

-- Yoshiki



More information about the Squeak-dev mailing list