Subject: Re: [PATCH] rebase: make warning less passive aggressive

From: Junio C Hamano <[email-masked]>
Date: Wed, 21 Feb 2024 17:43:05 -0800

Junio C Hamano <[email-masked]> writes:

> Jean-Noël AVILA <[email-masked]> writes:
>
>> As a translator, I'm less bothered by editing a sentence to remove a question 
>> mark (maybe enforcing a language style and reformulating the sentence by the 
>> way), than by translating again and again similar sentences.
>
> Sure, but if the original in C locale used to be "FOO BAR?" and you
> translated it to "foo bar?" in your language, and then a patch
> updates the string in the source to "FOO BAR", doesn't msgmerge
> notice that the original as a "fuzzy" matching and offer you
> something like
>
>     #, fuzzy
>     msgid "FOO BAR"
>     msgstr "foo bar?"
>
> so that all you have to do is to remove '?' anyway?  So I do not
> think you'd need to translate the "FOO BAR" part again and again.
>
> But the above assumes that for your language, the ONLY thing to turn
> such a rhetorical "passive aggressive" question into grammatically
> correct statement of a fact is to remove the question mark.  It may
> not be universally true for all languages, and for some language,
> even after msgmerge did its job correctly, you may need to do more
> than just removing the question mark to adjust the remaining "foo
> bar" part.

Hopefully the last message on this topic from me.  I just tried this:

 * apply v2 of "No rebase in progress?" -> "no rebase in progress"
   patch from Harmen.  This only changed _("") string, without
   touching any po/* files.

 * follow po/README.md and pretend as if I were a po/es.po team
   member, which involved running the command:

	$ make po-update PO_FILE=po/es.po

 * view the resulting po/es.po, which will be the starting point of
   a new translation.

        $ git diff po/es.po

The last one showed me this snippet:

    -msgid "No rebase in progress?"
    +#: builtin/rebase.c:1257
    +#, fuzzy
    +msgid "no rebase in progress"
     msgstr "¿No hay rebase en progreso?"

The "#, fuzzy" thing is a signal that an old msgid has been updated
and corresponding msgstr may need to be updated.

The primary problem I had with Harmen's v1 was that it touched po/
file in the first place (which was corrected in v2), but the updates
to po files it did looked like so:

    -msgid "No rebase in progress?"
    +msgid "No rebase in progress"
     msgstr "¿No hay rebase en progreso?"

Notice the lack of "#, fuzzy" marking?  If v1 were accepted with
these changes, then the "po-update" step I showed earlier would have
produced something like this instead:

    +#: builtin/rebase.c:1257
     msgid "no rebase in progress"
     msgstr "¿No hay rebase en progreso?"

As msgid alone was updated already, the "po-update" step has no idea
that the translated msgstr is out of date.  We do not get the
helpful "#, fuzzy" comment to tell the translator which msgstr is
out of date and needs attention.

So it is another reason why we want the developers to concentrate
only on writing good C-locale messages inside _("") and N_(""),
without touching po/ directory at all.  It would avoid making
changes that can confuse toolchain l10n people rely on (like the
presence of "fuzzy" comments).