diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-04 22:33:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-04 22:33:31 +0100 |
commit | 3813a89faee3ecb111aa206f68b46618ec853e4e (patch) | |
tree | 488acb52008ebfe2fa525cf535e6f2df66977e29 /parse-options-cb.c | |
parent | Sync with Git 2.20.1 (diff) | |
parent | fsck: mark strings for translation (diff) | |
download | git-3813a89faee3ecb111aa206f68b46618ec853e4e.tar.xz git-3813a89faee3ecb111aa206f68b46618ec853e4e.zip |
Merge branch 'nd/i18n'
More _("i18n") markings.
* nd/i18n:
fsck: mark strings for translation
fsck: reduce word legos to help i18n
parse-options.c: mark more strings for translation
parse-options.c: turn some die() to BUG()
parse-options: replace opterror() with optname()
repack: mark more strings for translation
remote.c: mark messages for translation
remote.c: turn some error() or die() to BUG()
reflog: mark strings for translation
read-cache.c: add missing colon separators
read-cache.c: mark more strings for translation
read-cache.c: turn die("internal error") to BUG()
attr.c: mark more string for translation
archive.c: mark more strings for translation
alias.c: mark split_cmdline_strerror() strings for translation
git.c: mark more strings for translation
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r-- | parse-options-cb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/parse-options-cb.c b/parse-options-cb.c index 8c9edce52f..e2f3eaed07 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -18,7 +18,8 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset) } else { v = strtol(arg, (char **)&arg, 10); if (*arg) - return opterror(opt, "expects a numerical value", 0); + return error(_("option `%s' expects a numerical value"), + opt->long_name); if (v && v < MINIMUM_ABBREV) v = MINIMUM_ABBREV; else if (v > 40) @@ -47,8 +48,8 @@ int parse_opt_color_flag_cb(const struct option *opt, const char *arg, arg = unset ? "never" : (const char *)opt->defval; value = git_config_colorbool(NULL, arg); if (value < 0) - return opterror(opt, - "expects \"always\", \"auto\", or \"never\"", 0); + return error(_("option `%s' expects \"always\", \"auto\", or \"never\""), + opt->long_name); *(int *)opt->value = value; return 0; } |