i18n: mark more index-pack 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
Aug 31, 2012 at 19:13 UTC
f350df429fc664129c3a600f0142287ed13a48f7
1 file changed
+11
-10
builtin/index-pack.c
+11
-10
@@ -291,7 +291,7 @@ static void parse_pack_header(void)
291
if (hdr->hdr_signature != htonl(PACK_SIGNATURE))
292
die(_("pack signature mismatch"));
293
if (!pack_version_ok(hdr->hdr_version))
294
- die("pack version %"PRIu32" unsupported",
294
+ die(_("pack version %"PRIu32" unsupported"),
295
ntohl(hdr->hdr_version));
296
297
nr_objects = ntohl(hdr->hdr_entries);
@@ -1061,7 +1061,8 @@ static void resolve_deltas(void)
1061
int ret = pthread_create(&thread_data[i].thread, NULL,
1062
threaded_second_pass, thread_data + i);
1063
if (ret)
1064
- die("unable to create thread: %s", strerror(ret));
1064
+ die(_("unable to create thread: %s"),
1065
+ strerror(ret));
1066
}
1067
for (i = 0; i < nr_threads; i++)
1068
pthread_join(thread_data[i].thread, NULL);
@@ -1108,7 +1109,7 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
1109
* sizeof(*objects));
1110
f = sha1fd(output_fd, curr_pack);
1111
fix_unresolved_deltas(f, nr_unresolved);
1111
- sprintf(msg, "completed with %d local objects",
1112
+ sprintf(msg, _("completed with %d local objects"),
1113
nr_objects - nr_objects_initial);
1114
stop_progress_msg(&progress, msg);
1115
sha1close(f, tail_sha1, 0);
@@ -1117,8 +1118,8 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
1118
curr_pack, nr_objects,
1119
read_sha1, consumed_bytes-20);
1120
if (hashcmp(read_sha1, tail_sha1) != 0)
1120
- die("Unexpected tail checksum for %s "
1121
- "(disk corruption?)", curr_pack);
1121
+ die(_("Unexpected tail checksum for %s "
1122
+ "(disk corruption?)"), curr_pack);
1123
}
1124
if (nr_deltas != nr_resolved_deltas)
1125
die(Q_("pack has %d unresolved delta",
@@ -1327,17 +1328,17 @@ static int git_index_pack_config(const char *k, const char *v, void *cb)
1328
if (!strcmp(k, "pack.indexversion")) {
1329
opts->version = git_config_int(k, v);
1330
if (opts->version > 2)
1330
- die("bad pack.indexversion=%"PRIu32, opts->version);
1331
+ die(_("bad pack.indexversion=%"PRIu32), opts->version);
1332
return 0;
1333
}
1334
if (!strcmp(k, "pack.threads")) {
1335
nr_threads = git_config_int(k, v);
1336
if (nr_threads < 0)
1336
- die("invalid number of threads specified (%d)",
1337
+ die(_("invalid number of threads specified (%d)"),
1338
nr_threads);
1339
#ifdef NO_PTHREADS
1340
if (nr_threads != 1)
1340
- warning("no threads support, ignoring %s", k);
1341
+ warning(_("no threads support, ignoring %s"), k);
1342
nr_threads = 1;
1343
#endif
1344
return 0;
@@ -1510,8 +1511,8 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
1511
usage(index_pack_usage);
1512
#ifdef NO_PTHREADS
1513
if (nr_threads != 1)
1513
- warning("no threads support, "
1514
- "ignoring %s", arg);
1514
+ warning(_("no threads support, "
1515
+ "ignoring %s"), arg);
1516
nr_threads = 1;
1517
#endif
1518
} else if (!prefixcmp(arg, "--pack_header=")) {