All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword
@ 2021-11-18 10:34 Bagas Sanjaya
  2021-11-18 11:42 ` Eric Sunshine
  0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2021-11-18 10:34 UTC (permalink / raw)
  To: git; +Cc: Jonathan Tan, Ævar Arnfjörð Bjarmason, Bagas Sanjaya

The protocol keyword 'ready' isn't meant for translation. Pass it as
parameter instead of spell it in die() message (and potentially confuse
translators).

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Changes since v1 [1]:
   - Parameterize message (suggested by Ævar)

 [1]:
https://lore.kernel.org/git/20211114073143.84004-1-bagasdotme@gmail.com/T/#u
 fetch-pack.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index a9604f35a3..b8a20778bb 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,
 	 * otherwise.
 	 */
 	if (*received_ready && reader->status != PACKET_READ_DELIM)
-		die(_("expected packfile to be sent after 'ready'"));
+		/* TRANSLATORS: The parameter will be 'ready', a protocol
+		 * keyword */
+		die(_("expected packfile to be sent after '%s"), "ready");
 	if (!*received_ready && reader->status != PACKET_READ_FLUSH)
-		die(_("expected no other sections to be sent after no 'ready'"));
+		/* TRANSLATORS: The parameter will be 'ready', a protocol
+		 * keyword */
+		die(_("expected no other sections to be sent after no '%s"), "ready");
 
 	return 0;
 }

base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword
  2021-11-18 10:34 [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword Bagas Sanjaya
@ 2021-11-18 11:42 ` Eric Sunshine
  2021-11-18 13:21   ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sunshine @ 2021-11-18 11:42 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Git List, Jonathan Tan, Ævar Arnfjörð Bjarmason

On Thu, Nov 18, 2021 at 5:35 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> The protocol keyword 'ready' isn't meant for translation. Pass it as
> parameter instead of spell it in die() message (and potentially confuse
> translators).
>
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
> diff --git a/fetch-pack.c b/fetch-pack.c
> @@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,
>         if (*received_ready && reader->status != PACKET_READ_DELIM)
> -               die(_("expected packfile to be sent after 'ready'"));
> +               /* TRANSLATORS: The parameter will be 'ready', a protocol
> +                * keyword */
> +               die(_("expected packfile to be sent after '%s"), "ready");

Missing closing single-quote after %s.

>         if (!*received_ready && reader->status != PACKET_READ_FLUSH)
> -               die(_("expected no other sections to be sent after no 'ready'"));
> +               /* TRANSLATORS: The parameter will be 'ready', a protocol
> +                * keyword */
> +               die(_("expected no other sections to be sent after no '%s"), "ready");

Missing closing single-quote after %s.

>         return 0;
>  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword
  2021-11-18 11:42 ` Eric Sunshine
@ 2021-11-18 13:21   ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-11-18 13:21 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Bagas Sanjaya, Git List, Jonathan Tan


On Thu, Nov 18 2021, Eric Sunshine wrote:

> On Thu, Nov 18, 2021 at 5:35 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:
>> The protocol keyword 'ready' isn't meant for translation. Pass it as
>> parameter instead of spell it in die() message (and potentially confuse
>> translators).
>>
>> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
>> ---
>> diff --git a/fetch-pack.c b/fetch-pack.c
>> @@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,
>>         if (*received_ready && reader->status != PACKET_READ_DELIM)
>> -               die(_("expected packfile to be sent after 'ready'"));
>> +               /* TRANSLATORS: The parameter will be 'ready', a protocol
>> +                * keyword */
>> +               die(_("expected packfile to be sent after '%s"), "ready");
>
> Missing closing single-quote after %s.
>
>>         if (!*received_ready && reader->status != PACKET_READ_FLUSH)
>> -               die(_("expected no other sections to be sent after no 'ready'"));
>> +               /* TRANSLATORS: The parameter will be 'ready', a protocol
>> +                * keyword */
>> +               die(_("expected no other sections to be sent after no '%s"), "ready");
>
> Missing closing single-quote after %s.

Also s/be sent after no/be sent after/, i.e. there's a stray "no".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-18 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 10:34 [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword Bagas Sanjaya
2021-11-18 11:42 ` Eric Sunshine
2021-11-18 13:21   ` Ævar Arnfjörð Bjarmason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.