i18n: setup: mark strings for translation

Update tests that compare the strings newly marked for translation to succeed when running under GETTEXT_POISON. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Vasco Almeida committed Jun 17, 2016 at 20:21 UTC ab33a76ec5313b00d630a14d2a843cdb942ed2be
3 files changed +11 -11
setup.c
+8 -8
@@ -157,8 +157,8 @@ static void NORETURN die_verify_filename(const char *prefix,
157 int diagnose_misspelt_rev)
158 {
159 if (!diagnose_misspelt_rev)
160 - die("%s: no such path in the working tree.\n"
161 - "Use 'git <command> -- <path>...' to specify paths that do not exist locally.",
160 + die(_("%s: no such path in the working tree.\n"
161 + "Use 'git <command> -- <path>...' to specify paths that do not exist locally."),
162 arg);
163 /*
164 * Saying "'(icase)foo' does not exist in the index" when the
@@ -170,9 +170,9 @@ static void NORETURN die_verify_filename(const char *prefix,
170 maybe_die_on_misspelt_object_name(arg, prefix);
171
172 /* ... or fall back the most general message. */
173 - die("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
174 - "Use '--' to separate paths from revisions, like this:\n"
175 - "'git <command> [<revision>...] -- [<file>...]'", arg);
173 + die(_("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
174 + "Use '--' to separate paths from revisions, like this:\n"
175 + "'git <command> [<revision>...] -- [<file>...]'"), arg);
176
177 }
178
@@ -220,9 +220,9 @@ void verify_non_filename(const char *prefix, const char *arg)
220 return; /* flag */
221 if (!check_filename(prefix, arg))
222 return;
223 - die("ambiguous argument '%s': both revision and filename\n"
224 - "Use '--' to separate paths from revisions, like this:\n"
225 - "'git <command> [<revision>...] -- [<file>...]'", arg);
223 + die(_("ambiguous argument '%s': both revision and filename\n"
224 + "Use '--' to separate paths from revisions, like this:\n"
225 + "'git <command> [<revision>...] -- [<file>...]'"), arg);
226 }
227
228 int get_common_dir(struct strbuf *sb, const char *gitdir)
t/t1506-rev-parse-diagnosis.sh
+1 -1
@@ -106,7 +106,7 @@ test_expect_success 'incorrect revision id' '
106 test_must_fail git rev-parse foobar:file.txt 2>error &&
107 grep "Invalid object name '"'"'foobar'"'"'." error &&
108 test_must_fail git rev-parse foobar 2> error &&
109 - grep "unknown revision or path not in the working tree." error
109 + test_i18ngrep "unknown revision or path not in the working tree." error
110 '
111
112 test_expect_success 'incorrect file in sha1:path' '
t/t4208-log-magic-pathspec.sh
+2 -2
@@ -18,7 +18,7 @@ test_expect_success '"git log :/" should not be ambiguous' '
18 test_expect_success '"git log :/a" should be ambiguous (applied both rev and worktree)' '
19 : >a &&
20 test_must_fail git log :/a 2>error &&
21 - grep ambiguous error
21 + test_i18ngrep ambiguous error
22 '
23
24 test_expect_success '"git log :/a -- " should not be ambiguous' '
@@ -31,7 +31,7 @@ test_expect_success '"git log -- :/a" should not be ambiguous' '
31
32 test_expect_success '"git log :" should be ambiguous' '
33 test_must_fail git log : 2>error &&
34 - grep ambiguous error
34 + test_i18ngrep ambiguous error
35 '
36
37 test_expect_success 'git log -- :' '