commit-graph.c: mark more strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Jul 21, 2018 at 09:49 UTC
4f5b532d18ad61d8b96d65b4f8d2321cf154d066
1 file changed
+10
-10
commit-graph.c
+10
-10
@@ -77,28 +77,28 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
77
78
if (graph_size < GRAPH_MIN_SIZE) {
79
close(fd);
80
- die("graph file %s is too small", graph_file);
80
+ die(_("graph file %s is too small"), graph_file);
81
}
82
graph_map = xmmap(NULL, graph_size, PROT_READ, MAP_PRIVATE, fd, 0);
83
data = (const unsigned char *)graph_map;
84
85
graph_signature = get_be32(data);
86
if (graph_signature != GRAPH_SIGNATURE) {
87
- error("graph signature %X does not match signature %X",
87
+ error(_("graph signature %X does not match signature %X"),
88
graph_signature, GRAPH_SIGNATURE);
89
goto cleanup_fail;
90
}
91
92
graph_version = *(unsigned char*)(data + 4);
93
if (graph_version != GRAPH_VERSION) {
94
- error("graph version %X does not match version %X",
94
+ error(_("graph version %X does not match version %X"),
95
graph_version, GRAPH_VERSION);
96
goto cleanup_fail;
97
}
98
99
hash_version = *(unsigned char*)(data + 5);
100
if (hash_version != GRAPH_OID_VERSION) {
101
- error("hash version %X does not match version %X",
101
+ error(_("hash version %X does not match version %X"),
102
hash_version, GRAPH_OID_VERSION);
103
goto cleanup_fail;
104
}
@@ -122,7 +122,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
122
chunk_lookup += GRAPH_CHUNKLOOKUP_WIDTH;
123
124
if (chunk_offset > graph_size - GIT_MAX_RAWSZ) {
125
- error("improper chunk offset %08x%08x", (uint32_t)(chunk_offset >> 32),
125
+ error(_("improper chunk offset %08x%08x"), (uint32_t)(chunk_offset >> 32),
126
(uint32_t)chunk_offset);
127
goto cleanup_fail;
128
}
@@ -158,7 +158,7 @@ struct commit_graph *load_commit_graph_one(const char *graph_file)
158
}
159
160
if (chunk_repeated) {
161
- error("chunk id %08x appears multiple times", chunk_id);
161
+ error(_("chunk id %08x appears multiple times"), chunk_id);
162
goto cleanup_fail;
163
}
164
@@ -244,7 +244,7 @@ static struct commit_list **insert_parent_or_die(struct commit_graph *g,
244
hashcpy(oid.hash, g->chunk_oid_lookup + g->hash_len * pos);
245
c = lookup_commit(&oid);
246
if (!c)
247
- die("could not find commit %s", oid_to_hex(&oid));
247
+ die(_("could not find commit %s"), oid_to_hex(&oid));
248
c->graph_pos = pos;
249
return &commit_list_insert(c, pptr)->next;
250
}
@@ -537,7 +537,7 @@ static int add_packed_commits(const struct object_id *oid,
537
538
oi.typep = &type;
539
if (packed_object_info(the_repository, pack, offset, &oi) < 0)
540
- die("unable to get type of object %s", oid_to_hex(oid));
540
+ die(_("unable to get type of object %s"), oid_to_hex(oid));
541
542
if (type != OBJ_COMMIT)
543
return 0;
@@ -683,9 +683,9 @@ void write_commit_graph(const char *obj_dir,
683
strbuf_addstr(&packname, pack_indexes[i]);
684
p = add_packed_git(packname.buf, packname.len, 1);
685
if (!p)
686
- die("error adding pack %s", packname.buf);
686
+ die(_("error adding pack %s"), packname.buf);
687
if (open_pack_index(p))
688
- die("error opening index for %s", packname.buf);
688
+ die(_("error opening index for %s"), packname.buf);
689
for_each_object_in_pack(p, add_packed_commits, &oids);
690
close_pack(p);
691
}