windows issues with gettext

Miika Turkia miika.turkia at gmail.com
Mon Oct 15 21:35:35 PDT 2012


On Mon, Oct 15, 2012 at 10:59 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> "Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>
>> here is the list of problems of subsurface on windows.
>> there was a little bit of discussion in the other thread but nothing
>> very constructive, so lets bring these again.
>> ideas are welcome...
>>
>> -------
>> 1) i can't seem to get the menus translated on win32:
>>
>> gettext is using env. variables (only?) so we have to take that into
>> consideration.
>>
>> set LC_ALL=xx_XX.UTF-8  -> no effect
>> set LANG=xx_XX.UTF-8  -> no effect
>> set LANGUAGE=xx_XX.UTF-8  -> translates everything but the menus
>> trying different translations -> no effect
>>
>> 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...
>
>> -------
>> 2) actually, how _are we_ going to translate subsurface on windows?
>> currently subsurface is not translated on windows...it just has some
>> translations for a posix library, which can be bundled, but are not
>> active due to missing env. variables.
>>
>> a proposal
>> - if the required env.variables are not available we set them by
>> default to the system locale on runtime.
>> to do that we use glib's g_win32_getlocale() which provides a method
>> to translate the win32 locales into posix locales.
>> - we instruct the user that he/she can set the subsurface language by
>> adding / modifying the required env. variables.
>>
>> this is a bit cumbersome solution, considering most software i've seen
>> can switch languages by a menu click.
>> alternative ideas are welcome.
>
> My plan was to use g_win32_getlocale to switch to the language that the
> user is running Windows in. I looked around and almost no software I
> could get my hands on allows switching language independent from the OS.
> Sure, we could add a preference setting but that seems odd.

To me user preference for language selection sounds good. IIRC a
common way in Windows is to select the application language on install
time and be stuck with it. However, preferences is more user friendly
and should be easy enough for all users. Environment variables are
something an average user won't be comfortable with, especially on
Windows.

> All I think we need for 2.1 is to have it work for the "normal" case,
> i.e. use g_win32_getlocale and then setup the environment variables
> ourselves (unless they are already set up).
>
>> ------
>> 3) i'm seeing a gettext bug on windows that seems to affect all
>> translations. title of the "add dive" dialog has invalid UTF-8
>> characters.
>> http://i50.tinypic.com/fc8xhh.png
>
> Is this a font problem? I.e., which character is supposed to be there in
> your locale and does that glyph exist in the font that you are using?
>
>> i'm having some troubles switching my locale on the linux distros i
>> have. so i can't confirm the same there.
>> "Locale not supported by C library."
>
> Which locale are you trying? I assume this is Ubuntu?
>
> /D
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list