git.c: mark more strings for translation

One string is slightly updated to keep consistency with the rest: die() should begin 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 8aa8c1409774ba4fd718bfa9f7f667170aa3089b
1 file changed +15 -15
git.c
+15 -15
@@ -338,27 +338,27 @@ static int handle_alias(int *argcp, const char ***argv)
338 if (ret >= 0) /* normal exit */
339 exit(ret);
340
341 - die_errno("while expanding alias '%s': '%s'",
342 - alias_command, alias_string + 1);
341 + die_errno(_("while expanding alias '%s': '%s'"),
342 + alias_command, alias_string + 1);
343 }
344 count = split_cmdline(alias_string, &new_argv);
345 if (count < 0)
346 - die("Bad alias.%s string: %s", alias_command,
346 + die(_("bad alias.%s string: %s"), alias_command,
347 split_cmdline_strerror(count));
348 option_count = handle_options(&new_argv, &count, &envchanged);
349 if (envchanged)
350 - die("alias '%s' changes environment variables.\n"
351 - "You can use '!git' in the alias to do this",
352 - alias_command);
350 + die(_("alias '%s' changes environment variables.\n"
351 + "You can use '!git' in the alias to do this"),
352 + alias_command);
353 memmove(new_argv - option_count, new_argv,
354 count * sizeof(char *));
355 new_argv -= option_count;
356
357 if (count < 1)
358 - die("empty alias for %s", alias_command);
358 + die(_("empty alias for %s"), alias_command);
359
360 if (!strcmp(alias_command, new_argv[0]))
361 - die("recursive alias: %s", alias_command);
361 + die(_("recursive alias: %s"), alias_command);
362
363 trace_argv_printf(new_argv,
364 "trace: alias expansion: %s =>",
@@ -409,7 +409,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
409
410 if (!help && get_super_prefix()) {
411 if (!(p->option & SUPPORT_SUPER_PREFIX))
412 - die("%s doesn't support --super-prefix", p->cmd);
412 + die(_("%s doesn't support --super-prefix"), p->cmd);
413 }
414
415 if (!help && p->option & NEED_WORK_TREE)
@@ -433,11 +433,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
433
434 /* Check for ENOSPC and EIO errors.. */
435 if (fflush(stdout))
436 - die_errno("write failure on standard output");
436 + die_errno(_("write failure on standard output"));
437 if (ferror(stdout))
438 - die("unknown write failure on standard output");
438 + die(_("unknown write failure on standard output"));
439 if (fclose(stdout))
440 - die_errno("close failed on standard output");
440 + die_errno(_("close failed on standard output"));
441 return 0;
442 }
443
@@ -648,7 +648,7 @@ static void execv_dashed_external(const char **argv)
648 int status;
649
650 if (get_super_prefix())
651 - die("%s doesn't support --super-prefix", argv[0]);
651 + die(_("%s doesn't support --super-prefix"), argv[0]);
652
653 if (use_pager == -1 && !is_builtin(argv[0]))
654 use_pager = check_pager_config(argv[0]);
@@ -760,7 +760,7 @@ int cmd_main(int argc, const char **argv)
760 if (skip_prefix(cmd, "git-", &cmd)) {
761 argv[0] = cmd;
762 handle_builtin(argc, argv);
763 - die("cannot handle %s as a builtin", cmd);
763 + die(_("cannot handle %s as a builtin"), cmd);
764 }
765
766 /* Look for flags.. */
@@ -773,7 +773,7 @@ int cmd_main(int argc, const char **argv)
773 } else {
774 /* The user didn't specify a command; give them help */
775 commit_pager_choice();
776 - printf("usage: %s\n\n", git_usage_string);
776 + printf(_("usage: %s\n\n"), git_usage_string);
777 list_common_cmds_help();
778 printf("\n%s\n", _(git_more_info_string));
779 exit(1);