git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Oct 8, 2017, 10:26 UTC
Message-ID
<CAN0heSpP1xxnUt8nVMXBdh1ynQUTH3Jo4C34F7=9TNFSb-k1ZQ@mail.gmail.com>
In-Reply-To
<8686C1FA80EF45099730B50235CAFF6F@PhilipOakley>
On 8 October 2017 at 11:32, Philip Oakley <philipoakley@iee.org> wrote:
Show 7 quoted lines
> From: "Martin Ågren" <martin.agren@gmail.com>
>
>> We currently build an error message like "entry is a %s, not a commit",
>> where the placeholder will be replaced with "blob", "tag" or "tree".
>> Apart from those three placeholder words not being translated, in some
>> languages it might be awkward or impossible to ensure a grammatically
>> correct end result.
...
Show 10 quoted lines
>>  default:
>> - 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?

I'm not doing the Swedish translation, but if I did, I would find this just as hard to translate as the original. There are two problems here. The first is "blob"/"tag"/"tree". "Blob" is already used in the Swedish translation, but "tag" should be "tagg" and "tree" should be "träd" (IMHO).

The second problem is that even if all three words were valid Swedish words, then (IMHO) using "en %s" instead of "a %s" would be needed to make sense with "en blob" and "en tag", but it wouldn't work with "en tree" which should arguably be "ett tree". (But to be clear, seeing any of "en tree" and "ett tree" makes me shiver.)

I should perhaps have been clearer that grammatical problems might arise from the "a". (It's more or less by chance that it works in English in the first place. Luckily there is no type "aardvark", "index" or "other".) But I wouldn't be surprised if there's a language out there where "a" is not a problem, but something else is.

It just occurred to me that one approach would be something like "... is of type '%s', not 'commit'" where "commit" should not be translated and %s would be one of "blob", "tag" and "tree". That would be sort of in line with what `git cat-file` does, but not quite. In cat-file it seems natural because it's about the command-line argument, here it's in an error string and seems a bit awkward.

Martin
Previous: Philip OakleyNext: brian m. carlson
Message 4 of 13 in “[L10N] Kickoff of translation for Git 2.15.0 round 1”
  1. Jiang XinOct 8, 2017
  2. submodule: avoid sentence-lego in translated stringMartin Ågren, Oct 8, 2017
  3. Philip OakleyOct 8, 2017
  4. Martin ÅgrenOct 8, 2017
  5. brian m. carlsonOct 9, 2017
  6. Junio C HamanoOct 9, 2017
  7. Martin ÅgrenOct 9, 2017
  8. Stefan BellerOct 9, 2017
  9. Jean-Noël AVILAOct 9, 2017
  10. Junio C HamanoOct 10, 2017
  11. Changwoo RyuOct 10, 2017
  12. Martin ÅgrenOct 10, 2017
  13. i18n: add a missing space in messageJean-Noel Avila, Oct 8, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.