summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:20:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-17 22:45:48 (GMT)
commit9b0df093f6e9959bf8e788012d724a74f5f15a21 (patch)
tree3e727805901b4c33001b567bd60678cbea5dbba8 /sequencer.c
parent7ab1d44f3316ccab63c5df39fda36ba9b74c4068 (diff)
downloadgit-9b0df093f6e9959bf8e788012d724a74f5f15a21.zip
git-9b0df093f6e9959bf8e788012d724a74f5f15a21.tar.gz
git-9b0df093f6e9959bf8e788012d724a74f5f15a21.tar.bz2
i18n: sequencer: mark entire sentences for translation
Mark entire sentences of error message rather than assembling one using placeholders (e.g. "Cannot %s during a %s"). That would facilitate translation work because it is easier to translate a entire sentence than translating pieces. We would have better translations at the expense of source code verbosity. Moreover, translators can now 1) translate the terms "revert" and "cherry-pick" if they please 2) have more leeway to adapt their translations. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index 4687ad4..88a7c78 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -697,9 +697,14 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts *
* opts; we don't support arbitrary instructions
*/
if (action != opts->action) {
- const char *action_str;
- action_str = action == REPLAY_REVERT ? "revert" : "cherry-pick";
- error(_("Cannot %s during a %s"), action_str, action_name(opts));
+ if (action == REPLAY_REVERT)
+ error((opts->action == REPLAY_REVERT)
+ ? _("Cannot revert during a another revert.")
+ : _("Cannot revert during a cherry-pick."));
+ else
+ error((opts->action == REPLAY_REVERT)
+ ? _("Cannot cherry-pick during a revert.")
+ : _("Cannot cherry-pick during another cherry-pick."));
return NULL;
}