archive-tar.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
d0482e697cbe3351b9d988342963f9a2da0ba47f
1 file changed
+6
-6
archive-tar.c
+6
-6
@@ -121,7 +121,7 @@ static int stream_blocked(const struct object_id *oid)
121
122
st = open_istream(oid, &type, &sz, NULL);
123
if (!st)
124
- return error("cannot stream blob %s", oid_to_hex(oid));
124
+ return error(_("cannot stream blob %s"), oid_to_hex(oid));
125
for (;;) {
126
readlen = read_istream(st, buf, sizeof(buf));
127
if (readlen <= 0)
@@ -256,7 +256,7 @@ static int write_tar_entry(struct archiver_args *args,
256
*header.typeflag = TYPEFLAG_REG;
257
mode = (mode | ((mode & 0100) ? 0777 : 0666)) & ~tar_umask;
258
} else {
259
- return error("unsupported file mode: 0%o (SHA1: %s)",
259
+ return error(_("unsupported file mode: 0%o (SHA1: %s)"),
260
mode, oid_to_hex(oid));
261
}
262
if (pathlen > sizeof(header.name)) {
@@ -283,7 +283,7 @@ static int write_tar_entry(struct archiver_args *args,
283
enum object_type type;
284
buffer = object_file_to_archive(args, path, oid, old_mode, &type, &size);
285
if (!buffer)
286
- return error("cannot read %s", oid_to_hex(oid));
286
+ return error(_("cannot read %s"), oid_to_hex(oid));
287
} else {
288
buffer = NULL;
289
size = 0;
@@ -454,17 +454,17 @@ static int write_tar_filter_archive(const struct archiver *ar,
454
filter.in = -1;
455
456
if (start_command(&filter) < 0)
457
- die_errno("unable to start '%s' filter", argv[0]);
457
+ die_errno(_("unable to start '%s' filter"), argv[0]);
458
close(1);
459
if (dup2(filter.in, 1) < 0)
460
- die_errno("unable to redirect descriptor");
460
+ die_errno(_("unable to redirect descriptor"));
461
close(filter.in);
462
463
r = write_tar_archive(ar, args);
464
465
close(1);
466
if (finish_command(&filter) != 0)
467
- die("'%s' filter reported error", argv[0]);
467
+ die(_("'%s' filter reported error"), argv[0]);
468
469
strbuf_release(&cmd);
470
return r;