Re: [PATCH] fetch-pack: add TRANSLATORS notice for packfile ready messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 14 2021, Bagas Sanjaya wrote:

> Two messages mention "... to be sent after 'ready'". The 'ready' string,
> however, is actually in part of packet stream, which shouldn't be
> translated. Because of lack of any notices, l10n teams treat it as
> ordinary string, which results to inconsistency across teams. That is,
> in `po/es.po` the string is translated:
>
> ```
> msgid "expected packfile to be sent after 'ready'"
> msgstr "se esperaba que el packfile fuera enviado luego del 'listo'"
>
> msgid "expected no other sections to be sent after no 'ready'"
> msgstr "se esperaba que ninguna otra sección fuera enviada luego del 'listo'"
> ```
>
> whereas in `po/fr.po` and `po/de.po`, the string isn't translated:
>
> ```
> msgid "expected packfile to be sent after 'ready'"
> msgstr "fichier paquet attendu à envoyer après 'ready'"
>
> msgid "expected no other sections to be sent after no 'ready'"
> msgstr "aucune autre section attendue à envoyer après absence de 'ready'"
> ```
>
> ```
> msgid "expected packfile to be sent after 'ready'"
> msgstr "Erwartete Versand einer Packdatei nach 'ready'."
>
> msgid "expected no other sections to be sent after no 'ready'"
> msgstr "Erwartete keinen Versand einer anderen Sektion ohne 'ready'."
> ```
>
> To avoid confusions, add TRANSLATORS notice.

Let's not and:

> Signed-off-by: Bagas Sanjaya <bagasdotme@xxxxxxxxx>
> ---
>  fetch-pack.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/fetch-pack.c b/fetch-pack.c
> index a9604f35a3..0cda8fc518 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -1410,8 +1410,12 @@ static int process_ack(struct fetch_negotiator *negotiator,
>  	 * otherwise.
>  	 */
>  	if (*received_ready && reader->status != PACKET_READ_DELIM)
> +		/* TRANSLATORS: 'ready' string is in part of packet stream.
> +		   Leave it as is. */
>  		die(_("expected packfile to be sent after 'ready'"));
>  	if (!*received_ready && reader->status != PACKET_READ_FLUSH)
> +		/* TRANSLATORS: 'ready' string is in part of packet stream.
> +		   Leave it as is. */
>
>  		die(_("expected no other sections to be sent after no 'ready'"));

If something isn't meant to be translated do this instead:

    die(_("expected no other sections to be sent after no '%s"), "ready");

I.e. pass it as a parameter.

There can then be a "TRANSLATORS" comment that explains that it's the
string "ready", in reference to that protocol keyword. We do it that way
in various other places, and it completely avoids the potential problem
of a should not be translated string being translated.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux