@matheusbsbs / matheus-bagliano / commits / d3ee177e50
Fork 0

i18n: 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 <jrnieder@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 22, 2011 at 23:42 UTC d3ee177e5059c81e0e73be091741f60ebfbce520
2 files changed +14 -6
builtin/revert.c
+13 -5
@@ -302,11 +302,19 @@ static NORETURN void die_dirty_index(const char *me)
302 if (read_cache_unmerged()) {
303 die_resolve_conflict(me);
304 } else {
305 - if (advice_commit_before_merge)
306 - die("Your local changes would be overwritten by %s.\n"
307 - "Please, commit your changes or stash them to proceed.", me);
308 - else
309 - die("Your local changes would be overwritten by %s.\n", me);
305 + if (advice_commit_before_merge) {
306 + if (action == REVERT)
307 + die(_("Your local changes would be overwritten by revert.\n"
308 + "Please, commit your changes or stash them to proceed."));
309 + else
310 + die(_("Your local changes would be overwritten by cherry-pick.\n"
311 + "Please, commit your changes or stash them to proceed."));
312 + } else {
313 + if (action == REVERT)
314 + die(_("Your local changes would be overwritten by revert.\n"));
315 + else
316 + die(_("Your local changes would be overwritten by cherry-pick.\n"));
317 + }
318 }
319 }
320
t/t3501-revert-cherry-pick.sh
+1 -1
@@ -91,7 +91,7 @@ test_expect_success 'cherry-pick on stat-dirty working tree' '
91 )
92 '
93
94 -test_expect_success 'revert forbidden on dirty working tree' '
94 +test_expect_success C_LOCALE_OUTPUT 'revert forbidden on dirty working tree' '
95
96 echo content >extra_file &&
97 git add extra_file &&