Web lists-archives.com

Re: [PATCH] submodule: avoid sentence-lego in translated string




On 9 October 2017 at 03:30, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> On Mon, Oct 9, 2017 at 9:51 AM, brian m. carlson
> <sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
>> On Sun, Oct 08, 2017 at 10:32:35AM +0100, Philip Oakley wrote:
>>> From: "Martin Ågren" <martin.agren@xxxxxxxxx>
>>> > - die(_("submodule entry '%s' (%s) is a %s, not a commit"),
>>> > -     cb->path, oid_to_hex(oid), typename(type));
>>> > + die(_("submodule entry '%s' (%s) is not a commit"),
>>> > +     cb->path, oid_to_hex(oid));
>>> Bikeshed,
>>> maybe:
>>> "submodule entry '%s' (%s) is not a commit. It is a %s"
>>> This puts the two parts in separate sentences?
>>
>> Languages with multiple grammatical genders are going to have problems
>> with this.  In French, "a tree" is "un arbre" (masculine), but "a tag"
>> is "une étiquette" (feminine).  We don't currently have a Spanish
>> translation, but this would break there as well.
>>
>> Splitting the article out with the type name is still problematic for
>> languages where articles vary by case, like German, since the
>> translation might be reused in another place requiring a different case.
>
> While all of the above is correct, would we really need to subject typename()
> to translation? IOW, can't we just treat 'blob', 'tree', 'commit' and
> 'tag' as-is,
> as terms of art (i.e. with a specific or precise meaning within a
> given discipline
> or field and might have a different meaning in common usage)?

In another subthread, I sort of suggested "... is of type '%s', not 'commit'".
So "commit" and "%s" would appear as the file-format-level terms that they are.
I think it looks odd but I guess it might work in Swedish, FWIW.

In this particular case, we could have three specific messages plus one default
message (which at the time shouldn't ever occur). Or we have one specific
message for the "tag"-case, which seems to have been Stefan's original
motivation, and a generic message for the other cases.