Bug 7377 Ver 4.0.2 starts in East Asian Language

Revert "GrampsLocale: Don't set  to 'C' if LANG is en_US"

This reverts commit bdd336f38e.

It turns out that Gtk's having an 'en' translation isn't the only reason
for doing this: GtkBuilder uses $LANGUAGE too, and will look for an english
translation of strings in our Glade files. Since there's no en.po or
en_US.po, it will go to the next language in the list and produce confusing
results.
This commit is contained in:
John Ralls 2014-02-20 13:54:40 -08:00
parent 84cabddcc9
commit 816bf310e1

View File

@ -450,7 +450,11 @@ class GrampsLocale(object):
lang = '.'.join((check_lang[0], 'UTF-8'))
os.environ["LANG"] = lang
os.environ["LANGUAGE"] = ':'.join([l for l in self.language])
#We need to convert 'en' and 'en_US' to 'C' to avoid confusing
#GtkBuilder when it's retrieving strings from our Glade files
#since we have neither an en.po nor an en_US.po.
os.environ["LANGUAGE"] = ':'.join(['C' if l in ('en', 'en_US') else l
for l in self.language])
# GtkBuilder uses GLib's g_dgettext wrapper, which oddly is bound
# with locale instead of gettext. Win32 doesn't support bindtextdomain.