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

[PATCH 07/22] commit-graph.c: mark more strings for translation

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jun 2, 2018, 04:32 UTC
Message-ID
<20180602043241.9941-8-pclouds@gmail.com>
In-Reply-To
<20180602043241.9941-1-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 commit-graph.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/commit-graph.c b/commit-graph.c
index 4c6127088f..5a300535b2 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -76,28 +76,28 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
 
 	if (graph_size < GRAPH_MIN_SIZE) {
 		close(fd);
-		die("graph file %s is too small", graph_file);
+		die(_("graph file %s is too small"), graph_file);
 	}
 	graph_map = xmmap(NULL, graph_size, PROT_READ, MAP_PRIVATE, fd, 0);
 	data = (const unsigned char *)graph_map;
 
 	graph_signature = get_be32(data);
 	if (graph_signature != GRAPH_SIGNATURE) {
-		error("graph signature %X does not match signature %X",
+		error(_("graph signature %X does not match signature %X"),
 		      graph_signature, GRAPH_SIGNATURE);
 		goto cleanup_fail;
 	}
 
 	graph_version = *(unsigned char*)(data + 4);
 	if (graph_version != GRAPH_VERSION) {
-		error("graph version %X does not match version %X",
+		error(_("graph version %X does not match version %X"),
 		      graph_version, GRAPH_VERSION);
 		goto cleanup_fail;
 	}
 
 	hash_version = *(unsigned char*)(data + 5);
 	if (hash_version != GRAPH_OID_VERSION) {
-		error("hash version %X does not match version %X",
+		error(_("hash version %X does not match version %X"),
 		      hash_version, GRAPH_OID_VERSION);
 		goto cleanup_fail;
 	}
@@ -121,7 +121,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
 		chunk_lookup += GRAPH_CHUNKLOOKUP_WIDTH;
 
 		if (chunk_offset > graph_size - GIT_MAX_RAWSZ) {
-			error("improper chunk offset %08x%08x", (uint32_t)(chunk_offset >> 32),
+			error(_("improper chunk offset %08x%08x"), (uint32_t)(chunk_offset >> 32),
 			      (uint32_t)chunk_offset);
 			goto cleanup_fail;
 		}
@@ -157,7 +157,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
 		}
 
 		if (chunk_repeated) {
-			error("chunk id %08x appears multiple times", chunk_id);
+			error(_("chunk id %08x appears multiple times"), chunk_id);
 			goto cleanup_fail;
 		}
 
@@ -243,7 +243,7 @@ static struct commit_list **insert_parent_or_die(struct commit_graph *g,
 	hashcpy(oid.hash, g->chunk_oid_lookup + g->hash_len * pos);
 	c = lookup_commit(&oid);
 	if (!c)
-		die("could not find commit %s", oid_to_hex(&oid));
+		die(_("could not find commit %s"), oid_to_hex(&oid));
 	c->graph_pos = pos;
 	return &commit_list_insert(c, pptr)->next;
 }
@@ -516,7 +516,7 @@ static int add_packed_commits(const struct object_id *oid,
 
 	oi.typep = &type;
 	if (packed_object_info(the_repository, pack, offset, &oi) < 0)
-		die("unable to get type of object %s", oid_to_hex(oid));
+		die(_("unable to get type of object %s"), oid_to_hex(oid));
 
 	if (type != OBJ_COMMIT)
 		return 0;
@@ -624,9 +624,9 @@ void write_commit_graph(const char *obj_dir,
 			strbuf_addstr(&packname, pack_indexes[i]);
 			p = add_packed_git(packname.buf, packname.len, 1);
 			if (!p)
-				die("error adding pack %s", packname.buf);
+				die(_("error adding pack %s"), packname.buf);
 			if (open_pack_index(p))
-				die("error opening index for %s", packname.buf);
+				die(_("error opening index for %s"), packname.buf);
 			for_each_object_in_pack(p, add_packed_commits, &oids);
 			close_pack(p);
 		}
-- 
2.18.0.rc0.309.g77c7720784
Previous: Eric SunshineNext: Nguyễn Thái Ngọc Duy
Message 15 of 64 in “Mark more strings for translation”
  1. 00/22 Mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  2. 01/22 archive-tar.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  3. 02/22 archive-zip.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  4. Duy NguyenJun 2, 2018
  5. brian m. carlsonJun 3, 2018
  6. 03/22 builtin/config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  7. Eric SunshineJun 3, 2018
  8. Duy NguyenJun 3, 2018
  9. 05/22 builtin/pack-objects.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  10. 04/22 builtin/grep.c: mark strings for translation and no full stopsNguyễn Thái Ngọc Duy, Jun 2, 2018
  11. 09/22 connect.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  12. Eric SunshineJun 3, 2018
  13. 08/22 config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  14. Eric SunshineJun 3, 2018
  15. 07/22 commit-graph.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  16. 14/22 object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  17. 13/22 exec-cmd.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  18. 12/22 environment.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  19. 11/22 dir.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  20. Eric SunshineJun 3, 2018
  21. 10/22 convert.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  22. Eric SunshineJun 3, 2018
  23. 06/22 builtin/replace.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  24. Eric SunshineJun 3, 2018
  25. 22/22 transport-helper.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  26. Eric SunshineJun 3, 2018
  27. 21/22 transport.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  28. Eric SunshineJun 3, 2018
  29. Duy NguyenJun 3, 2018
  30. 20/22 sha1-file.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  31. Eric SunshineJun 3, 2018
  32. 19/22 sequencer.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  33. Eric SunshineJun 3, 2018
  34. Duy NguyenJun 3, 2018
  35. Eric SunshineJun 3, 2018
  36. 18/22 replace-object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  37. 17/22 refspec.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  38. 16/22 refs.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  39. Eric SunshineJun 3, 2018
  40. 15/22 pkt-line.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 2, 2018
  41. 00/23 Mark strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  42. 01/23 Update messages in preparation for i18nNguyễn Thái Ngọc Duy, Jun 3, 2018
  43. 04/23 builtin/config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  44. 11/23 convert.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  45. 14/23 exec-cmd.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  46. 12/23 dir.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  47. 20/23 sequencer.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  48. 21/23 sha1-file.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  49. 18/23 refspec.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  50. 22/23 transport.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  51. 19/23 replace-object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  52. 23/23 transport-helper.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  53. 13/23 environment.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  54. 17/23 refs.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  55. 03/23 archive-zip.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  56. 15/23 object.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  57. 10/23 connect.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  58. 16/23 pkt-line.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  59. 02/23 archive-tar.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  60. 09/23 config.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  61. 05/23 builtin/grep.c: mark strings for translation and no full stopsNguyễn Thái Ngọc Duy, Jun 3, 2018
  62. 07/23 builtin/replace.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  63. 08/23 commit-graph.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018
  64. 06/23 builtin/pack-objects.c: mark more strings for translationNguyễn Thái Ngọc Duy, Jun 3, 2018

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.