{"thread":{"id":"56956","subject":"[PATCH v3] fetch-pack: parameterize message containing 'ready' keyword","startedAt":"2021-11-22T12:34:34Z","lastAt":"2021-11-22T17:35:21Z","messageCount":3,"participants":["Bagas Sanjaya","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":3,"patchTotal":null},"messages":[{"id":"441936","messageId":"20211122123415.464783-1-bagasdotme@gmail.com","threadId":"56956","inReplyTo":null,"subject":"[PATCH v3] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-11-22T12:34:14Z","receivedAt":"2021-11-22T12:34: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 v2 [1]:\n   - Add missing closing single quote after the parameter (suggested by\n     Eric)\n   - Remove stray 'no' at the second message (suggested by Ævar)\n\n [1]:\nhttps://lore.kernel.org/git/20211118103424.6464-1-bagasdotme@gmail.com/T/#u\n\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..62d6313708 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 '%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":"441941","messageId":"211122.86tug4z6ih.gmgdl@evledraar.gmail.com","threadId":"56956","inReplyTo":"20211122123415.464783-1-bagasdotme@gmail.com","subject":"Re: [PATCH v3] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-11-22T13:02:40Z","receivedAt":"2021-11-22T13:04:14Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 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 v2 [1]:\n>    - Add missing closing single quote after the parameter (suggested by\n>      Eric)\n>    - Remove stray 'no' at the second message (suggested by Ævar)\n>\n>  [1]:\n> https://lore.kernel.org/git/20211118103424.6464-1-bagasdotme@gmail.com/T/#u\n>\n>  fetch-pack.c | 8 ++++++--\n>  1 file changed, 6 insertions(+), 2 deletions(-)\n>\n> diff --git a/fetch-pack.c b/fetch-pack.c\n> index a9604f35a3..62d6313708 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 '%s'\"), \"ready\");\n>  \n>  \treturn 0;\n>  }\n>\n> base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc\n\nThis looks good to me & ready to go. Thanks for sticking with this\nacross various nits/small isues for all 3x iterations.\n\nThe TRANSLATORS comments being added here don't use our usual style, but\nI'd be happy just to leave this be & take it as-is without a re-roll,\ndon't know about Junio...\n"},{"id":"441978","messageId":"xmqqwnl0gkks.fsf@gitster.g","threadId":"56956","inReplyTo":"211122.86tug4z6ih.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v3] fetch-pack: parameterize message containing 'ready' keyword","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-11-22T17:35:15Z","receivedAt":"2021-11-22T17:35:21Z","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> On Mon, Nov 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 v2 [1]:\n>>    - Add missing closing single quote after the parameter (suggested by\n>>      Eric)\n>>    - Remove stray 'no' at the second message (suggested by Ævar)\n>>\n>>  [1]:\n>> https://lore.kernel.org/git/20211118103424.6464-1-bagasdotme@gmail.com/T/#u\n>>\n>>  fetch-pack.c | 8 ++++++--\n>>  1 file changed, 6 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/fetch-pack.c b/fetch-pack.c\n>> index a9604f35a3..62d6313708 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 '%s'\"), \"ready\");\n>>  \n>>  \treturn 0;\n>>  }\n>>\n>> base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc\n>\n> This looks good to me & ready to go. Thanks for sticking with this\n> across various nits/small isues for all 3x iterations.\n>\n> The TRANSLATORS comments being added here don't use our usual style, but\n> I'd be happy just to leave this be & take it as-is without a re-roll,\n> don't know about Junio...\n\nI think in ancient time gettext suite required \"/* TRANSLATORS:\" at\nthe beginning, which made us deliberately violate our usual\nmulti-line comment style convention, but it seems that is no longer\nthe case?  Hits from \"git grep -e '[  ]\\* TRANSLATORS \\*.c\" are\nfairly common, it seems.\n\nSo, yes, it would be better to fix these comments up, to avoid\nmisleading people into thinking that the old comment-style exception\nstill applies.\n\nThanks, both, for working on this.\n\n"}]}