archive-zip.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
02f3fe5a9a7ba89223df2ebd8661aa8fa7102be9
1 file changed
+7
-7
archive-zip.c
+7
-7
@@ -309,11 +309,11 @@ static int write_zip_entry(struct archiver_args *args,
309
if (is_utf8(path))
310
flags |= ZIP_UTF8;
311
else
312
- warning("path is not valid UTF-8: %s", path);
312
+ warning(_("path is not valid UTF-8: %s"), path);
313
}
314
315
if (pathlen > 0xffff) {
316
- return error("path too long (%d chars, SHA1: %s): %s",
316
+ return error(_("path too long (%d chars, SHA1: %s): %s"),
317
(int)pathlen, oid_to_hex(oid), path);
318
}
319
@@ -340,7 +340,7 @@ static int write_zip_entry(struct archiver_args *args,
340
size > big_file_threshold) {
341
stream = open_istream(oid, &type, &size, NULL);
342
if (!stream)
343
- return error("cannot stream blob %s",
343
+ return error(_("cannot stream blob %s"),
344
oid_to_hex(oid));
345
flags |= ZIP_STREAM;
346
out = buffer = NULL;
@@ -348,7 +348,7 @@ static int write_zip_entry(struct archiver_args *args,
348
buffer = object_file_to_archive(args, path, oid, mode,
349
&type, &size);
350
if (!buffer)
351
- return error("cannot read %s",
351
+ return error(_("cannot read %s"),
352
oid_to_hex(oid));
353
crc = crc32(crc, buffer, size);
354
is_binary = entry_is_binary(path_without_prefix,
@@ -357,7 +357,7 @@ static int write_zip_entry(struct archiver_args *args,
357
}
358
compressed_size = (method == 0) ? size : 0;
359
} else {
360
- return error("unsupported file mode: 0%o (SHA1: %s)", mode,
360
+ return error(_("unsupported file mode: 0%o (SHA1: %s)"), mode,
361
oid_to_hex(oid));
362
}
363
@@ -466,7 +466,7 @@ static int write_zip_entry(struct archiver_args *args,
466
zstream.avail_in = readlen;
467
result = git_deflate(&zstream, 0);
468
if (result != Z_OK)
469
- die("deflate error (%d)", result);
469
+ die(_("deflate error (%d)"), result);
470
out_len = zstream.next_out - compressed;
471
472
if (out_len > 0) {
@@ -601,7 +601,7 @@ static void dos_time(timestamp_t *timestamp, int *dos_date, int *dos_time)
601
struct tm *t;
602
603
if (date_overflows(*timestamp))
604
- die("timestamp too large for this system: %"PRItime,
604
+ die(_("timestamp too large for this system: %"PRItime),
605
*timestamp);
606
time = (time_t)*timestamp;
607
t = localtime(&time);