Skip to content

Commit

Permalink
i18n: git-status basic messages
Browse files Browse the repository at this point in the history
Gettextize the most common git-status messages. Many tests checked for
these explicitly. Change them to skip under GETTEXT_POISON=YesPlease.

Some of the tests in t7508-status.sh needed to be split up when I
added C_LOCALE_OUTPUT to them, since parts of them affected later
tests (some of which aren't being skipped) indirectly.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Mar 10, 2011
1 parent b32227e commit 355ec7a
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 104 deletions.
2 changes: 1 addition & 1 deletion t/t7060-wtstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ cat >expect <<EOF
no changes added to commit (use "git add" and/or "git commit -a")
EOF

test_expect_success 'M/D conflict does not segfault' '
test_expect_success C_LOCALE_OUTPUT 'M/D conflict does not segfault' '
mkdir mdconflict &&
(
cd mdconflict &&
Expand Down
20 changes: 10 additions & 10 deletions t/t7506-status-submodule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test_expect_success 'commit --dry-run -a clean' '
grep "nothing to commit" output
'

test_expect_success 'status with modified file in submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with modified file in submodule' '
(cd sub && git reset --hard) &&
echo "changed" >sub/foo &&
git status >output &&
Expand All @@ -46,7 +46,7 @@ test_expect_success 'status with modified file in submodule (porcelain)' '
EOF
'

test_expect_success 'status with added file in submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with added file in submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (modified content)" output
Expand All @@ -60,14 +60,14 @@ test_expect_success 'status with added file in submodule (porcelain)' '
EOF
'

test_expect_success 'status with untracked file in submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with untracked file in submodule' '
(cd sub && git reset --hard) &&
echo "content" >sub/new-file &&
git status >output &&
grep "modified: sub (untracked content)" output
'

test_expect_success 'status -uno with untracked file in submodule' '
test_expect_success C_LOCALE_OUTPUT 'status -uno with untracked file in submodule' '
git status -uno >output &&
grep "^nothing to commit" output
'
Expand All @@ -79,7 +79,7 @@ test_expect_success 'status with untracked file in submodule (porcelain)' '
EOF
'

test_expect_success 'status with added and untracked file in submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with added and untracked file in submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
echo "content" >sub/new-file &&
git status >output &&
Expand All @@ -95,7 +95,7 @@ test_expect_success 'status with added and untracked file in submodule (porcelai
EOF
'

test_expect_success 'status with modified file in modified submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with modified file in modified submodule' '
(cd sub && git reset --hard) &&
rm sub/new-file &&
(cd sub && echo "next change" >foo && git commit -m "next change" foo) &&
Expand All @@ -113,7 +113,7 @@ test_expect_success 'status with modified file in modified submodule (porcelain)
EOF
'

test_expect_success 'status with added file in modified submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with added file in modified submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (new commits, modified content)" output
Expand All @@ -127,7 +127,7 @@ test_expect_success 'status with added file in modified submodule (porcelain)' '
EOF
'

test_expect_success 'status with untracked file in modified submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with untracked file in modified submodule' '
(cd sub && git reset --hard) &&
echo "content" >sub/new-file &&
git status >output &&
Expand All @@ -141,7 +141,7 @@ test_expect_success 'status with untracked file in modified submodule (porcelain
EOF
'

test_expect_success 'status with added and untracked file in modified submodule' '
test_expect_success C_LOCALE_OUTPUT 'status with added and untracked file in modified submodule' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
echo "content" >sub/new-file &&
git status >output &&
Expand All @@ -167,7 +167,7 @@ test_expect_success 'setup .git file for sub' '
git commit -m "added .real to .gitignore" .gitignore
'

test_expect_success 'status with added file in modified submodule with .git file' '
test_expect_success C_LOCALE_OUTPUT 'status with added file in modified submodule with .git file' '
(cd sub && git reset --hard && echo >foo && git add foo) &&
git status >output &&
grep "modified: sub (new commits, modified content)" output
Expand Down
Loading

0 comments on commit 355ec7a

Please sign in to comment.