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

[PATCH v2 04/22] i18n: transport: mark strings for translation

From
Vasco Almeida <vascomalmeida@sapo.pt>
Date
May 23, 2016, 19:27 UTC
Message-ID
<1464031661-18988-5-git-send-email-vascomalmeida@sapo.pt>
In-Reply-To
<1464031661-18988-1-git-send-email-vascomalmeida@sapo.pt>
Mark one printf string and one error string for translation.
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
---
 transport.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/transport.c b/transport.c
index 095e61f..59b911e 100644
--- a/transport.c
+++ b/transport.c
@@ -59,7 +59,7 @@ static void set_upstreams(struct transport *transport, struct ref *refs,
 				localname + 11, transport->remote->name,
 				remotename);
 		else
-			printf("Would set upstream of '%s' to '%s' of '%s'\n",
+			printf(_("Would set upstream of '%s' to '%s' of '%s'\n"),
 				localname + 11, remotename + 11,
 				transport->remote->name);
 	}
@@ -148,7 +148,7 @@ static int set_git_option(struct git_transport_options *opts,
 			char *end;
 			opts->depth = strtol(value, &end, 0);
 			if (*end)
-				die("transport: invalid depth option '%s'", value);
+				die(_("transport: invalid depth option '%s'"), value);
 		}
 		return 0;
 	}
@@ -767,19 +767,19 @@ static void die_with_unpushed_submodules(struct string_list *needs_pushing)
 {
 	int i;
 
-	fprintf(stderr, "The following submodule paths contain changes that can\n"
-			"not be found on any remote:\n");
+	fprintf(stderr, _("The following submodule paths contain changes that can\n"
+			"not be found on any remote:\n"));
 	for (i = 0; i < needs_pushing->nr; i++)
 		printf("  %s\n", needs_pushing->items[i].string);
-	fprintf(stderr, "\nPlease try\n\n"
-			"	git push --recurse-submodules=on-demand\n\n"
-			"or cd to the path and use\n\n"
-			"	git push\n\n"
-			"to push them to a remote.\n\n");
+	fprintf(stderr, _("\nPlease try\n\n"
+			  "	git push --recurse-submodules=on-demand\n\n"
+			  "or cd to the path and use\n\n"
+			  "	git push\n\n"
+			  "to push them to a remote.\n\n"));
 
 	string_list_clear(needs_pushing, 0);
 
-	die("Aborting.");
+	die(_("Aborting."));
 }
 
 static int run_pre_push_hook(struct transport *transport,
-- 
2.7.3
Previous: Vasco AlmeidaNext: Vasco Almeida
Message 6 of 38 in “i18n and test updates”
  1. 00/22 i18n and test updatesVasco Almeida, May 23, 2016
  2. 01/22 i18n: builtin/remote.c: fix mark for translationVasco Almeida, May 23, 2016
  3. 02/22 i18n: advice: mark string about detached head for translationVasco Almeida, May 23, 2016
  4. Vasco AlmeidaMay 30, 2016
  5. 03/22 i18n: advice: internationalize message for conflictsVasco Almeida, May 23, 2016
  6. 04/22 i18n: transport: mark strings for translationVasco Almeida, May 23, 2016
  7. 05/22 i18n: sequencer: mark entire sentences for translationVasco Almeida, May 23, 2016
  8. 06/22 i18n: sequencer: mark string for translationVasco Almeida, May 23, 2016
  9. 07/22 i18n: merge-octopus: mark messages for translationVasco Almeida, May 23, 2016
  10. 08/22 merge-octupus: use die shell function from git-sh-setup.shVasco Almeida, May 23, 2016
  11. 09/22 i18n: rebase: fix marked string to use eval_gettext variantVasco Almeida, May 23, 2016
  12. 10/22 i18n: rebase: mark placeholder for translationVasco Almeida, May 23, 2016
  13. 11/22 i18n: bisect: simplify error message for i18nVasco Almeida, May 23, 2016
  14. 12/22 t6030: update to use test_i18ncmpVasco Almeida, May 23, 2016
  15. 13/22 i18n: git-sh-setup.sh: mark strings for translationVasco Almeida, May 23, 2016
  16. Junio C HamanoMay 26, 2016
  17. Vasco AlmeidaMay 27, 2016
  18. 14/22 i18n: rebase-interactive: mark strings for translationVasco Almeida, May 23, 2016
  19. Junio C HamanoMay 26, 2016
  20. Vasco AlmeidaMay 27, 2016
  21. Junio C HamanoMay 27, 2016
  22. 15/22 i18n: rebase-interactive: mark here-doc strings for translationVasco Almeida, May 23, 2016
  23. Vasco AlmeidaMay 25, 2016
  24. 16/22 i18n: rebase-interactive: mark comments of squash for translationVasco Almeida, May 23, 2016
  25. Junio C HamanoMay 26, 2016
  26. Vasco AlmeidaMay 27, 2016
  27. 17/22 i18n: setup: mark strings for translationVasco Almeida, May 23, 2016
  28. 18/22 tests: use test_i18n* functions to suppress false positivesVasco Almeida, May 23, 2016
  29. Junio C HamanoMay 27, 2016
  30. Vasco AlmeidaMay 27, 2016
  31. Junio C HamanoMay 27, 2016
  32. 19/22 tests: unpack-trees: update to use test_i18n* functionsVasco Almeida, May 23, 2016
  33. 20/22 t9003: become resilient to GETTEXT_POISONVasco Almeida, May 23, 2016
  34. 21/22 t4153: fix negated test_i18ngrep callVasco Almeida, May 23, 2016
  35. 22/22 t5523: use test_i18ngrep for negationVasco Almeida, May 23, 2016
  36. Junio C HamanoMay 27, 2016
  37. Vasco AlmeidaMay 28, 2016
  38. Junio C HamanoMay 30, 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.