From: Ævar Arnfjörð Bjarmason Date: Tue, 7 Sep 2010 13:33:18 +0000 (+0000) Subject: gettextize: git-revert "Your local changes" message X-Git-Tag: ko-pu~10^2~71 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6c3cae02a323c2742f9ff9488d4dcdae667498a6;p=git.git gettextize: git-revert "Your local changes" message Translate the "Your local changes [...]" message without using the `me' variable, instead split up the two messages so translators can translate the whole messages as-is. Reported-by: Jonathan Nieder Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/builtin/revert.c b/builtin/revert.c index d33ea300a..515fcf691 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -285,11 +285,19 @@ static NORETURN void die_dirty_index(const char *me) if (read_cache_unmerged()) { die_resolve_conflict(me); } else { - if (advice_commit_before_merge) - die("Your local changes would be overwritten by %s.\n" - "Please, commit your changes or stash them to proceed.", me); - else - die("Your local changes would be overwritten by %s.\n", me); + if (advice_commit_before_merge) { + if (action == REVERT) + die(_("Your local changes would be overwritten by revert.\n" + "Please, commit your changes or stash them to proceed.")); + else + die(_("Your local changes would be overwritten by cherry-pick.\n" + "Please, commit your changes or stash them to proceed.")); + } else { + if (action == REVERT) + die("Your local changes would be overwritten by revert.\n"); + else + die("Your local changes would be overwritten by cherry-pick.\n"); + } } } diff --git a/t/t3501-revert-cherry-pick.sh b/t/t3501-revert-cherry-pick.sh index bc7aedd04..b12b1b47b 100755 --- a/t/t3501-revert-cherry-pick.sh +++ b/t/t3501-revert-cherry-pick.sh @@ -81,7 +81,7 @@ test_expect_success 'revert after renaming branch' ' ' -test_expect_success 'revert forbidden on dirty working tree' ' +test_expect_success NO_GETTEXT_POISON 'revert forbidden on dirty working tree' ' echo content >extra_file && git add extra_file &&