object.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
42246589b8e7e504251fc6a04cfa5614b5ee3d76
2 files changed
+6
-6
object.c
+5
-5
@@ -49,7 +49,7 @@ int type_from_string_gently(const char *str, ssize_t len, int gentle)
49
if (gentle)
50
return -1;
51
52
- die("invalid object type \"%s\"", str);
52
+ die(_("invalid object type \"%s\""), str);
53
}
54
55
/*
@@ -169,7 +169,7 @@ void *object_as_type(struct object *obj, enum object_type type, int quiet)
169
}
170
else {
171
if (!quiet)
172
- error("object %s is a %s, not a %s",
172
+ error(_("object %s is a %s, not a %s"),
173
oid_to_hex(&obj->oid),
174
type_name(obj->type), type_name(type));
175
return NULL;
@@ -229,7 +229,7 @@ struct object *parse_object_buffer(const struct object_id *oid, enum object_type
229
obj = &tag->object;
230
}
231
} 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);
233
obj = NULL;
234
}
235
return obj;
@@ -262,7 +262,7 @@ struct object *parse_object(const struct object_id *oid)
262
(!obj && has_object_file(oid) &&
263
oid_object_info(the_repository, oid, NULL) == OBJ_BLOB)) {
264
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));
266
return NULL;
267
}
268
parse_blob_buffer(lookup_blob(oid), NULL, 0);
@@ -273,7 +273,7 @@ struct object *parse_object(const struct object_id *oid)
273
if (buffer) {
274
if (check_object_signature(repl, buffer, size, type_name(type)) < 0) {
275
free(buffer);
276
- error("sha1 mismatch %s", oid_to_hex(repl));
276
+ error(_("sha1 mismatch %s"), oid_to_hex(repl));
277
return NULL;
278
}
279
t/t1450-fsck.sh
+1
-1
@@ -372,7 +372,7 @@ test_expect_success 'rev-list --verify-objects with bad sha1' '
372
373
test_might_fail git rev-list --verify-objects refs/heads/bogus >/dev/null 2>out &&
374
cat out &&
375
- grep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
375
+ test_i18ngrep -q "error: sha1 mismatch 63ffffffffffffffffffffffffffffffffffffff" out
376
'
377
378
test_expect_success 'force fsck to ignore double author' '