Re: [PATCH 2/5] merge-recursive: porcelain messages for checkout

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

 



On Mon, Aug 9, 2010 at 20:52, Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> Matthieu Moy <Matthieu.Moy@xxxxxxx> writes:
>>
>>> +void set_porcelain_error_msgs(const char **msgs, const char *cmd)
>>>  {
>>> +    const char *msg;
>>> +    char *tmp;
>>> +    const char *cmd2 = strcmp(cmd, "checkout") ? cmd : "switch branches";
>>
>> This may have implications to the later i18n effort, but lets ignore it
>> for now.  I don't think it will be too bad.
>
> Note that the ? : construct just allows factoring out two messages,
> but one can easily distinguish all cases and give the complete error
> message in the source (we don't care about performance/memory here,
> it's a one-time thing).
>
> So, yes, that's easily fixable later if it causes problems to i18n.

Yeah, this is a drop in the lego ocean that is Git's source
code. Don't worry about it, it can be fixed later.

You can stop reading at this point.

FWIW "lego" is the i18n term used for printf("messages %s assembled
like this", "that are"). E.g.:

    printf(_("It's a nice %s"), is_evening() ? _("evening") : _("day"));

Things like that will cause trouble for e.g. French where it's "C'est
un soirée formidable." or "C'est un jour formidable." (I hope I got
that right). You can move the %s around, but it's still hard to
translate stuff like that, especially as translation programs often
display strings independently.

It's better to have independent strings like _("It's a nice evening")
and _("It's a nice day") instead, even if it leads to duplication.

I'll be submitting a lot of patches to fix things like this once the
i18n series gets merged.

Have fun.
--
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]