alias.c: mark split_cmdline_strerror() strings for translation
This function can be part of translated messages. To make sure we don't have a sentence with mixed languages, mark the strings for translation, but only use translated strings in places we know we will output translated strings. 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:
parent
8aa8c14097
commit
a7412ae134
4
alias.c
4
alias.c
@ -47,8 +47,8 @@ void list_aliases(struct string_list *list)
|
|||||||
#define SPLIT_CMDLINE_BAD_ENDING 1
|
#define SPLIT_CMDLINE_BAD_ENDING 1
|
||||||
#define SPLIT_CMDLINE_UNCLOSED_QUOTE 2
|
#define SPLIT_CMDLINE_UNCLOSED_QUOTE 2
|
||||||
static const char *split_cmdline_errors[] = {
|
static const char *split_cmdline_errors[] = {
|
||||||
"cmdline ends with \\",
|
N_("cmdline ends with \\"),
|
||||||
"unclosed quote"
|
N_("unclosed quote")
|
||||||
};
|
};
|
||||||
|
|
||||||
int split_cmdline(char *cmdline, const char ***argv)
|
int split_cmdline(char *cmdline, const char ***argv)
|
||||||
|
@ -577,7 +577,7 @@ static void parse_branch_merge_options(char *bmo)
|
|||||||
argc = split_cmdline(bmo, &argv);
|
argc = split_cmdline(bmo, &argv);
|
||||||
if (argc < 0)
|
if (argc < 0)
|
||||||
die(_("Bad branch.%s.mergeoptions string: %s"), branch,
|
die(_("Bad branch.%s.mergeoptions string: %s"), branch,
|
||||||
split_cmdline_strerror(argc));
|
_(split_cmdline_strerror(argc)));
|
||||||
REALLOC_ARRAY(argv, argc + 2);
|
REALLOC_ARRAY(argv, argc + 2);
|
||||||
MOVE_ARRAY(argv + 1, argv, argc + 1);
|
MOVE_ARRAY(argv + 1, argv, argc + 1);
|
||||||
argc++;
|
argc++;
|
||||||
|
2
git.c
2
git.c
@ -344,7 +344,7 @@ static int handle_alias(int *argcp, const char ***argv)
|
|||||||
count = split_cmdline(alias_string, &new_argv);
|
count = split_cmdline(alias_string, &new_argv);
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
die(_("bad alias.%s string: %s"), alias_command,
|
die(_("bad alias.%s string: %s"), alias_command,
|
||||||
split_cmdline_strerror(count));
|
_(split_cmdline_strerror(count)));
|
||||||
option_count = handle_options(&new_argv, &count, &envchanged);
|
option_count = handle_options(&new_argv, &count, &envchanged);
|
||||||
if (envchanged)
|
if (envchanged)
|
||||||
die(_("alias '%s' changes environment variables.\n"
|
die(_("alias '%s' changes environment variables.\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user