git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2] fetch-pack: parameterize message containing 'ready' keyword

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Nov 18, 2021, 10:34 UTC
Message-ID
<20211118103424.6464-1-bagasdotme@gmail.com>

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 v1 [1]:
   - Parameterize message (suggested by Ævar)
 [1]:
https://lore.kernel.org/git/20211114073143.84004-1-bagasdotme@gmail.com/T/#u
 fetch-pack.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fetch-pack.c b/fetch-pack.c
index a9604f35a3..b8a20778bb 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1410,9 +1410,13 @@ 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 no '%s"), "ready");
 
 	return 0;
 }

base-commit: cd3e606211bb1cf8bc57f7d76bab98cc17a150bc
-- 
An old man doll... just what I always wanted! - Clara
Next: Eric Sunshine
Message 1 of 3 in “fetch-pack: parameterize message containing 'ready' keyword”
  1. fetch-pack: parameterize message containing 'ready' keywordBagas Sanjaya, Nov 18, 2021
  2. Eric SunshineNov 18, 2021
  3. Ævar Arnfjörð BjarmasonNov 18, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.