[squeak-dev] International text input on X11

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Mon Jun 6 21:00:13 UTC 2016


On Mon, Jun 6, 2016 at 1:19 PM, tim Rowledge <tim at rowledge.org> wrote:
>
>> On 06-06-2016, at 11:38 AM, Yoshiki Ohshima <Yoshiki.Ohshima at acm.org> wrote:
>>
>>> So, how on earth did I get here… and can I ever get back to plain old en_GB?
>>
>> Do you have to?
>
> Well, yes. When I was a mid-teen (around the time that electricity was invented) I could make a faltering conversation in English, Welsh, French, German, Russian or Latin. These days I can mange English ok and can just about remember how to pronounce Welsh. You’ll note that coping with Japanese is not in either list …

Oh, sorry.  I was facetious but not helpful.
>
> It seems to me that we’ve fixed the VM ok, and we know how to start it correctly to use the new option. I’m not at all sure whether it is sensible to use the -compositioninput flag for anyone not wanting the popup window; should the scratch startup script do some working out to decide this?

Yes.  The patch to the scratch script I sent to checks the environment
variable XIM, and passes the -compositioninput flag only when there is
a spec for it.  (connecting to XIM may still fail when a server like
ibus is not running, but I think Squeak VM is smart enough to handle
it.

> Should it be an option people can set? Automatic if the LANG is set to Japanese (and other languages)? It seems there is a fair bit of package loading required for anyone to have the required fonts and the ibus tools, so perhaps there should be a script/package to handle that and replace/modify the /bin/scratch script. I’m not at all sure about the script changes you posted May 25th, not because I have some reason to dislike them but I just don’t understand.

Hmm, ok.  The change to the shell script may look more complicated,
but that is because the logic in the (modified) /usr/bin/squeak was
included there and we can bypass /usr/bin/squeak altogether.
Otherwise it just checks the XIM environment variable.

> I think my process was -
> - `sudo apt-get install ibus ibus-anthyttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname`
> - use raspi-config to set locale to ja_JP.UTF
> - edit /home/pi/.bashrc to add
> "export LANG=ja_jp.UTF8
>  export LC_ALL=$LANG
>  export LANGUAGE=$LANG”
> to the end.
>  -reboot.
> - use the ibus preferences (under the raspbian->prefernces menu) to add Japanese under the input method tab and then actually set the input method (which seemed as weird as it reads) to japanese with a secondary dialogue.
> - start Scratch, set Japanese as language
> - use the ibus icon at the right end of the raspbian menubar to set ‘Anthy’ (NOT Japanese) as the input
>
> And I *think* that was it.

There can be different state such as have ibus installed but not
running, have japanese fonts installed but LANG is not using them,
etc.  As long as LANG and LC_ALL are en_GB.UTF8, there is no harm for
English users I believe).

> We have outline image code to make use of it, at least for Scratch (though I see that the composition window appears for me in ordinary browsers now) that needs tidying up. I can do that. Somebody what knows what they’re doing needs to produce a nice little shell script I can stick next to the timidity install script in /usr/share/scratch that will load everything and configure it correctly. I can’t imagine the above complications working too wwell in a classroom.

Installing the ibus package would do it but for those who don't do
that, it should be fine.  (And you can remove it by apt-get uninstall
ibus).

-- 
-- Yoshiki


More information about the Squeak-dev mailing list