Code

gettextize: git-revert "Your local changes" message
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 7 Sep 2010 13:33:18 +0000 (13:33 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:58:14 +0000 (07:58 +0000)
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 <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/revert.c
t/t3501-revert-cherry-pick.sh

index d33ea300a3d2b6d254f6d3a04eac06d4bb00c76e..515fcf6913fe72dc9f0688d01fb83f165413c108 100644 (file)
@@ -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");
+               }
        }
 }
 
index bc7aedd0484ed5ad1115cac0f22943445d658f47..b12b1b47b30b9008781dc07b82b1894414e6d868 100755 (executable)
@@ -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 &&