Skip to content

Commit 8aa8c14

Browse files
pcloudsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c670b1f commit 8aa8c14

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

git.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -338,27 +338,27 @@ static int handle_alias(int *argcp, const char ***argv)
338338
if (ret >= 0) /* normal exit */
339339
exit(ret);
340340

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);
343343
}
344344
count = split_cmdline(alias_string, &new_argv);
345345
if (count < 0)
346-
die("Bad alias.%s string: %s", alias_command,
346+
die(_("bad alias.%s string: %s"), alias_command,
347347
split_cmdline_strerror(count));
348348
option_count = handle_options(&new_argv, &count, &envchanged);
349349
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);
353353
memmove(new_argv - option_count, new_argv,
354354
count * sizeof(char *));
355355
new_argv -= option_count;
356356

357357
if (count < 1)
358-
die("empty alias for %s", alias_command);
358+
die(_("empty alias for %s"), alias_command);
359359

360360
if (!strcmp(alias_command, new_argv[0]))
361-
die("recursive alias: %s", alias_command);
361+
die(_("recursive alias: %s"), alias_command);
362362

363363
trace_argv_printf(new_argv,
364364
"trace: alias expansion: %s =>",
@@ -409,7 +409,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
409409

410410
if (!help && get_super_prefix()) {
411411
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);
413413
}
414414

415415
if (!help && p->option & NEED_WORK_TREE)
@@ -433,11 +433,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
433433

434434
/* Check for ENOSPC and EIO errors.. */
435435
if (fflush(stdout))
436-
die_errno("write failure on standard output");
436+
die_errno(_("write failure on standard output"));
437437
if (ferror(stdout))
438-
die("unknown write failure on standard output");
438+
die(_("unknown write failure on standard output"));
439439
if (fclose(stdout))
440-
die_errno("close failed on standard output");
440+
die_errno(_("close failed on standard output"));
441441
return 0;
442442
}
443443

@@ -648,7 +648,7 @@ static void execv_dashed_external(const char **argv)
648648
int status;
649649

650650
if (get_super_prefix())
651-
die("%s doesn't support --super-prefix", argv[0]);
651+
die(_("%s doesn't support --super-prefix"), argv[0]);
652652

653653
if (use_pager == -1 && !is_builtin(argv[0]))
654654
use_pager = check_pager_config(argv[0]);
@@ -760,7 +760,7 @@ int cmd_main(int argc, const char **argv)
760760
if (skip_prefix(cmd, "git-", &cmd)) {
761761
argv[0] = cmd;
762762
handle_builtin(argc, argv);
763-
die("cannot handle %s as a builtin", cmd);
763+
die(_("cannot handle %s as a builtin"), cmd);
764764
}
765765

766766
/* Look for flags.. */
@@ -773,7 +773,7 @@ int cmd_main(int argc, const char **argv)
773773
} else {
774774
/* The user didn't specify a command; give them help */
775775
commit_pager_choice();
776-
printf("usage: %s\n\n", git_usage_string);
776+
printf(_("usage: %s\n\n"), git_usage_string);
777777
list_common_cmds_help();
778778
printf("\n%s\n", _(git_more_info_string));
779779
exit(1);

0 commit comments

Comments
 (0)