fetch-pack: parameterize message containing 'ready' keyword

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Bagas Sanjaya committed Dec 22, 2021 at 14:58 UTC 3d3c23b3a754cf5060a93d9f777e58662cdd5ffe
1 file changed +10 -2
fetch-pack.c
+10 -2
@@ -1415,9 +1415,17 @@ static int process_ack(struct fetch_negotiator *negotiator,
1415 * otherwise.
1416 */
1417 if (*received_ready && reader->status != PACKET_READ_DELIM)
1418 - die(_("expected packfile to be sent after 'ready'"));
1418 + /*
1419 + * TRANSLATORS: The parameter will be 'ready', a protocol
1420 + * keyword.
1421 + */
1422 + die(_("expected packfile to be sent after '%s'"), "ready");
1423 if (!*received_ready && reader->status != PACKET_READ_FLUSH)
1420 - die(_("expected no other sections to be sent after no 'ready'"));
1424 + /*
1425 + * TRANSLATORS: The parameter will be 'ready', a protocol
1426 + * keyword.
1427 + */
1428 + die(_("expected no other sections to be sent after no '%s'"), "ready");
1429
1430 return 0;
1431 }