windows issues with gettext

Lubomir I. Ivanov neolit123 at gmail.com
Mon Oct 15 13:56:32 PDT 2012


On 15 October 2012 23:46, Dirk Hohndel <dirk at hohndel.org> wrote:
> "Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>
>> On 15 October 2012 23:25, Dirk Hohndel <dirk at hohndel.org> wrote:
>>> "Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>>>>>> what should be done here to make the menus work?
>>>>>
>>>>> Is that all menue entries or just some? Is that with the latest master?
>>>>> And current .mo files? The limited testing that I did on Win7 32bit
>>>>> seemed to work - but I'm not 100% sure if I checked the menues or just
>>>>> the program itself...
>>>>
>>>> it looks like all menu entries are affected, but not the dialogs such
>>>> as "about", "open" and others.
>>>
>>> Just to understand, this is with the environment variable
>>> LANGUAGE="bg_BG.UTF-8" set prior to starting subsurface?
>>
>> the menu problem affects all bundled languages not only bg_BG.
>> yes from my tests, on windows 7 nothing else works except LANGUAGE=...
>> in terms of setting env. variables.
>
> Doing some reading on this it seems that Windows gets easily confused
> about the values in the environment - I found a number of threads where
> people report that getenv and GetEnvironmentVariablesW return different
> results... I wonder if this is what is biting us.
>
> 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?

>> 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
> LANG="de_DE.UTF-8"
> ./subsurface
>
> and I get a happily localized app
>

nope, can't get it to work.
perhaps, someone else should confirm debian / ubuntu.

lubomir
--


More information about the subsurface mailing list