All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword
@ 2021-12-22  7:58 Bagas Sanjaya
  2021-12-22  8:06 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 3+ messages in thread
From: Bagas Sanjaya @ 2021-12-22  7:58 UTC (permalink / raw)
  To: git
  Cc: Ævar Arnfjörð Bjarmason, Eric Sunshine,
	Junio C Hamano, 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 v3 [1]:
   - Comment style fix (suggested by Junio)

 [1]: https://lore.kernel.org/git/xmqqwnl0gkks.fsf@gitster.g/T/#u

 fetch-pack.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index 34987a2c30..51385cb3c9 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1415,9 +1415,17 @@ 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 '%s'"), "ready");
 
 	return 0;
 }

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


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

* Re: [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword
  2021-12-22  7:58 [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword Bagas Sanjaya
@ 2021-12-22  8:06 ` Ævar Arnfjörð Bjarmason
  2021-12-23  1:24   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-12-22  8:06 UTC (permalink / raw)
  To: Bagas Sanjaya; +Cc: git, Eric Sunshine, Junio C Hamano


On Wed, Dec 22 2021, Bagas Sanjaya 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>
> ---
>  Changes since v3 [1]:
>    - Comment style fix (suggested by Junio)
>
>  [1]: https://lore.kernel.org/git/xmqqwnl0gkks.fsf@gitster.g/T/#u
>
>  fetch-pack.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/fetch-pack.c b/fetch-pack.c
> index 34987a2c30..51385cb3c9 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -1415,9 +1415,17 @@ 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 '%s'"), "ready");
>  
>  	return 0;
>  }
>
> base-commit: 69a9c10c95e28df457e33b3c7400b16caf2e2962

This version (and earlier ones, really) looks good to me. Thanks!

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

* Re: [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword
  2021-12-22  8:06 ` Ævar Arnfjörð Bjarmason
@ 2021-12-23  1:24   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2021-12-23  1:24 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: Bagas Sanjaya, git, Eric Sunshine

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>> diff --git a/fetch-pack.c b/fetch-pack.c
>> index 34987a2c30..51385cb3c9 100644
>> --- a/fetch-pack.c
>> +++ b/fetch-pack.c
>> @@ -1415,9 +1415,17 @@ 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 '%s'"), "ready");
>>  
>>  	return 0;
>>  }
>>
>> base-commit: 69a9c10c95e28df457e33b3c7400b16caf2e2962
>
> This version (and earlier ones, really) looks good to me. Thanks!

Trusting your ack wasted me one integration cycle by not looking at
it myself X-<.

There is "no" missing from the latter message.

Back to finishing today's (belated) integration cycle.  Hopefully I
can finish before dinner.

Thanks.

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

end of thread, other threads:[~2021-12-23  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22  7:58 [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword Bagas Sanjaya
2021-12-22  8:06 ` Ævar Arnfjörð Bjarmason
2021-12-23  1:24   ` Junio C Hamano

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.