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

[PATCH 2/6] i18n: connect: mark die messages for translation

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
Sep 19, 2016, 13:08 UTC
Message-ID
<1474290501-2743-2-git-send-email-vascomalmeida@sapo.pt>
In-Reply-To
<1474290501-2743-1-git-send-email-vascomalmeida@sapo.pt>
Mark messages passed to die() in die_initial_contact().
Update test to reflect changes.
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 connect.c            | 8 ++++----
 t/t5512-ls-remote.sh | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/connect.c b/connect.c
index 722dc3f..06bff0b 100644
--- a/connect.c
+++ b/connect.c
@@ -46,11 +46,11 @@ int check_ref_type(const struct ref *ref, int flags)
 static void die_initial_contact(int got_at_least_one_head)
 {
 	if (got_at_least_one_head)
-		die("The remote end hung up upon initial contact");
+		die(_("The remote end hung up upon initial contact"));
 	else
-		die("Could not read from remote repository.\n\n"
-		    "Please make sure you have the correct access rights\n"
-		    "and the repository exists.");
+		die(_("Could not read from remote repository.\n\n"
+		      "Please make sure you have the correct access rights\n"
+		      "and the repository exists."));
 }
 
 static void parse_one_symref_info(struct string_list *symref, const char *val, int len)
diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index 819b9dd..c23434b 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -99,7 +99,7 @@ test_expect_success 'confuses pattern as remote when no remote specified' '
 	# We could just as easily have used "master"; the "*" emphasizes its
 	# role as a pattern.
 	test_must_fail git ls-remote refs*master >actual 2>&1 &&
-	test_cmp exp actual
+	test_i18ncmp exp actual
 '
 
 test_expect_success 'die with non-2 for wrong repository even with --exit-code' '
-- 
2.7.4
Previous: Vasco AlmeidaNext: Vasco Almeida
Message 2 of 11 in “i18n: commit: mark message for translation”
  1. 1/6 i18n: commit: mark message for translationVasco Almeida, Sep 19, 2016
  2. 2/6 i18n: connect: mark die messages for translationVasco Almeida, Sep 19, 2016
  3. 4/6 i18n: ident: mark hint for translationVasco Almeida, Sep 19, 2016
  4. 3/6 i18n: diff: mark die errors for translationVasco Almeida, Sep 19, 2016
  5. 5/6 i18n: notes-merge: mark die messages for translationVasco Almeida, Sep 19, 2016
  6. 6/6 i18n: stash: mark messages for translationVasco Almeida, Sep 19, 2016
  7. Junio C HamanoSep 19, 2016
  8. Jean-Noël AVILASep 19, 2016
  9. Junio C HamanoSep 19, 2016
  10. Jean-Noël AVILASep 20, 2016
  11. Junio C HamanoSep 21, 2016

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.