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

[PATCH 18/22] submodule.c: mark strings for translation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Feb 27, 2016, 06:42 UTC
Message-ID
<1456555333-5853-19-git-send-email-pclouds@gmail.com>
In-Reply-To
<1456555333-5853-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 submodule.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/submodule.c b/submodule.c
index 24fb81a..4dd6ab3 100644
--- a/submodule.c
+++ b/submodule.c
@@ -187,7 +187,7 @@ void gitmodules_config(void)
 		strbuf_addstr(&gitmodules_path, work_tree);
 		strbuf_addstr(&gitmodules_path, "/.gitmodules");
 		if (read_cache() < 0)
-			die("index file corrupt");
+			die(_("index file corrupt"));
 		pos = cache_name_pos(".gitmodules", 11);
 		if (pos < 0) { /* .gitmodules not found or isn't merged */
 			pos = -1 - pos;
@@ -224,7 +224,7 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt,
 	else if (!strcmp(arg, "dirty"))
 		DIFF_OPT_SET(diffopt, IGNORE_DIRTY_SUBMODULES);
 	else if (strcmp(arg, "none"))
-		die("bad --ignore-submodules argument: %s", arg);
+		die(_("bad --ignore-submodules argument: %s"), arg);
 }
 
 static int prepare_submodule_summary(struct rev_info *rev, const char *path,
@@ -372,7 +372,7 @@ static int submodule_needs_pushing(const char *path, const unsigned char sha1[20
 		cp.out = -1;
 		cp.dir = path;
 		if (start_command(&cp))
-			die("Could not run 'git rev-list %s --not --remotes -n 1' command in submodule %s",
+			die(_("Could not run 'git rev-list %s --not --remotes -n 1' command in submodule %s"),
 				sha1_to_hex(sha1), path);
 		if (strbuf_read(&buf, cp.out, 41))
 			needs_pushing = 1;
@@ -431,7 +431,7 @@ int find_unpushed_submodules(unsigned char new_sha1[20],
 	argv[3] = remotes_arg.buf;
 	setup_revisions(argc, argv, &rev, NULL);
 	if (prepare_revision_walk(&rev))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 
 	while ((commit = get_revision(&rev)) != NULL)
 		find_unpushed_submodule_commits(commit, needs_pushing);
@@ -583,7 +583,7 @@ static void calculate_changed_submodule_paths(void)
 				   add_sha1_to_argv, &argv);
 	setup_revisions(argv.argc, argv.argv, &rev, NULL);
 	if (prepare_revision_walk(&rev))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 
 	/*
 	 * Collect all submodules (whether checked out or not) for which new
@@ -685,7 +685,7 @@ static int get_next_submodule(struct child_process *cp,
 			cp->env = local_repo_env;
 			cp->git_cmd = 1;
 			if (!spf->quiet)
-				strbuf_addf(err, "Fetching submodule %s%s\n",
+				strbuf_addf(err, _("Fetching submodule %s%s\n"),
 					    spf->prefix, ce->name);
 			argv_array_init(&cp->args);
 			argv_array_pushv(&cp->args, spf->args.argv);
@@ -743,7 +743,7 @@ int fetch_populated_submodules(const struct argv_array *options,
 		goto out;
 
 	if (read_cache() < 0)
-		die("index file corrupt");
+		die(_("index file corrupt"));
 
 	argv_array_push(&spf.args, "fetch");
 	for (i = 0; i < options->argc; i++)
@@ -801,7 +801,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
 	cp.out = -1;
 	cp.dir = path;
 	if (start_command(&cp))
-		die("Could not run 'git status --porcelain' in submodule %s", path);
+		die(_("Could not run 'git status --porcelain' in submodule %s"), path);
 
 	len = strbuf_read(&buf, cp.out, 1024);
 	line = buf.buf;
@@ -826,7 +826,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked)
 	close(cp.out);
 
 	if (finish_command(&cp))
-		die("'git status --porcelain' failed in submodule %s", path);
+		die(_("'git status --porcelain' failed in submodule %s"), path);
 
 	strbuf_release(&buf);
 	return dirty_submodule;
@@ -895,7 +895,7 @@ int ok_to_remove_submodule(const char *path)
 	cp.out = -1;
 	cp.dir = path;
 	if (start_command(&cp))
-		die("Could not run 'git status --porcelain -uall --ignore-submodules=none' in submodule %s", path);
+		die(_("Could not run 'git status --porcelain -uall --ignore-submodules=none' in submodule %s"), path);
 
 	len = strbuf_read(&buf, cp.out, 1024);
 	if (len > 2)
@@ -903,7 +903,7 @@ int ok_to_remove_submodule(const char *path)
 	close(cp.out);
 
 	if (finish_command(&cp))
-		die("'git status --porcelain -uall --ignore-submodules=none' failed in submodule %s", path);
+		die(_("'git status --porcelain -uall --ignore-submodules=none' failed in submodule %s"), path);
 
 	strbuf_release(&buf);
 	return ok_to_remove;
@@ -935,7 +935,7 @@ static int find_first_merges(struct object_array *result, const char *path,
 
 	/* save all revisions from the above list that contain b */
 	if (prepare_revision_walk(&revs))
-		die("revision walk setup failed");
+		die(_("revision walk setup failed"));
 	while ((commit = get_revision(&revs)) != NULL) {
 		struct object *o = &(commit->object);
 		if (in_merge_bases(b, commit))
@@ -978,7 +978,7 @@ static void print_commit(struct commit *commit)
 }
 
 #define MERGE_WARNING(path, msg) \
-	warning("Failed to merge submodule %s (%s)", path, msg);
+	warning(_("Failed to merge submodule %s (%s)"), path, msg);
 
 int merge_submodule(unsigned char result[20], const char *path,
 		    const unsigned char base[20], const unsigned char a[20],
-- 
2.8.0.rc0.205.g7ec8cf1
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 38 of 46 in “Mark more strings for translation”
  1. 00/22 Mark more strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  2. 01/22 credential-cache--daemon: enable localized messagesNguyễn Thái Ngọc Duy, Feb 27, 2016
  3. 02/22 builtin/blame.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  4. Junio C HamanoFeb 28, 2016
  5. Duy NguyenFeb 29, 2016
  6. Junio C HamanoFeb 29, 2016
  7. 03/22 builtin/checkout.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  8. Junio C HamanoFeb 28, 2016
  9. 04/22 builtin/clone.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  10. Junio C HamanoFeb 28, 2016
  11. 05/22 builtin/config.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  12. Junio C HamanoFeb 29, 2016
  13. 06/22 builtin/config.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  14. 07/22 builtin/update-index.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  15. Junio C HamanoFeb 29, 2016
  16. 08/22 convert.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  17. Junio C HamanoFeb 29, 2016
  18. 09/22 credential-cache--daemon.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  19. Junio C HamanoFeb 29, 2016
  20. 10/22 http.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  21. Junio C HamanoFeb 29, 2016
  22. 11/22 ident.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  23. Junio C HamanoFeb 29, 2016
  24. Jeff KingMar 1, 2016
  25. 12/22 notes.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  26. Junio C HamanoFeb 29, 2016
  27. 13/22 ref-filter.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  28. Junio C HamanoFeb 29, 2016
  29. 14/22 refs/files-backend.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  30. Junio C HamanoFeb 29, 2016
  31. Duy NguyenMar 1, 2016
  32. 15/22 remote-curl.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  33. Junio C HamanoFeb 29, 2016
  34. 16/22 run-command.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  35. Junio C HamanoFeb 29, 2016
  36. Stefan BellerMar 1, 2016
  37. 17/22 sha1_file.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  38. 18/22 submodule.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  39. 19/22 trailer.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  40. Junio C HamanoFeb 29, 2016
  41. 20/22 transport-helper.c: mark strings for translatingNguyễn Thái Ngọc Duy, Feb 27, 2016
  42. 21/22 transport.c: mark strings for translatingNguyễn Thái Ngọc Duy, Feb 27, 2016
  43. 22/22 wrapper.c: mark strings for translationNguyễn Thái Ngọc Duy, Feb 27, 2016
  44. Junio C HamanoFeb 27, 2016
  45. Junio C HamanoFeb 27, 2016
  46. Duy NguyenFeb 28, 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.