summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c15c731)
raw | patch | inline | side by side (parent: c15c731)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Thu, 2 Sep 2010 19:12:26 +0000 (19:12 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:58:12 +0000 (07:58 +0000) |
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 NO_GETTEXT_POISON 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>
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 NO_GETTEXT_POISON 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>
t/t7060-wtstatus.sh | patch | blob | history | |
t/t7506-status-submodule.sh | patch | blob | history | |
t/t7508-status.sh | patch | blob | history | |
wt-status.c | patch | blob | history |
diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh
index fcac4725982096af98414c5d40df2d4c14be9454..720515478865fcecaee0de5853aa85ec48855201 100755 (executable)
--- a/t/t7060-wtstatus.sh
+++ b/t/t7060-wtstatus.sh
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 NO_GETTEXT_POISON 'M/D conflict does not segfault' '
mkdir mdconflict &&
(
cd mdconflict &&
index 3d4f85d74f6f378d76bde77e581273af010ba452..74e0f6fd6a5942a142831d3639932a815075b21e 100755 (executable)
grep "nothing to commit" output
'
-test_expect_success 'status with modified file in submodule' '
+test_expect_success NO_GETTEXT_POISON 'status with modified file in submodule' '
(cd sub && git reset --hard) &&
echo "changed" >sub/foo &&
git status >output &&
EOF
'
-test_expect_success 'status with added file in submodule' '
+test_expect_success NO_GETTEXT_POISON '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
EOF
'
-test_expect_success 'status with untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON '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 NO_GETTEXT_POISON 'status -uno with untracked file in submodule' '
git status -uno >output &&
grep "^nothing to commit" output
'
EOF
'
-test_expect_success 'status with added and untracked file in submodule' '
+test_expect_success NO_GETTEXT_POISON '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 &&
EOF
'
-test_expect_success 'status with modified file in modified submodule' '
+test_expect_success NO_GETTEXT_POISON '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) &&
@@ -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 NO_GETTEXT_POISON '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
@@ -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 NO_GETTEXT_POISON 'status with untracked file in modified submodule' '
(cd sub && git reset --hard) &&
echo "content" >sub/new-file &&
git status >output &&
@@ -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 NO_GETTEXT_POISON '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 &&
git commit -m "added .real to .gitignore" .gitignore
'
-test_expect_success 'status with added file in modified submodule with .git file' '
+test_expect_success NO_GETTEXT_POISON '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
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c9300f3c8b246e3c81570532534748e510a2865f..2e38f1ec3b64aa7e19e1c51b524825500e1b6598 100755 (executable)
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
git add dir2/added
'
-test_expect_success 'status (1)' '
+test_expect_success NO_GETTEXT_POISON 'status (1)' '
grep "use \"git rm --cached <file>\.\.\.\" to unstage" output
# untracked
EOF
-test_expect_success 'status (2)' '
+test_expect_success NO_GETTEXT_POISON 'status (2)' '
git status >output &&
test_cmp expect output
git config advice.statusHints false
-test_expect_success 'status (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status (advice.statusHints false)' '
git status >output &&
test_cmp expect output
'
+test_expect_success 'setup dir3' '
+ mkdir dir3 &&
+ : >dir3/untracked1 &&
+ : >dir3/untracked2
+'
+
cat >expect <<EOF
# On branch master
# Changes to be committed:
#
# Untracked files not listed (use -u option to show untracked files)
EOF
-test_expect_success 'status -uno' '
- mkdir dir3 &&
- : >dir3/untracked1 &&
- : >dir3/untracked2 &&
+test_expect_success NO_GETTEXT_POISON 'status -uno' '
git status -uno >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles no)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles no)' '
git config status.showuntrackedfiles no
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
test_cmp expect output
'
# Untracked files not listed
EOF
git config advice.statusHints false
-test_expect_success 'status -uno (advice.statusHints false)' '
+test_expect_success NO_GETTEXT_POISON 'status -uno (advice.statusHints false)' '
git status -uno >output &&
test_cmp expect output
'
A dir2/added
EOF
test_expect_success 'status -s -uno' '
- git config --unset status.showuntrackedfiles
git status -s -uno >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status -unormal' '
+test_expect_success NO_GETTEXT_POISON 'status -unormal' '
git status -unormal >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles normal)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles normal)' '
git config status.showuntrackedfiles normal
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
test_cmp expect output
'
?? untracked
EOF
test_expect_success 'status -s -unormal' '
- git config --unset status.showuntrackedfiles
git status -s -unormal >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status -uall' '
+test_expect_success NO_GETTEXT_POISON 'status -uall' '
git status -uall >output &&
test_cmp expect output
'
-test_expect_success 'status (status.showUntrackedFiles all)' '
+test_expect_success NO_GETTEXT_POISON 'status (status.showUntrackedFiles all)' '
git config status.showuntrackedfiles all
+ test_when_finished "git config --unset status.showuntrackedfiles" &&
git status >output &&
- rm -rf dir3 &&
- git config --unset status.showuntrackedfiles &&
test_cmp expect output
'
+test_expect_success 'teardown dir3' '
+ rm -rf dir3
+'
+
cat >expect <<EOF
M dir1/modified
A dir2/added
# ../untracked
EOF
-test_expect_success 'status with relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status with relative paths' '
(cd dir1 && git status) >output &&
test_cmp expect output
# <BLUE>untracked<RESET>
EOF
-test_expect_success 'status with color.ui' '
+test_expect_success NO_GETTEXT_POISON 'status with color.ui' '
git config color.ui always &&
+ test_when_finished "git config --unset color.ui" &&
git status | test_decode_color >output &&
test_cmp expect output
'
-test_expect_success 'status with color.status' '
+test_expect_success NO_GETTEXT_POISON 'status with color.status' '
- git config --unset color.ui &&
git config color.status always &&
+ test_when_finished "git config --unset color.status" &&
git status | test_decode_color >output &&
test_cmp expect output
test_expect_success 'status -s with color.ui' '
- git config --unset color.status &&
git config color.ui always &&
git status -s | test_decode_color >output &&
test_cmp expect output
EOF
-test_expect_success 'status without relative paths' '
+test_expect_success NO_GETTEXT_POISON 'status without relative paths' '
- git config status.relativePaths false
+ git config status.relativePaths false &&
+ test_when_finished "git config --unset status.relativePaths" &&
(cd dir1 && git status) >output &&
test_cmp expect output
test_expect_success 'status -s without relative paths' '
+ git config status.relativePaths false &&
+ test_when_finished "git config --unset status.relativePaths" &&
(cd dir1 && git status -s) >output &&
test_cmp expect output
# untracked
EOF
test_expect_success 'dry-run of partial commit excluding new file in index' '
- git commit --dry-run dir1/modified >output &&
+ git commit --dry-run dir1/modified >output
+'
+
+test_expect_success NO_GETTEXT_POISON 'dry-run of partial commit excluding new file in index: output' '
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status submodule summary is disabled by default' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary is disabled by default' '
git status >output &&
test_cmp expect output
'
# we expect the same as the previous test
-test_expect_success 'status --untracked-files=all does not show submodule' '
+test_expect_success NO_GETTEXT_POISON 'status --untracked-files=all does not show submodule' '
git status --untracked-files=all >output &&
test_cmp expect output
'
# output
# untracked
EOF
-test_expect_success 'status submodule summary' '
+test_expect_success NO_GETTEXT_POISON 'status submodule summary' '
git config status.submodulesummary 10 &&
git status >output &&
test_cmp expect output
# untracked
no changes added to commit (use "git add" and/or "git commit -a")
EOF
-test_expect_success 'status submodule summary (clean submodule)' '
- git commit -m "commit submodule" &&
+test_expect_success 'status submodule summary (clean submodule): commit' '
+ git commit -m "commit submodule"
+'
+
+test_expect_success NO_GETTEXT_POISON 'status submodule summary (clean submodule): output' '
git config status.submodulesummary 10 &&
test_must_fail git commit --dry-run >output &&
test_cmp expect output &&
# output
# untracked
EOF
-test_expect_success 'commit --dry-run submodule summary (--amend)' '
+test_expect_success NO_GETTEXT_POISON 'commit --dry-run submodule summary (--amend)' '
git config status.submodulesummary 10 &&
git commit --dry-run --amend >output &&
test_cmp expect output
# untracked
EOF
-test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=untracked suppresses submodules with untracked content' '
echo modified > sm/untracked &&
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=untracked suppresses submodules with untracked content' '
git config diff.ignoreSubmodules dirty &&
git status >output &&
test_cmp expect output &&
@@ -860,7 +875,7 @@ test_expect_success '.gitmodules ignore=untracked suppresses submodules with unt
git config --unset diff.ignoreSubmodules
'
-test_expect_success '.git/config ignore=untracked suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=untracked suppresses submodules with untracked content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
@@ -871,12 +886,12 @@ test_expect_success '.git/config ignore=untracked suppresses submodules with unt
git config --remove-section -f .gitmodules submodule.subname
'
-test_expect_success '--ignore-submodules=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with untracked content' '
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with untracked content' '
git config diff.ignoreSubmodules dirty &&
git status >output &&
! test -s actual &&
@@ -888,7 +903,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with untrack
git config --unset diff.ignoreSubmodules
'
-test_expect_success '.git/config ignore=dirty suppresses submodules with untracked content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with untracked content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
@@ -899,13 +914,13 @@ test_expect_success '.git/config ignore=dirty suppresses submodules with untrack
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success '--ignore-submodules=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '--ignore-submodules=dirty suppresses submodules with modified content' '
echo modified > sm/foo &&
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success '.gitmodules ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.gitmodules ignore=dirty suppresses submodules with modified content' '
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -913,7 +928,7 @@ test_expect_success '.gitmodules ignore=dirty suppresses submodules with modifie
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success '.git/config ignore=dirty suppresses submodules with modified content' '
+test_expect_success NO_GETTEXT_POISON '.git/config ignore=dirty suppresses submodules with modified content' '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
# untracked
EOF
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodules with modified content" '
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodules with modified content" '
git config --add -f .gitmodules submodule.subname.ignore untracked &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -969,7 +984,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodules wi
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=untracked doesn't suppress submodules with modified content" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodules with modified content" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
# untracked
EOF
-test_expect_success "--ignore-submodules=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=untracked doesn't suppress submodule summary" '
git status --ignore-submodules=untracked > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=untracked doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore untracked &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -1031,7 +1046,7 @@ test_expect_success ".gitmodules ignore=untracked doesn't suppress submodule sum
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=untracked doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=untracked doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore untracked &&
@@ -1042,11 +1057,11 @@ test_expect_success ".git/config ignore=untracked doesn't suppress submodule sum
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success "--ignore-submodules=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=dirty doesn't suppress submodule summary" '
git status --ignore-submodules=dirty > output &&
test_cmp expect output
'
-test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".gitmodules ignore=dirty doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sm &&
git status > output &&
@@ -1054,7 +1069,7 @@ test_expect_success ".gitmodules ignore=dirty doesn't suppress submodule summary
git config -f .gitmodules --remove-section submodule.subname
'
-test_expect_success ".git/config ignore=dirty doesn't suppress submodule summary" '
+test_expect_success NO_GETTEXT_POISON ".git/config ignore=dirty doesn't suppress submodule summary" '
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sm &&
git config --add submodule.subname.ignore dirty &&
no changes added to commit (use "git add" and/or "git commit -a")
EOF
-test_expect_success "--ignore-submodules=all suppresses submodule summary" '
+test_expect_success NO_GETTEXT_POISON "--ignore-submodules=all suppresses submodule summary" '
git status --ignore-submodules=all > output &&
test_cmp expect output
'
diff --git a/wt-status.c b/wt-status.c
index bfc97fbe7f86477aee32e95f38201521fe920f96..6269ea6d199b5634a8de57b724a102dba0516327 100644 (file)
--- a/wt-status.c
+++ b/wt-status.c
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# Unmerged paths:");
+ color_fprintf_ln(s->fp, c, _("# Unmerged paths:"));
if (!advice_status_hints)
return;
if (s->in_merge)
;
else if (!s->is_initial)
- color_fprintf_ln(s->fp, c, "# (use \"git reset %s <file>...\" to unstage)", s->reference);
+ color_fprintf_ln(s->fp, c, _("# (use \"git reset %s <file>...\" to unstage)"), s->reference);
else
- color_fprintf_ln(s->fp, c, "# (use \"git rm --cached <file>...\" to unstage)");
- color_fprintf_ln(s->fp, c, "# (use \"git add/rm <file>...\" as appropriate to mark resolution)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached <file>...\" to unstage)"));
+ color_fprintf_ln(s->fp, c, _("# (use \"git add/rm <file>...\" as appropriate to mark resolution)"));
color_fprintf_ln(s->fp, c, "#");
}
if (s->in_merge)
; /* NEEDSWORK: use "git reset --unresolve"??? */
else if (!s->is_initial)
- color_fprintf_ln(s->fp, c, "# (use \"git reset %s <file>...\" to unstage)", s->reference);
+ color_fprintf_ln(s->fp, c, _("# (use \"git reset %s <file>...\" to unstage)"), s->reference);
else
- color_fprintf_ln(s->fp, c, "# (use \"git rm --cached <file>...\" to unstage)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached <file>...\" to unstage)"));
color_fprintf_ln(s->fp, c, "#");
}
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# Changed but not updated:");
+ color_fprintf_ln(s->fp, c, _("# Changed but not updated:"));
if (!advice_status_hints)
return;
if (!has_deleted)
- color_fprintf_ln(s->fp, c, "# (use \"git add <file>...\" to update what will be committed)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git add <file>...\" to update what will be committed)"));
else
- color_fprintf_ln(s->fp, c, "# (use \"git add/rm <file>...\" to update what will be committed)");
- color_fprintf_ln(s->fp, c, "# (use \"git checkout -- <file>...\" to discard changes in working directory)");
+ color_fprintf_ln(s->fp, c, _("# (use \"git add/rm <file>...\" to update what will be committed)"));
+ color_fprintf_ln(s->fp, c, _("# (use \"git checkout -- <file>...\" to discard changes in working directory)"));
if (has_dirty_submodules)
- color_fprintf_ln(s->fp, c, "# (commit or discard the untracked or modified content in submodules)");
+ color_fprintf_ln(s->fp, c, _("# (commit or discard the untracked or modified content in submodules)"));
color_fprintf_ln(s->fp, c, "#");
}
const char *how)
{
const char *c = color(WT_STATUS_HEADER, s);
- color_fprintf_ln(s->fp, c, "# %s files:", what);
+ color_fprintf_ln(s->fp, c, _("# %s files:"), what);
if (!advice_status_hints)
return;
- color_fprintf_ln(s->fp, c, "# (use \"git %s <file>...\" to include in what will be committed)", how);
+ color_fprintf_ln(s->fp, c, _("# (use \"git %s <file>...\" to include in what will be committed)"), how);
color_fprintf_ln(s->fp, c, "#");
}
const char *c = color(WT_STATUS_UNMERGED, s);
struct wt_status_change_data *d = it->util;
struct strbuf onebuf = STRBUF_INIT;
- const char *one, *how = "bug";
+ const char *one, *how = _("bug");
one = quote_path(it->string, -1, &onebuf, s->prefix);
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "#\t");
switch (d->stagemask) {
- case 1: how = "both deleted:"; break;
- case 2: how = "added by us:"; break;
- case 3: how = "deleted by them:"; break;
- case 4: how = "added by them:"; break;
- case 5: how = "deleted by us:"; break;
- case 6: how = "both added:"; break;
- case 7: how = "both modified:"; break;
+ case 1: how = _("both deleted:"); break;
+ case 2: how = _("added by us:"); break;
+ case 3: how = _("deleted by them:"); break;
+ case 4: how = _("added by them:"); break;
+ case 5: how = _("deleted by us:"); break;
+ case 6: how = _("both added:"); break;
+ case 7: how = _("both modified:"); break;
}
color_fprintf(s->fp, c, "%-20s%s\n", how, one);
strbuf_release(&onebuf);
if (d->new_submodule_commits || d->dirty_submodule) {
strbuf_addstr(&extra, " (");
if (d->new_submodule_commits)
- strbuf_addf(&extra, "new commits, ");
+ strbuf_addf(&extra, _("new commits, "));
if (d->dirty_submodule & DIRTY_SUBMODULE_MODIFIED)
- strbuf_addf(&extra, "modified content, ");
+ strbuf_addf(&extra, _("modified content, "));
if (d->dirty_submodule & DIRTY_SUBMODULE_UNTRACKED)
- strbuf_addf(&extra, "untracked content, ");
+ strbuf_addf(&extra, _("untracked content, "));
strbuf_setlen(&extra, extra.len - 2);
strbuf_addch(&extra, ')');
}
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "#\t");
switch (status) {
case DIFF_STATUS_ADDED:
- color_fprintf(s->fp, c, "new file: %s", one);
+ color_fprintf(s->fp, c, _("new file: %s"), one);
break;
case DIFF_STATUS_COPIED:
- color_fprintf(s->fp, c, "copied: %s -> %s", one, two);
+ color_fprintf(s->fp, c, _("copied: %s -> %s"), one, two);
break;
case DIFF_STATUS_DELETED:
- color_fprintf(s->fp, c, "deleted: %s", one);
+ color_fprintf(s->fp, c, _("deleted: %s"), one);
break;
case DIFF_STATUS_MODIFIED:
- color_fprintf(s->fp, c, "modified: %s", one);
+ color_fprintf(s->fp, c, _("modified: %s"), one);
break;
case DIFF_STATUS_RENAMED:
color_fprintf(s->fp, c, "renamed: %s -> %s", one, two);
break;
case DIFF_STATUS_TYPE_CHANGED:
- color_fprintf(s->fp, c, "typechange: %s", one);
+ color_fprintf(s->fp, c, _("typechange: %s"), one);
break;
case DIFF_STATUS_UNKNOWN:
- color_fprintf(s->fp, c, "unknown: %s", one);
+ color_fprintf(s->fp, c, _("unknown: %s"), one);
break;
case DIFF_STATUS_UNMERGED:
- color_fprintf(s->fp, c, "unmerged: %s", one);
+ color_fprintf(s->fp, c, _("unmerged: %s"), one);
break;
default:
- die("bug: unhandled diff status %c", status);
+ die(_("bug: unhandled diff status %c"), status);
}
if (extra.len) {
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "%s", extra.buf);
const char *branch_color = color(WT_STATUS_HEADER, s);
if (s->branch) {
- const char *on_what = "On branch ";
+ const char *on_what = _("On branch ");
const char *branch_name = s->branch;
if (!prefixcmp(branch_name, "refs/heads/"))
branch_name += 11;
else if (!strcmp(branch_name, "HEAD")) {
branch_name = "";
branch_color = color(WT_STATUS_NOBRANCH, s);
- on_what = "Not currently on any branch.";
+ on_what = _("Not currently on any branch.");
}
color_fprintf(s->fp, color(WT_STATUS_HEADER, s), "# ");
color_fprintf_ln(s->fp, branch_color, "%s%s", on_what, branch_name);
wt_status_print_submodule_summary(s, 1); /* unstaged */
}
if (s->show_untracked_files) {
- wt_status_print_other(s, &s->untracked, "Untracked", "add");
+ wt_status_print_other(s, &s->untracked, _("Untracked"), "add");
if (s->show_ignored_files)
- wt_status_print_other(s, &s->ignored, "Ignored", "add -f");
+ wt_status_print_other(s, &s->ignored, _("Ignored"), "add -f");
} else if (s->commitable)
- fprintf(s->fp, "# Untracked files not listed%s\n",
+ fprintf(s->fp, _("# Untracked files not listed%s\n"),
advice_status_hints
- ? " (use -u option to show untracked files)" : "");
+ ? _(" (use -u option to show untracked files)") : "");
if (s->verbose)
wt_status_print_verbose(s);
if (!s->commitable) {
if (s->amend)
- fprintf(s->fp, "# No changes\n");
+ fprintf(s->fp, _("# No changes\n"));
else if (s->nowarn)
; /* nothing */
else if (s->workdir_dirty)
- printf("no changes added to commit%s\n",
+ printf(_("no changes added to commit%s\n"),
advice_status_hints
- ? " (use \"git add\" and/or \"git commit -a\")" : "");
+ ? _(" (use \"git add\" and/or \"git commit -a\")") : "");
else if (s->untracked.nr)
- printf("nothing added to commit but untracked files present%s\n",
+ printf(_("nothing added to commit but untracked files present%s\n"),
advice_status_hints
- ? " (use \"git add\" to track)" : "");
+ ? _(" (use \"git add\" to track)") : "");
else if (s->is_initial)
printf("nothing to commit%s\n", advice_status_hints
? " (create/copy files and use \"git add\" to track)" : "");