Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git.c: mark more strings for translation
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 10 Nov 2018 05:16:00 +0000
(06:16 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 12 Nov 2018 05:47:09 +0000
(14:47 +0900)
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>
git.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
c670b1f
)
diff --git
a/git.c
b/git.c
index adac132956e995e2dfe050b0f709ff9aaa9c7673..5fd30da09315ad99049c4b216caa03e82ba79f32 100644
(file)
--- a/
git.c
+++ b/
git.c
@@
-338,27
+338,27
@@
static int handle_alias(int *argcp, const char ***argv)
if (ret >= 0) /* normal exit */
exit(ret);
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)
}
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)
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)
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]))
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 =>",
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))
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)
}
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))
/* 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))
if (ferror(stdout))
- die(
"unknown write failure on standard output"
);
+ die(
_("unknown write failure on standard output")
);
if (fclose(stdout))
if (fclose(stdout))
- die_errno(
"close failed on standard output"
);
+ die_errno(
_("close failed on standard output")
);
return 0;
}
return 0;
}
@@
-648,7
+648,7
@@
static void execv_dashed_external(const char **argv)
int status;
if (get_super_prefix())
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]);
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);
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.. */
}
/* 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();
} 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);
list_common_cmds_help();
printf("\n%s\n", _(git_more_info_string));
exit(1);