repack: mark more strings for translation

Two strings are slightly updated to be consistent with the rest: die() starts with lowercase. 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 Nov 10, 2018 at 06:16 UTC c83d950e591c393c241dcd656d14a21cd16c2b81
1 file changed +13 -13
builtin/repack.c
+13 -13
@@ -197,7 +197,7 @@ static int write_oid(const struct object_id *oid, struct packed_git *pack,
197
198 if (cmd->in == -1) {
199 if (start_command(cmd))
200 - die("Could not start pack-objects to repack promisor objects");
200 + die(_("could not start pack-objects to repack promisor objects"));
201 }
202
203 xwrite(cmd->in, oid_to_hex(oid), GIT_SHA1_HEXSZ);
@@ -236,7 +236,7 @@ static void repack_promisor_objects(const struct pack_objects_args *args,
236 char *promisor_name;
237 int fd;
238 if (line.len != 40)
239 - die("repack: Expecting 40 character sha1 lines only from pack-objects.");
239 + die(_("repack: Expecting 40 character sha1 lines only from pack-objects."));
240 string_list_append(names, line.buf);
241
242 /*
@@ -247,13 +247,13 @@ static void repack_promisor_objects(const struct pack_objects_args *args,
247 line.buf);
248 fd = open(promisor_name, O_CREAT|O_EXCL|O_WRONLY, 0600);
249 if (fd < 0)
250 - die_errno("unable to create '%s'", promisor_name);
250 + die_errno(_("unable to create '%s'"), promisor_name);
251 close(fd);
252 free(promisor_name);
253 }
254 fclose(out);
255 if (finish_command(&cmd))
256 - die("Could not finish pack-objects to repack promisor objects");
256 + die(_("could not finish pack-objects to repack promisor objects"));
257 }
258
259 #define ALL_INTO_ONE 1
@@ -408,7 +408,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
408 out = xfdopen(cmd.out, "r");
409 while (strbuf_getline_lf(&line, out) != EOF) {
410 if (line.len != 40)
411 - die("repack: Expecting 40 character sha1 lines only from pack-objects.");
411 + die(_("repack: Expecting 40 character sha1 lines only from pack-objects"));
412 string_list_append(&names, line.buf);
413 }
414 fclose(out);
@@ -417,7 +417,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
417 return ret;
418
419 if (!names.nr && !po_args.quiet)
420 - printf("Nothing new to pack.\n");
420 + printf_ln(_("Nothing new to pack."));
421
422 /*
423 * Ok we have prepared all new packfiles.
@@ -477,13 +477,13 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
477 if (rollback_failure.nr) {
478 int i;
479 fprintf(stderr,
480 - "WARNING: Some packs in use have been renamed by\n"
481 - "WARNING: prefixing old- to their name, in order to\n"
482 - "WARNING: replace them with the new version of the\n"
483 - "WARNING: file. But the operation failed, and the\n"
484 - "WARNING: attempt to rename them back to their\n"
485 - "WARNING: original names also failed.\n"
486 - "WARNING: Please rename them in %s manually:\n", packdir);
480 + _("WARNING: Some packs in use have been renamed by\n"
481 + "WARNING: prefixing old- to their name, in order to\n"
482 + "WARNING: replace them with the new version of the\n"
483 + "WARNING: file. But the operation failed, and the\n"
484 + "WARNING: attempt to rename them back to their\n"
485 + "WARNING: original names also failed.\n"
486 + "WARNING: Please rename them in %s manually:\n"), packdir);
487 for (i = 0; i < rollback_failure.nr; i++)
488 fprintf(stderr, "WARNING: old-%s -> %s\n",
489 rollback_failure.items[i].string,