{"thread":{"id":"57136","subject":"[PATCH v4] fetch-pack: parameterize message containing 'ready' keyword","startedAt":"2021-12-22T07:58:28Z","lastAt":"2021-12-23T01:24:08Z","messageCount":3,"participants":["Bagas Sanjaya","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":4,"patchTotal":null},"messages":[{"id":"444754","messageId":"20211222075805.19027-1-bagasdotme@gmail.com","threadId":"57136","inReplyTo":null,"subject":"[PATCH v4] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-12-22T07:58:06Z","receivedAt":"2021-12-22T07:58:28Z","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 v3 [1]:\n   - Comment style fix (suggested by Junio)\n\n [1]: https://lore.kernel.org/git/xmqqwnl0gkks.fsf@gitster.g/T/#u\n\n fetch-pack.c | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)\n\ndiff --git a/fetch-pack.c b/fetch-pack.c\nindex 34987a2c30..51385cb3c9 100644\n--- a/fetch-pack.c\n+++ b/fetch-pack.c\n@@ -1415,9 +1415,17 @@ 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/*\n+\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n+\t\t * keyword.\n+\t\t */\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/*\n+\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n+\t\t * keyword.\n+\t\t */\n+\t\tdie(_(\"expected no other sections to be sent after '%s'\"), \"ready\");\n \n \treturn 0;\n }\n\nbase-commit: 69a9c10c95e28df457e33b3c7400b16caf2e2962\n-- \nAn old man doll... just what I always wanted! - Clara\n\n"},{"id":"444755","messageId":"211222.86a6gtoyg2.gmgdl@evledraar.gmail.com","threadId":"57136","inReplyTo":"20211222075805.19027-1-bagasdotme@gmail.com","subject":"Re: [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-12-22T08:06:30Z","receivedAt":"2021-12-22T08:06:58Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Dec 22 2021, Bagas Sanjaya wrote:\n\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>  Changes since v3 [1]:\n>    - Comment style fix (suggested by Junio)\n>\n>  [1]: https://lore.kernel.org/git/xmqqwnl0gkks.fsf@gitster.g/T/#u\n>\n>  fetch-pack.c | 12 ++++++++++--\n>  1 file changed, 10 insertions(+), 2 deletions(-)\n>\n> diff --git a/fetch-pack.c b/fetch-pack.c\n> index 34987a2c30..51385cb3c9 100644\n> --- a/fetch-pack.c\n> +++ b/fetch-pack.c\n> @@ -1415,9 +1415,17 @@ 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/*\n> +\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n> +\t\t * keyword.\n> +\t\t */\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/*\n> +\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n> +\t\t * keyword.\n> +\t\t */\n> +\t\tdie(_(\"expected no other sections to be sent after '%s'\"), \"ready\");\n>  \n>  \treturn 0;\n>  }\n>\n> base-commit: 69a9c10c95e28df457e33b3c7400b16caf2e2962\n\nThis version (and earlier ones, really) looks good to me. Thanks!\n"},{"id":"444850","messageId":"xmqqtuf0cdvw.fsf@gitster.g","threadId":"57136","inReplyTo":"211222.86a6gtoyg2.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v4] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-12-23T01:24:03Z","receivedAt":"2021-12-23T01:24:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>> diff --git a/fetch-pack.c b/fetch-pack.c\n>> index 34987a2c30..51385cb3c9 100644\n>> --- a/fetch-pack.c\n>> +++ b/fetch-pack.c\n>> @@ -1415,9 +1415,17 @@ 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/*\n>> +\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n>> +\t\t * keyword.\n>> +\t\t */\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/*\n>> +\t\t * TRANSLATORS: The parameter will be 'ready', a protocol\n>> +\t\t * keyword.\n>> +\t\t */\n>> +\t\tdie(_(\"expected no other sections to be sent after '%s'\"), \"ready\");\n>>  \n>>  \treturn 0;\n>>  }\n>>\n>> base-commit: 69a9c10c95e28df457e33b3c7400b16caf2e2962\n>\n> This version (and earlier ones, really) looks good to me. Thanks!\n\nTrusting your ack wasted me one integration cycle by not looking at\nit myself X-<.\n\nThere is \"no\" missing from the latter message.\n\nBack to finishing today's (belated) integration cycle.  Hopefully I\ncan finish before dinner.\n\nThanks.\n"}]}