Browse Source

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>
maint
Vasco Almeida 9 years ago committed by Junio C Hamano
parent
commit
ab33a76ec5
  1. 16
      setup.c
  2. 2
      t/t1506-rev-parse-diagnosis.sh
  3. 4
      t/t4208-log-magic-pathspec.sh

16
setup.c

@ -157,8 +157,8 @@ static void NORETURN die_verify_filename(const char *prefix, @@ -157,8 +157,8 @@ static void NORETURN die_verify_filename(const char *prefix,
int diagnose_misspelt_rev)
{
if (!diagnose_misspelt_rev)
die("%s: no such path in the working tree.\n"
"Use 'git <command> -- <path>...' to specify paths that do not exist locally.",
die(_("%s: no such path in the working tree.\n"
"Use 'git <command> -- <path>...' to specify paths that do not exist locally."),
arg);
/*
* 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,9 +170,9 @@ static void NORETURN die_verify_filename(const char *prefix,
maybe_die_on_misspelt_object_name(arg, prefix);

/* ... or fall back the most general message. */
die("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
"Use '--' to separate paths from revisions, like this:\n"
"'git <command> [<revision>...] -- [<file>...]'", arg);
die(_("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
"Use '--' to separate paths from revisions, like this:\n"
"'git <command> [<revision>...] -- [<file>...]'"), arg);

}

@ -220,9 +220,9 @@ void verify_non_filename(const char *prefix, const char *arg) @@ -220,9 +220,9 @@ void verify_non_filename(const char *prefix, const char *arg)
return; /* flag */
if (!check_filename(prefix, arg))
return;
die("ambiguous argument '%s': both revision and filename\n"
"Use '--' to separate paths from revisions, like this:\n"
"'git <command> [<revision>...] -- [<file>...]'", arg);
die(_("ambiguous argument '%s': both revision and filename\n"
"Use '--' to separate paths from revisions, like this:\n"
"'git <command> [<revision>...] -- [<file>...]'"), arg);
}

int get_common_dir(struct strbuf *sb, const char *gitdir)

2
t/t1506-rev-parse-diagnosis.sh

@ -106,7 +106,7 @@ test_expect_success 'incorrect revision id' ' @@ -106,7 +106,7 @@ test_expect_success 'incorrect revision id' '
test_must_fail git rev-parse foobar:file.txt 2>error &&
grep "Invalid object name '"'"'foobar'"'"'." error &&
test_must_fail git rev-parse foobar 2> error &&
grep "unknown revision or path not in the working tree." error
test_i18ngrep "unknown revision or path not in the working tree." error
'

test_expect_success 'incorrect file in sha1:path' '

4
t/t4208-log-magic-pathspec.sh

@ -18,7 +18,7 @@ test_expect_success '"git log :/" should not be ambiguous' ' @@ -18,7 +18,7 @@ test_expect_success '"git log :/" should not be ambiguous' '
test_expect_success '"git log :/a" should be ambiguous (applied both rev and worktree)' '
: >a &&
test_must_fail git log :/a 2>error &&
grep ambiguous error
test_i18ngrep ambiguous error
'

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,7 +31,7 @@ test_expect_success '"git log -- :/a" should not be ambiguous' '

test_expect_success '"git log :" should be ambiguous' '
test_must_fail git log : 2>error &&
grep ambiguous error
test_i18ngrep ambiguous error
'

test_expect_success 'git log -- :' '

Loading…
Cancel
Save