зеркало из https://github.com/microsoft/git.git
Merge branch 'ja/i18n'
The recent i18n patch we added during this cycle did a bit too much refactoring of the messages to avoid word-legos; the repetition has been reduced to help translators. * ja/i18n: i18n: simplify numeric error reporting i18n: fix git rebase interactive commit messages i18n: fix typos for translation
This commit is contained in:
Коммит
0fd6c99bdf
44
config.c
44
config.c
|
@ -652,46 +652,34 @@ int git_parse_ulong(const char *value, unsigned long *ret)
|
||||||
NORETURN
|
NORETURN
|
||||||
static void die_bad_number(const char *name, const char *value)
|
static void die_bad_number(const char *name, const char *value)
|
||||||
{
|
{
|
||||||
|
const char * error_type = (errno == ERANGE)? _("out of range"):_("invalid unit");
|
||||||
|
|
||||||
if (!value)
|
if (!value)
|
||||||
value = "";
|
value = "";
|
||||||
|
|
||||||
if (!(cf && cf->name))
|
if (!(cf && cf->name))
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s': %s"),
|
||||||
? _("bad numeric config value '%s' for '%s': out of range")
|
value, name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s': invalid unit"),
|
|
||||||
value, name);
|
|
||||||
|
|
||||||
switch (cf->origin_type) {
|
switch (cf->origin_type) {
|
||||||
case CONFIG_ORIGIN_BLOB:
|
case CONFIG_ORIGIN_BLOB:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in blob %s: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in blob %s: out of range")
|
value, name, cf->name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in blob %s: invalid unit"),
|
|
||||||
value, name, cf->name);
|
|
||||||
case CONFIG_ORIGIN_FILE:
|
case CONFIG_ORIGIN_FILE:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in file %s: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in file %s: out of range")
|
value, name, cf->name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in file %s: invalid unit"),
|
|
||||||
value, name, cf->name);
|
|
||||||
case CONFIG_ORIGIN_STDIN:
|
case CONFIG_ORIGIN_STDIN:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in standard input: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in standard input: out of range")
|
value, name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in standard input: invalid unit"),
|
|
||||||
value, name);
|
|
||||||
case CONFIG_ORIGIN_SUBMODULE_BLOB:
|
case CONFIG_ORIGIN_SUBMODULE_BLOB:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in submodule-blob %s: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in submodule-blob %s: out of range")
|
value, name, cf->name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in submodule-blob %s: invalid unit"),
|
|
||||||
value, name, cf->name);
|
|
||||||
case CONFIG_ORIGIN_CMDLINE:
|
case CONFIG_ORIGIN_CMDLINE:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in command line %s: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in command line %s: out of range")
|
value, name, cf->name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in command line %s: invalid unit"),
|
|
||||||
value, name, cf->name);
|
|
||||||
default:
|
default:
|
||||||
die(errno == ERANGE
|
die(_("bad numeric config value '%s' for '%s' in %s: %s"),
|
||||||
? _("bad numeric config value '%s' for '%s' in %s: out of range")
|
value, name, cf->name, error_type);
|
||||||
: _("bad numeric config value '%s' for '%s' in %s: invalid unit"),
|
|
||||||
value, name, cf->name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,51 +404,12 @@ pick_one_preserving_merges () {
|
||||||
|
|
||||||
this_nth_commit_message () {
|
this_nth_commit_message () {
|
||||||
n=$1
|
n=$1
|
||||||
case "$n" in
|
eval_gettext "This is the commit message #\${n}:"
|
||||||
1) gettext "This is the 1st commit message:";;
|
|
||||||
2) gettext "This is the 2nd commit message:";;
|
|
||||||
3) gettext "This is the 3rd commit message:";;
|
|
||||||
4) gettext "This is the 4th commit message:";;
|
|
||||||
5) gettext "This is the 5th commit message:";;
|
|
||||||
6) gettext "This is the 6th commit message:";;
|
|
||||||
7) gettext "This is the 7th commit message:";;
|
|
||||||
8) gettext "This is the 8th commit message:";;
|
|
||||||
9) gettext "This is the 9th commit message:";;
|
|
||||||
10) gettext "This is the 10th commit message:";;
|
|
||||||
# TRANSLATORS: if the language you are translating into
|
|
||||||
# doesn't allow you to compose a sentence in this fashion,
|
|
||||||
# consider translating as if this and the following few strings
|
|
||||||
# were "This is the commit message ${n}:"
|
|
||||||
*1[0-9]|*[04-9]) eval_gettext "This is the \${n}th commit message:";;
|
|
||||||
*1) eval_gettext "This is the \${n}st commit message:";;
|
|
||||||
*2) eval_gettext "This is the \${n}nd commit message:";;
|
|
||||||
*3) eval_gettext "This is the \${n}rd commit message:";;
|
|
||||||
*) eval_gettext "This is the commit message \${n}:";;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
skip_nth_commit_message () {
|
skip_nth_commit_message () {
|
||||||
n=$1
|
n=$1
|
||||||
case "$n" in
|
eval_gettext "The commit message #\${n} will be skipped:"
|
||||||
1) gettext "The 1st commit message will be skipped:";;
|
|
||||||
2) gettext "The 2nd commit message will be skipped:";;
|
|
||||||
3) gettext "The 3rd commit message will be skipped:";;
|
|
||||||
4) gettext "The 4th commit message will be skipped:";;
|
|
||||||
5) gettext "The 5th commit message will be skipped:";;
|
|
||||||
6) gettext "The 6th commit message will be skipped:";;
|
|
||||||
7) gettext "The 7th commit message will be skipped:";;
|
|
||||||
8) gettext "The 8th commit message will be skipped:";;
|
|
||||||
9) gettext "The 9th commit message will be skipped:";;
|
|
||||||
10) gettext "The 10th commit message will be skipped:";;
|
|
||||||
# TRANSLATORS: if the language you are translating into
|
|
||||||
# doesn't allow you to compose a sentence in this fashion,
|
|
||||||
# consider translating as if this and the following few strings
|
|
||||||
# were "The commit message ${n} will be skipped:"
|
|
||||||
*1[0-9]|*[04-9]) eval_gettext "The \${n}th commit message will be skipped:";;
|
|
||||||
*1) eval_gettext "The \${n}st commit message will be skipped:";;
|
|
||||||
*2) eval_gettext "The \${n}nd commit message will be skipped:";;
|
|
||||||
*3) eval_gettext "The \${n}rd commit message will be skipped:";;
|
|
||||||
*) eval_gettext "The commit message \${n} will be skipped:";;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
update_squash_messages () {
|
update_squash_messages () {
|
||||||
|
|
|
@ -702,7 +702,7 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts *
|
||||||
if (action != opts->action) {
|
if (action != opts->action) {
|
||||||
if (action == REPLAY_REVERT)
|
if (action == REPLAY_REVERT)
|
||||||
error((opts->action == REPLAY_REVERT)
|
error((opts->action == REPLAY_REVERT)
|
||||||
? _("Cannot revert during a another revert.")
|
? _("Cannot revert during another revert.")
|
||||||
: _("Cannot revert during a cherry-pick."));
|
: _("Cannot revert during a cherry-pick."));
|
||||||
else
|
else
|
||||||
error((opts->action == REPLAY_REVERT)
|
error((opts->action == REPLAY_REVERT)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче