{"thread":{"id":"56933","subject":"[PATCH v2] fetch-pack: parameterize message containing 'ready' keyword","startedAt":"2021-11-18T10:35:34Z","lastAt":"2021-11-18T13:24:00Z","messageCount":3,"participants":["Bagas Sanjaya","Eric Sunshine","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"441591","messageId":"20211118103424.6464-1-bagasdotme@gmail.com","threadId":"56933","inReplyTo":null,"subject":"[PATCH v2] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-11-18T10:34:25Z","receivedAt":"2021-11-18T10:35:34Z","isPatch":true,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"The protocol keyword 'ready' isn't meant for translation. Pass it as\nparameter instead of spell it in die() message (and potentially confuse\ntranslators).\n\nSigned-off-by: Bagas Sanjaya <bagasdotme@gmail.com>\n---\n Changes since v1 [1]:\n   - Parameterize message (suggested by Ævar)\n\n [1]:\nhttps://lore.kernel.org/git/20211114073143.84004-1-bagasdotme@gmail.com/T/#u\n fetch-pack.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex a9604f35a3..b8a20778bb 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,\n \t * otherwise.\n \t */\n \tif (*received_ready && reader->status != PACKET_READ_DELIM)\n-\t\tdie(_(\"expected packfile to be sent after 'ready'\"));\n+\t\t/* TRANSLATORS: The parameter will be 'ready', a protocol\n+\t\t * keyword */\n+\t\tdie(_(\"expected packfile to be sent after '%s\"), \"ready\");\n \tif (!*received_ready && reader->status != PACKET_READ_FLUSH)\n-\t\tdie(_(\"expected no other sections to be sent after no 'ready'\"));\n+\t\t/* TRANSLATORS: The parameter will be 'ready', a protocol\n+\t\t * keyword */\n+\t\tdie(_(\"expected no other sections to be sent after no '%s\"), \"ready\");\n \n \treturn 0;\n }\n\nbase-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc\n-- \nAn old man doll... just what I always wanted! - Clara\n\n"},{"id":"441600","messageId":"CAPig+cTKNYCoiRiDyi-KxxvheiYJ4rAxFY7vHx-r+qNyXYHNjA@mail.gmail.com","threadId":"56933","inReplyTo":"20211118103424.6464-1-bagasdotme@gmail.com","subject":"Re: [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2021-11-18T11:42:20Z","receivedAt":"2021-11-18T11:44:37Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Nov 18, 2021 at 5:35 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:\n> The protocol keyword 'ready' isn't meant for translation. Pass it as\n> parameter instead of spell it in die() message (and potentially confuse\n> translators).\n>\n> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>\n> ---\n> diff --git a/fetch-pack.c b/fetch-pack.c\n> @@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,\n>         if (*received_ready && reader->status != PACKET_READ_DELIM)\n> -               die(_(\"expected packfile to be sent after 'ready'\"));\n> +               /* TRANSLATORS: The parameter will be 'ready', a protocol\n> +                * keyword */\n> +               die(_(\"expected packfile to be sent after '%s\"), \"ready\");\n\nMissing closing single-quote after %s.\n\n>         if (!*received_ready && reader->status != PACKET_READ_FLUSH)\n> -               die(_(\"expected no other sections to be sent after no 'ready'\"));\n> +               /* TRANSLATORS: The parameter will be 'ready', a protocol\n> +                * keyword */\n> +               die(_(\"expected no other sections to be sent after no '%s\"), \"ready\");\n\nMissing closing single-quote after %s.\n\n>         return 0;\n>  }\n"},{"id":"441604","messageId":"211118.864k8961hw.gmgdl@evledraar.gmail.com","threadId":"56933","inReplyTo":"CAPig+cTKNYCoiRiDyi-KxxvheiYJ4rAxFY7vHx-r+qNyXYHNjA@mail.gmail.com","subject":"Re: [PATCH v2] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-18T13:21:33Z","receivedAt":"2021-11-18T13:24:00Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 18 2021, Eric Sunshine wrote:\n\n> On Thu, Nov 18, 2021 at 5:35 AM Bagas Sanjaya <bagasdotme@gmail.com> wrote:\n>> The protocol keyword 'ready' isn't meant for translation. Pass it as\n>> parameter instead of spell it in die() message (and potentially confuse\n>> translators).\n>>\n>> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>\n>> ---\n>> diff --git a/fetch-pack.c b/fetch-pack.c\n>> @@ -1410,9 +1410,13 @@ static int process_ack(struct fetch_negotiator *negotiator,\n>>         if (*received_ready && reader->status != PACKET_READ_DELIM)\n>> -               die(_(\"expected packfile to be sent after 'ready'\"));\n>> +               /* TRANSLATORS: The parameter will be 'ready', a protocol\n>> +                * keyword */\n>> +               die(_(\"expected packfile to be sent after '%s\"), \"ready\");\n>\n> Missing closing single-quote after %s.\n>\n>>         if (!*received_ready && reader->status != PACKET_READ_FLUSH)\n>> -               die(_(\"expected no other sections to be sent after no 'ready'\"));\n>> +               /* TRANSLATORS: The parameter will be 'ready', a protocol\n>> +                * keyword */\n>> +               die(_(\"expected no other sections to be sent after no '%s\"), \"ready\");\n>\n> Missing closing single-quote after %s.\n\nAlso s/be sent after no/be sent after/, i.e. there's a stray \"no\".\n"}]}