Re: [PATCH 3/5] gettext docs: the gettext.h C interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 10, 2010 at 22:52, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:
>
>> +   - _()
>> +
>> +    Mark and translate a string. E.g.:
>> +
>> +        printf(_("HEAD is now at %s"), hex);
>> +
>> +   - N_()
>> +
>> +    A no-op pass-through macro for marking strings inside static
>> +    initializations, e.g.:
>> +
>> +        static const char *reset_type_names[] = {
>> +            N_("mixed"), N_("soft"), N_("hard"), N_("merge"), N_("keep"), NULL
>> +        };
>> +
>> +    And then, later:
>> +
>> +        die(_("%s reset is not allowed in a bare repository"),
>> +               _(reset_type_names[reset_type]));
>
> I do not think this is a very good example.  Unless we are doing l10n of
> option names, a Portuguese won't be typing "git reset --misto", so there
> is no point in invoking _(reset_type_names[]) to begin with, and there is
> no need to mark mixed/soft/hard/... for translation.

Actually all the code that uses reset_type_names isn't referring to
the option directly, but to the action currently being undertaken:

    die(_("Cannot do a %s reset in the middle of a merge."),
        _(reset_type_names[reset_type]));

    die(_("Cannot do %s reset with paths."),
        _(reset_type_names[reset_type]));

    die(_("%s reset is not allowed in a bare repository"),
        _(reset_type_names[reset_type]));

In that context translators probably want to translate them, e.g. I'd
translate the first one into Icelandic as:

    "Get ekki framkvæmt %s endurstillingu í miðri sameiningu" with %s
== "blandaða" ("mixed")

> And we won't be doing l10n of option names or subcommand names, I hope ;-).

We could do that, I don't have plans for it though, and in any case I
don't think this is such a case.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]