Hi,

Ok, ibus-setup cannot run under C locale, I understand.

On Aug 23, 2014 at 15:08, Osamu Aoki wrote:

>> 2. run "ibus-setup" on a gnome-terminal.
>>
>>        $ LANG=C ibus-setup

This 'LANG=C' is for getting dialog messages in English.
This C locale setting is not a main issue.


Then reproducing procedure with English messages:

0. Assume the user is not an American English speaker, for example,
   is a British English speaker.

1. run "dpkg-reconfigure locales" and
        - deselect en_US.UTF-8 locale.
        - select en_GB.UTF-8 locale.

2. run "ibus-setup" on a gnome-terminal.

        $ LANG=en_GB.UTF-8 ibus-setup

3. click "Input Method" tab

4. click "Add" button

5. "Select an Input method" dialog appears with no list, and error
message on gnome-terminal as follows:

Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 322, in __button_engine_add_cb
    dialog.set_engines(self.__engines)
  File "/usr/share/ibus/setup/enginedialog.py", line 327, in set_engines
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
  File "/usr/lib/python3.4/locale.py", line 592, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting


Another procedure with Japanese messages:

1. run "dpkg-reconfigure locales" and
        - deselect en_US.UTF-8 locale.
        - select ja_JP.UTF-8 locale.

2. run "ibus-setup" on a gnome-terminal.

        $ LANG=ja_JP.UTF-8 ibus-setup

3.... same as previous case, but messages are Japanese.


Are these special cases?


The cause is clear.  ibus-setup requires en_US.UTF-8 locale database.

Do all debian users generate en_US.UTF-8 locale database?
Does debian packaging system generate it automatically?


To solve this bug in Debian layer, I think,

o Describe "require to generate en_US.UTF-8 locale database"
  in README.Debian

o Or guarantee to generate en_US.UTF-8 locale database
  with packaging system

o Or patch setup/enginedialog.py:

--- setup/enginedialog.py.orig  2014-08-23 18:06:10.982463613 +0900
+++ setup/enginedialog.py       2014-08-23 18:06:28.226422031 +0900
@@ -324,7 +324,7 @@

             # Retrieve Untranslated language names.
             backup_locale = locale.setlocale(locale.LC_ALL, None)
-            locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
+            locale.setlocale(locale.LC_ALL, 'C.UTF-8')
             untrans = IBus.get_language_name(e.get_language())
             locale.setlocale(locale.LC_ALL, backup_locale)
             if untrans == None:

Debian supports C.UTF-8 locale. But some other distro seems not to support yet. ( https://bugzilla.redhat.com/show_bug.cgi?id=902094 )
So this patch should not put upstream at now, I think.

Thanks.
--
Kunihiko Imai


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to