Skip to content

Commit 4224658

Browse files
pcloudsgitster
authored andcommitted
object.c: mark more strings for translation
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 31a55e9 commit 4224658

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

object.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int type_from_string_gently(const char *str, ssize_t len, int gentle)
4949
if (gentle)
5050
return -1;
5151

52-
die("invalid object type \"%s\"", str);
52+
die(_("invalid object type \"%s\""), str);
5353
}
5454

5555
/*
@@ -169,7 +169,7 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet)
169169
}
170170
else {
171171
if (!quiet)
172-
error("object %s is a %s, not a %s",
172+
error(_("object %s is a %s, not a %s"),
173173
oid_to_hex(&obj->oid),
174174
type_name(obj->type), type_name(type));
175175
return NULL;
@@ -229,7 +229,7 @@ struct object *parse_object_buffer(const struct object_id *oid, enum object_type
229229
obj = &tag->object;
230230
}
231231
} else {
232-
warning("object %s has unknown type id %d", oid_to_hex(oid), type);
232+
warning(_("object %s has unknown type id %d"), oid_to_hex(oid), type);
233233
obj = NULL;
234234
}
235235
return obj;
@@ -262,7 +262,7 @@ struct object *parse_object(const struct object_id *oid)
262262
(!obj && has_object_file(oid) &&
263263
oid_object_info(the_repository, oid, NULL) == OBJ_BLOB)) {
264264
if (check_object_signature(repl, NULL, 0, NULL) < 0) {
265-
error("sha1 mismatch %s", oid_to_hex(oid));
265+
error(_("sha1 mismatch %s"), oid_to_hex(oid));
266266
return NULL;
267267
}
268268
parse_blob_buffer(lookup_blob(oid), NULL, 0);
@@ -273,7 +273,7 @@ struct object *parse_object(const struct object_id *oid)
273273
if (buffer) {
274274
if (check_object_signature(repl, buffer, size, type_name(type)) < 0) {
275275
free(buffer);
276-
error("sha1 mismatch %s", oid_to_hex(repl));
276+
error(_("sha1 mismatch %s"), oid_to_hex(repl));
277277
return NULL;
278278
}
279279

t/t1450-fsck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
372372
373373
test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
374374
cat out &&
375-
grep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
375+
test_i18ngrep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
376376
'
377377

378378
test_expect_success 'force fsck to ignore double author' '

0 commit comments

Comments
 (0)