diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-25 13:55:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-25 13:55:07 -0700 |
commit | 0fd6c99bdf72ac0c03bf4806f7540d580794215e (patch) | |
tree | 7944dc32f051950267fb0740d909814a9cbbf5e2 | |
parent | 3dc01702dfbdbfc7116a21c4a5b32f088029bacf (diff) | |
parent | 078fe30523f6361849a895999c04cf5f377a1656 (diff) | |
download | git-0fd6c99bdf72ac0c03bf4806f7540d580794215e.tar.gz |
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
-rw-r--r-- | config.c | 44 | ||||
-rw-r--r-- | git-rebase--interactive.sh | 45 | ||||
-rw-r--r-- | sequencer.c | 2 |
3 files changed, 20 insertions, 71 deletions
@@ -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); } } diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index e2da524f5a..7e558b068c 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -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 () { diff --git a/sequencer.c b/sequencer.c index 2e9c7d0f03..3804fa931d 100644 --- a/sequencer.c +++ b/sequencer.c @@ -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) |