1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 06:47:52 +01:00

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:
Junio C Hamano 2016-08-25 13:55:07 -07:00
commit 0fd6c99bdf
3 changed files with 20 additions and 71 deletions

View file

@ -652,46 +652,34 @@ int git_parse_ulong(const char *value, unsigned long *ret)
NORETURN
static void die_bad_number(const char *name, const char *value)
{
const char * error_type = (errno == ERANGE)? _("out of range"):_("invalid unit");
if (!value)
value = "";
if (!(cf && cf->name))
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s': out of range")
: _("bad numeric config value '%s' for '%s': invalid unit"),
value, name);
die(_("bad numeric config value '%s' for '%s': %s"),
value, name, error_type);
switch (cf->origin_type) {
case CONFIG_ORIGIN_BLOB:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in blob %s: out of range")
: _("bad numeric config value '%s' for '%s' in blob %s: invalid unit"),
value, name, cf->name);
die(_("bad numeric config value '%s' for '%s' in blob %s: %s"),
value, name, cf->name, error_type);
case CONFIG_ORIGIN_FILE:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in file %s: out of range")
: _("bad numeric config value '%s' for '%s' in file %s: invalid unit"),
value, name, cf->name);
die(_("bad numeric config value '%s' for '%s' in file %s: %s"),
value, name, cf->name, error_type);
case CONFIG_ORIGIN_STDIN:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in standard input: out of range")
: _("bad numeric config value '%s' for '%s' in standard input: invalid unit"),
value, name);
die(_("bad numeric config value '%s' for '%s' in standard input: %s"),
value, name, error_type);
case CONFIG_ORIGIN_SUBMODULE_BLOB:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in submodule-blob %s: out of range")
: _("bad numeric config value '%s' for '%s' in submodule-blob %s: invalid unit"),
value, name, cf->name);
die(_("bad numeric config value '%s' for '%s' in submodule-blob %s: %s"),
value, name, cf->name, error_type);
case CONFIG_ORIGIN_CMDLINE:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in command line %s: out of range")
: _("bad numeric config value '%s' for '%s' in command line %s: invalid unit"),
value, name, cf->name);
die(_("bad numeric config value '%s' for '%s' in command line %s: %s"),
value, name, cf->name, error_type);
default:
die(errno == ERANGE
? _("bad numeric config value '%s' for '%s' in %s: out of range")
: _("bad numeric config value '%s' for '%s' in %s: invalid unit"),
value, name, cf->name);
die(_("bad numeric config value '%s' for '%s' in %s: %s"),
value, name, cf->name, error_type);
}
}

View file

@ -404,51 +404,12 @@ pick_one_preserving_merges () {
this_nth_commit_message () {
n=$1
case "$n" in
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
eval_gettext "This is the commit message #\${n}:"
}
skip_nth_commit_message () {
n=$1
case "$n" in
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
eval_gettext "The commit message #\${n} will be skipped:"
}
update_squash_messages () {

View file

@ -702,7 +702,7 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts *
if (action != opts->action) {
if (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."));
else
error((opts->action == REPLAY_REVERT)