windows issues with gettext

Dirk Hohndel dirk at hohndel.org
Mon Oct 15 14:57:52 PDT 2012


"Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>> 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?

Oops - I haven't noticed this, but the same is true on Linux.
I just pushed a fix, so now at least the day and month names are
correctly translated.

Here's an excerpt from the commit message:

    We marked the strings for translation, but then didn't actually call the
    translation function on them.
    
    Our dates are still not truely localized as we have hand written code for
    the date / time handling that constructs the dates according to US fashion
    as [Weekday], [Month] [Day of Month], [Year] [hh:mm]

I don't think there is a simple way to fix this (at least I wasn't able
to find anything).

>> 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"
> "Средно"

Those are the leftovers of the old, broken approach. I don't speak
Bulgarian, but my guess is the correct text would be

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

(don't forget to remove the #fuzzy)


> statistics.c:168 shows:
> columnsbot[6] = C_("Depth", "Average");
>
> should i replace "\n" with the translation of "Depth" ?

No, Depth is just there to tell the translator that this use of
"average" is in the context of "depth" (as in some languages the word or
the form of the word used for "average" changes depending on the word it
applies to (in this case, "depth"))

/D


More information about the subsurface mailing list