Subject: Re: [PATCH 03/21] i18n: advice: internationalize message for conflicts

From: Vasco Almeida <[email-masked]>
Date: Wed, 18 May 2016 21:00:28 +0000

Às 19:24 de 18-05-2016, Eric Sunshine escreveu:
> On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida <[email-masked]> wrote:
>> Mark message for translation telling the user she has conflicts to
>> resolve. Expose each particular use case, in order to enable translating
>> entire sentences which would facilitate translating into other
>> languages.
>>
>> Change "Pull" to lowercase to match other messages.
>>
>> Signed-off-by: Vasco Almeida <[email-masked]>
>> ---
>> diff --git a/advice.c b/advice.c
>> @@ -79,7 +79,20 @@ int git_default_advice_config(const char *var, const char *value)
>>  int error_resolve_conflict(const char *me)
>>  {
>> -       error("%s is not possible because you have unmerged files.", me);
>> +       if (!strcmp(me, "cherry-pick"))
>> +               error(_("cherry-pick is not possible because you have unmerged files."));
>> +       else if (!strcmp(me, "commit"))
>> +               error(_("commit is not possible because you have unmerged files."));
>> +       else if (!strcmp(me, "merge"))
>> +               error(_("merge is not possible because you have unmerged files."));
>> +       else if (!strcmp(me, "pull"))
>> +               error(_("pull is not possible because you have unmerged files."));
>> +       else if (!strcmp(me, "revert"))
>> +               error(_("revert is not possible because you have unmerged files."));
>> +       else
>> +               error(_("%s is not possible because you have unmerged files."),
>> +                       me);
> 
> Despite the commit message, I still don't understand this change. 'me'
> is a literal git command which shouldn't be translated, so how is this
> helping?
> 
I saw it as an operation that could be translated, not necessary a git
command - just happens to be so. Now that you mention, I can see this
patch doesn't had much value from that point of view.

On the other hand, I can translate the sentence, including the command
name. Something I couldn't before and I would likely do it to be
consistent with other translations I've done and also because, as a
user, I would like to read the entire sentence in my language.

I have few experience in i18n and l10n, but often I realize I'm making
assumptions about other languages that are not true. Some translations,
say Chinese or Bulgarian that have their own writing systems, might
translate that command word to something to their writing. Others might
agglutinate the command word with some suffix.
I can't say for sure because I don't know those languages, but it's
possible.

Maybe the first paragraph can give you a better understanding of the issue:
http://www.gnu.org/software/gettext/manual/html_node/Names.html