windows issues with gettext

Lubomir I. Ivanov neolit123 at gmail.com
Mon Oct 15 14:18:57 PDT 2012


On 16 October 2012 00:04, Dirk Hohndel <dirk at hohndel.org> wrote:
> "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
>
> gtk_action_group_set_translation_domain(action_group, "subsurface");
>
> I wonder if that is what fails under Windows... it works fine on Linux
> and Mac.
>

it could be. i'm not sure.
but how about the main.c's months and day of the week.
we have these translated in .po files .e.g in bg_BG i have:

#: main.c:47
msgid "Aug"
msgstr "Авг"

but still on windows the month remains "Aug" in the "Info" tab and in
the divelist.
is this normal?

> 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'm a bit confused how should i approach the statistics ones, since
there is a "\n" in there:

#: statistics.c:168
#, fuzzy
msgctxt "Depth"
msgid "Average"
msgstr ""
"\n"
"Средно"

statistics.c:168 shows:
columnsbot[6] = C_("Depth", "Average");

should i replace "\n" with the translation of "Depth" ?

lubomir
--


More information about the subsurface mailing list