From: Ævar Arnfjörð Bjarmason Date: Thu, 2 Sep 2010 19:12:26 +0000 (+0000) Subject: gettextize: git-status basic messages X-Git-Tag: ko-pu~10^2~88 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=516be56162c12ebd151a93b18d1ea1c233094dc7;p=git.git gettextize: git-status basic messages 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 --- diff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh index fcac47259..720515478 100755 --- a/t/t7060-wtstatus.sh +++ b/t/t7060-wtstatus.sh @@ -38,7 +38,7 @@ cat >expect <sub/foo && git status >output && @@ -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 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 @@ -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 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 ' @@ -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 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 && @@ -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 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 && @@ -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 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 c9300f3c8..2e38f1ec3 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -31,7 +31,7 @@ test_expect_success 'setup' ' git add dir2/added ' -test_expect_success 'status (1)' ' +test_expect_success NO_GETTEXT_POISON 'status (1)' ' grep "use \"git rm --cached \.\.\.\" to unstage" output @@ -61,7 +61,7 @@ cat >expect <<\EOF # untracked EOF -test_expect_success 'status (2)' ' +test_expect_success NO_GETTEXT_POISON 'status (2)' ' git status >output && test_cmp expect output @@ -87,7 +87,7 @@ EOF 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 @@ -133,6 +133,12 @@ test_expect_success 'status -s -b' ' ' +test_expect_success 'setup dir3' ' + mkdir dir3 && + : >dir3/untracked1 && + : >dir3/untracked2 +' + cat >expect <expect <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 ' @@ -173,7 +177,7 @@ cat >expect <output && test_cmp expect output ' @@ -184,7 +188,6 @@ cat >expect << EOF A dir2/added EOF test_expect_success 'status -s -uno' ' - git config --unset status.showuntrackedfiles git status -s -uno >output && test_cmp expect output ' @@ -219,13 +222,14 @@ cat >expect <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 ' @@ -242,7 +246,6 @@ A dir2/added ?? untracked EOF test_expect_success 'status -s -unormal' ' - git config --unset status.showuntrackedfiles git status -s -unormal >output && test_cmp expect output ' @@ -278,18 +281,21 @@ cat >expect <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 <expect <<\EOF # ../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 @@ -409,18 +415,19 @@ cat >expect <<\EOF # untracked 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 @@ -439,7 +446,6 @@ EOF 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 @@ -539,9 +545,10 @@ cat >expect <<\EOF 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 @@ -560,6 +567,8 @@ EOF 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 @@ -582,7 +591,10 @@ cat <expect # 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 ' @@ -630,13 +642,13 @@ cat >expect <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 ' @@ -694,7 +706,7 @@ cat >expect <output && test_cmp expect output @@ -735,8 +747,11 @@ cat >expect <output && test_cmp expect output && @@ -787,7 +802,7 @@ cat >expect <output && test_cmp expect output @@ -842,13 +857,13 @@ cat > expect << EOF # 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 && @@ -956,12 +971,12 @@ cat > expect << EOF # 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 && @@ -1018,12 +1033,12 @@ cat > expect << EOF # 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 && @@ -1086,7 +1101,7 @@ cat > expect << EOF 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 bfc97fbe7..6269ea6d1 100644 --- a/wt-status.c +++ b/wt-status.c @@ -53,16 +53,16 @@ static void wt_status_print_unmerged_header(struct wt_status *s) { 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 ...\" to unstage)", s->reference); + color_fprintf_ln(s->fp, c, _("# (use \"git reset %s ...\" to unstage)"), s->reference); else - color_fprintf_ln(s->fp, c, "# (use \"git rm --cached ...\" to unstage)"); - color_fprintf_ln(s->fp, c, "# (use \"git add/rm ...\" as appropriate to mark resolution)"); + color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached ...\" to unstage)")); + color_fprintf_ln(s->fp, c, _("# (use \"git add/rm ...\" as appropriate to mark resolution)")); color_fprintf_ln(s->fp, c, "#"); } @@ -76,9 +76,9 @@ static void wt_status_print_cached_header(struct wt_status *s) if (s->in_merge) ; /* NEEDSWORK: use "git reset --unresolve"??? */ else if (!s->is_initial) - color_fprintf_ln(s->fp, c, "# (use \"git reset %s ...\" to unstage)", s->reference); + color_fprintf_ln(s->fp, c, _("# (use \"git reset %s ...\" to unstage)"), s->reference); else - color_fprintf_ln(s->fp, c, "# (use \"git rm --cached ...\" to unstage)"); + color_fprintf_ln(s->fp, c, _("# (use \"git rm --cached ...\" to unstage)")); color_fprintf_ln(s->fp, c, "#"); } @@ -88,16 +88,16 @@ static void wt_status_print_dirty_header(struct wt_status *s, { 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 ...\" to update what will be committed)"); + color_fprintf_ln(s->fp, c, _("# (use \"git add ...\" to update what will be committed)")); else - color_fprintf_ln(s->fp, c, "# (use \"git add/rm ...\" to update what will be committed)"); - color_fprintf_ln(s->fp, c, "# (use \"git checkout -- ...\" to discard changes in working directory)"); + color_fprintf_ln(s->fp, c, _("# (use \"git add/rm ...\" to update what will be committed)")); + color_fprintf_ln(s->fp, c, _("# (use \"git checkout -- ...\" 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, "#"); } @@ -106,10 +106,10 @@ static void wt_status_print_other_header(struct wt_status *s, 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 ...\" to include in what will be committed)", how); + color_fprintf_ln(s->fp, c, _("# (use \"git %s ...\" to include in what will be committed)"), how); color_fprintf_ln(s->fp, c, "#"); } @@ -126,18 +126,18 @@ static void wt_status_print_unmerged_data(struct wt_status *s, 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); @@ -167,11 +167,11 @@ static void wt_status_print_change_data(struct wt_status *s, 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, ')'); } @@ -185,31 +185,31 @@ static void wt_status_print_change_data(struct wt_status *s, 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); @@ -628,14 +628,14 @@ void wt_status_print(struct wt_status *s) 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); @@ -659,29 +659,29 @@ void wt_status_print(struct wt_status *s) 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)" : "");