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

Re: [PATCH] Make a colon translatable

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 12, 2022, 16:32 UTC
Message-ID
<xmqq35iicle2.fsf@gitster.g>
In-Reply-To
<220412.86tuayhga7.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 20 quoted lines
>>> --- a/wt-status.c
>>> +++ b/wt-status.c
>>> @@ -248,7 +248,7 @@ static void wt_longstatus_print_other_header(struct wt_status *s,
>>>  					     const char *how)
>>>  {
>>>  	const char *c = color(WT_STATUS_HEADER, s);
>>> -	status_printf_ln(s, c, "%s:", what);
>>> +	status_printf_ln(s, c, "%s", what);
>>
>> I.e. this one is better handled by
>>
>> 	status_printf_ln(s, c, _("%s:"), what);
>>
>> as _(...) in C-locale is original-language centric, where we want
>> the label to be <phrase> immediately followed by a colon.  And that
>> allows French translation to have nbsp before the colon.
>
> In this case I think the change as suggested is better, translators get
> zero context from "%s:", whereas "Untracked files:" being status output
> is immediately obvious.
It is unclear if you read the original (and discussion so far).

I understand that Julien wants to turn "%s:" to have nonbreaking whitespace before the colon. It does not matter what label we are using (it can be "Ignored files"). I took it that the patch is addressing "git status" output but the general thrust is in Julien's translation, all "label-string followed by colon" should become "the string followed by nonbreaking whitespace followed by colon".

Moving the colon to the label string is backwards, isn't it? If the presentation form accepted in the C-locale, i.e. "%s:", needs to be localized in Julien's translation to "%s :", shouldn't the "%s:" that defines the presentation be what is marked for translation?

Show 5 quoted lines
> His commit message also doesn't mention it, but for existing "headings"
> we already do this, e.g.:
>
>     status_printf_ln(s, c, _("Changes to be committed:"));
>     status_printf_ln(s, c, _("Changes not staged for commit:"));

That's another arugment to translate _("%s:") once for the language, I would think.

Previous: Ævar Arnfjörð BjarmasonNext: Jean-Noël Avila
Message 4 of 8 in “Make a colon translatable”
  1. Make a colon translatableJulien Palard, Apr 11, 2022
  2. Junio C HamanoApr 11, 2022
  3. Ævar Arnfjörð BjarmasonApr 12, 2022
  4. Junio C HamanoApr 12, 2022
  5. Jean-Noël AvilaApr 13, 2022
  6. Junio C HamanoApr 13, 2022
  7. Julien PalardApr 12, 2022
  8. Junio C HamanoApr 12, 2022

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.