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>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2018-11-10 06:16:00 +01:00 committed by Junio C Hamano
parent c670b1f876
commit 8aa8c14097

30
git.c
View file

@ -338,27 +338,27 @@ static int handle_alias(int *argcp, const char ***argv)
if (ret >= 0) /* normal exit */
exit(ret);
die_errno("while expanding alias '%s': '%s'",
alias_command, alias_string + 1);
die_errno(_("while expanding alias '%s': '%s'"),
alias_command, alias_string + 1);
}
count = split_cmdline(alias_string, &new_argv);
if (count < 0)
die("Bad alias.%s string: %s", alias_command,
die(_("bad alias.%s string: %s"), alias_command,
split_cmdline_strerror(count));
option_count = handle_options(&new_argv, &count, &envchanged);
if (envchanged)
die("alias '%s' changes environment variables.\n"
"You can use '!git' in the alias to do this",
alias_command);
die(_("alias '%s' changes environment variables.\n"
"You can use '!git' in the alias to do this"),
alias_command);
memmove(new_argv - option_count, new_argv,
count * sizeof(char *));
new_argv -= option_count;
if (count < 1)
die("empty alias for %s", alias_command);
die(_("empty alias for %s"), alias_command);
if (!strcmp(alias_command, new_argv[0]))
die("recursive alias: %s", alias_command);
die(_("recursive alias: %s"), alias_command);
trace_argv_printf(new_argv,
"trace: alias expansion: %s =>",
@ -409,7 +409,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
if (!help && get_super_prefix()) {
if (!(p->option & SUPPORT_SUPER_PREFIX))
die("%s doesn't support --super-prefix", p->cmd);
die(_("%s doesn't support --super-prefix"), p->cmd);
}
if (!help && p->option & NEED_WORK_TREE)
@ -433,11 +433,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
/* Check for ENOSPC and EIO errors.. */
if (fflush(stdout))
die_errno("write failure on standard output");
die_errno(_("write failure on standard output"));
if (ferror(stdout))
die("unknown write failure on standard output");
die(_("unknown write failure on standard output"));
if (fclose(stdout))
die_errno("close failed on standard output");
die_errno(_("close failed on standard output"));
return 0;
}
@ -648,7 +648,7 @@ static void execv_dashed_external(const char **argv)
int status;
if (get_super_prefix())
die("%s doesn't support --super-prefix", argv[0]);
die(_("%s doesn't support --super-prefix"), argv[0]);
if (use_pager == -1 && !is_builtin(argv[0]))
use_pager = check_pager_config(argv[0]);
@ -760,7 +760,7 @@ int cmd_main(int argc, const char **argv)
if (skip_prefix(cmd, "git-", &cmd)) {
argv[0] = cmd;
handle_builtin(argc, argv);
die("cannot handle %s as a builtin", cmd);
die(_("cannot handle %s as a builtin"), cmd);
}
/* Look for flags.. */
@ -773,7 +773,7 @@ int cmd_main(int argc, const char **argv)
} else {
/* The user didn't specify a command; give them help */
commit_pager_choice();
printf("usage: %s\n\n", git_usage_string);
printf(_("usage: %s\n\n"), git_usage_string);
list_common_cmds_help();
printf("\n%s\n", _(git_more_info_string));
exit(1);