windows issues with gettext
dirk at hohndel.org
Mon Oct 15 14:04:14 PDT 2012
"Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>> I'd love to see what happens if you explicitly set the environment
>> variables from within subsurface using SetEnvironmentVariable
> just tried these:
> SetEnvironmentVariable("LANG", "bg_BG.UTF-8");
> SetEnvironmentVariable("LANGUAGE", "bg_BG.UTF-8");
> SetEnvironmentVariable("LC_ALL", "bg_BG.UTF-8");
> before calling "setlocale( LC_ALL, "" );" with no effect.
> from another look i think, all N_ macros are not being translated.
> e.g. also some of the the column titles in the early statistics and
> the days/months in main.c.
> perhaps this is broken on gettext-win32 or something else has to be used?
Well, N_ macros work differently. They only mark a string for
translation, but have no effect when compiled. So any variable
initialized with a string marked by N_ must be translated when it is
used. For the menus this should be triggered by calling
I wonder if that is what fails under Windows... it works fine on Linux
As for the column titles for the yearly statistics, you haven't updated
the bg_BG.po files since the change I pushed yesterday. As I noted in my
email, this changed the way the translations are done for that dialog
and required all translations to be updated.
You are not alone, quite a few other still need to update theirs, too.
Basically, any translation marked with "fuzzy" is being ignored by the
tools at this stage.
>>> i've compiled the .mo files on both debian and ubuntu, but still get
>>> no translations.
>>> ubuntu still reports "Locale not supported by C library." regardless
>>> of settings.
>>> in terms of settings, i've tried LANG=, LANGUAGE=, and LC_ALL= for
>>> both distros with no results for various of the bundled translations.
>>> perhaps another debian-like OS user can confirm - not sure whats going on.
>>> my default locale on both distros is en_US.UTF-8
>> That seems very strange. On Fedora I can literally simply say
>> export LANG
>> and I get a happily localized app
> nope, can't get it to work.
> perhaps, someone else should confirm debian / ubuntu.
I'll have access to a Ubuntu system tonight.
More information about the subsurface