{"thread":{"id":"27053","subject":"[PATCH/RFC 0/7] i18n: mark missing C messages","startedAt":"2011-04-10T19:34:01Z","lastAt":"2011-04-14T20:56:14Z","messageCount":21,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"165567","messageId":"1302464048-21806-1-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":null,"subject":"[PATCH/RFC 0/7] i18n: mark missing C messages","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:01Z","receivedAt":"2011-04-10T19:34:01Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Some messages fell through the cracks during the later submissions of\nthe i18n series, hopefully this catches all of the remaining C\nmesssages.\n\nThis is an RFC because the first patch still leaves one remaining\ngitdir test failing under GETTEXT_POISON, and I won't be able to find\nout why tonight. Help welcome with figuring out why (in which case\nthis should all be OK), you just need too build with\nGETTEXT_POISON=YesPlease and run t/t0001-init.sh.\n\nÆvar Arnfjörð Bjarmason (7):\n  i18n: mark init-db messages for translation\n  i18n: mark merge \"Could not read from\" message for translation\n  i18n: mark merge \"upstream\" messages for translation\n  i18n: mark merge CHERRY_PICK_HEAD messages for translation\n  i18n: mark clone nonexistent repository  message for translation\n  i18n: mark checkout --detach messages for translation\n  i18n: mark checkout plural warning for translation\n\n builtin/checkout.c         |   24 ++++++++++++++++++------\n builtin/clone.c            |    2 +-\n builtin/init-db.c          |   12 ++++++------\n builtin/merge.c            |   16 ++++++++--------\n t/t0001-init.sh            |   28 ++++++++++++++++++++--------\n t/t2020-checkout-detach.sh |   15 ++++++++++++---\n t/t5601-clone.sh           |    7 +++++--\n 7 files changed, 70 insertions(+), 34 deletions(-)\n\n-- \n1.7.4.1\n"},{"id":"165572","messageId":"1302464048-21806-2-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:02Z","receivedAt":"2011-04-10T19:34:02Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the init-db messages that were added in v1.7.5-rc1~16^2 (init,\nclone: support --separate-git-dir for .git file) by Nguyễn Thái Ngọc\nDuy for translation.\n\nThis requires splitting up the tests that the patch added so that\ncertain parts of them can be skipped unless the C_LOCALE_OUTPUT\nprerequisite is satisfied.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/init-db.c |   12 ++++++------\n t/t0001-init.sh   |   28 ++++++++++++++++++++--------\n t/t5601-clone.sh  |    7 +++++--\n 3 files changed, 31 insertions(+), 16 deletions(-)\n\ndiff --git a/builtin/init-db.c b/builtin/init-db.c\nindex b7370d9..6d0a856 100644\n--- a/builtin/init-db.c\n+++ b/builtin/init-db.c\n@@ -319,10 +319,10 @@ int set_git_dir_init(const char *git_dir, const char *real_git_dir,\n \t\tstruct stat st;\n \n \t\tif (!exist_ok && !stat(git_dir, &st))\n-\t\t\tdie(\"%s already exists\", git_dir);\n+\t\t\tdie(_(\"%s already exists\"), git_dir);\n \n \t\tif (!exist_ok && !stat(real_git_dir, &st))\n-\t\t\tdie(\"%s already exists\", real_git_dir);\n+\t\t\tdie(_(\"%s already exists\"), real_git_dir);\n \n \t\t/*\n \t\t * make sure symlinks are resolved because we'll be\n@@ -351,16 +351,16 @@ static void separate_git_dir(const char *git_dir)\n \t\telse if (S_ISDIR(st.st_mode))\n \t\t\tsrc = git_link;\n \t\telse\n-\t\t\tdie(\"unable to handle file type %d\", st.st_mode);\n+\t\t\tdie(_(\"unable to handle file type %d\"), st.st_mode);\n \n \t\tif (rename(src, git_dir))\n-\t\t\tdie_errno(\"unable to move %s to %s\", src, git_dir);\n+\t\t\tdie_errno(_(\"unable to move %s to %s\"), src, git_dir);\n \t}\n \n \tfp = fopen(git_link, \"w\");\n \tif (!fp)\n-\t\tdie(\"Could not create git link %s\", git_link);\n-\tfprintf(fp, \"gitdir: %s\\n\", git_dir);\n+\t\tdie(_(\"Could not create git link %s\"), git_link);\n+\tfprintf(fp, _(\"gitdir: %s\\n\"), git_dir);\n \tfclose(fp);\n }\n \ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex a5816d0..fa31cbd 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -374,22 +374,28 @@ test_expect_success 'init prefers command line to GIT_DIR' '\n test_expect_success 'init with separate gitdir' '\n \trm -rf newdir &&\n \tgit init --separate-git-dir realgitdir newdir &&\n-\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n-\ttest_cmp expected newdir/.git &&\n \ttest -d realgitdir/refs\n '\n \n+test_expect_success C_LOCALE_OUTPUT 'init with separate gitdir: output' '\n+\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n+\ttest_cmp expected newdir/.git\n+'\n+\n test_expect_success 're-init to update git link' '\n \t(\n \tcd newdir &&\n \tgit init --separate-git-dir ../surrealgitdir\n \t) &&\n-\techo \"gitdir: `pwd`/surrealgitdir\" >expected &&\n-\ttest_cmp expected newdir/.git &&\n \ttest -d surrealgitdir/refs &&\n \t! test -d realgitdir/refs\n '\n \n+test_expect_success C_LOCALE_OUTPUT 're-init to update git link: output' '\n+\techo \"gitdir: `pwd`/surrealgitdir\" >expected &&\n+\ttest_cmp expected newdir/.git\n+'\n+\n test_expect_success 're-init to move gitdir' '\n \trm -rf newdir realgitdir surrealgitdir &&\n \tgit init newdir &&\n@@ -397,11 +403,14 @@ test_expect_success 're-init to move gitdir' '\n \tcd newdir &&\n \tgit init --separate-git-dir ../realgitdir\n \t) &&\n-\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n-\ttest_cmp expected newdir/.git &&\n \ttest -d realgitdir/refs\n '\n \n+test_expect_success C_LOCALE_OUTPUT 're-init to move gitdir: output' '\n+\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n+\ttest_cmp expected newdir/.git\n+'\n+\n test_expect_success 're-init to move gitdir symlink' '\n \trm -rf newdir realgitdir &&\n \tgit init newdir &&\n@@ -411,10 +420,13 @@ test_expect_success 're-init to move gitdir symlink' '\n \tln -s here .git &&\n \tgit init -L ../realgitdir\n \t) &&\n-\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n-\ttest_cmp expected newdir/.git &&\n \ttest -d realgitdir/refs &&\n \t! test -d newdir/here\n '\n \n+test_expect_success C_LOCALE_OUTPUT 're-init to move gitdir symlink: output' '\n+\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n+\ttest_cmp expected newdir/.git\n+'\n+\n test_done\ndiff --git a/t/t5601-clone.sh b/t/t5601-clone.sh\nindex 5a068b2..a50e36e 100755\n--- a/t/t5601-clone.sh\n+++ b/t/t5601-clone.sh\n@@ -194,11 +194,14 @@ test_expect_success 'do not respect url-encoding of non-url path' '\n test_expect_success 'clone separate gitdir' '\n \trm -rf dst &&\n \tgit clone --separate-git-dir realgitdir src dst &&\n-\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n-\ttest_cmp expected dst/.git &&\n \ttest -d realgitdir/refs\n '\n \n+test_expect_success C_LOCALE_OUTPUT 'clone separate gitdir: output' '\n+\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n+\ttest_cmp expected dst/.git\n+'\n+\n test_expect_success 'clone separate gitdir where target already exists' '\n \trm -rf dst &&\n \ttest_must_fail git clone --separate-git-dir realgitdir src dst\n-- \n1.7.4.1\n"},{"id":"165568","messageId":"1302464048-21806-3-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 2/7] i18n: mark merge \"Could not read from\" message for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:03Z","receivedAt":"2011-04-10T19:34:03Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the \"Could not read from '%s'\" message that was added to\nbuiltin/merge.c in v1.7.4.2~25^2 (merge: honor prepare-commit-msg\nhook) by Jay Soffian for translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex d54e7dd..7eda05d 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -822,7 +822,7 @@ static void read_merge_msg(void)\n {\n \tstrbuf_reset(&merge_msg);\n \tif (strbuf_read_file(&merge_msg, git_path(\"MERGE_MSG\"), 0) < 0)\n-\t\tdie_errno(\"Could not read from '%s'\", git_path(\"MERGE_MSG\"));\n+\t\tdie_errno(_(\"Could not read from '%s'\"), git_path(\"MERGE_MSG\"));\n }\n \n static void run_prepare_commit_msg(void)\n-- \n1.7.4.1\n"},{"id":"165569","messageId":"1302464048-21806-4-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 3/7] i18n: mark merge \"upstream\" messages for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:04Z","receivedAt":"2011-04-10T19:34:04Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the merge messages that were added in v1.7.5-rc1~17^2 (merge:\nmerge with the default upstream branch without argument) by Junio C\nHamano for translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 7eda05d..6e63c08 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -962,16 +962,16 @@ static int setup_with_upstream(const char ***argv)\n \tconst char **args;\n \n \tif (!branch)\n-\t\tdie(\"No current branch.\");\n+\t\tdie(_(\"No current branch.\"));\n \tif (!branch->remote)\n-\t\tdie(\"No remote for the current branch.\");\n+\t\tdie(_(\"No remote for the current branch.\"));\n \tif (!branch->merge_nr)\n-\t\tdie(\"No default upstream defined for the current branch.\");\n+\t\tdie(_(\"No default upstream defined for the current branch.\"));\n \n \targs = xcalloc(branch->merge_nr + 1, sizeof(char *));\n \tfor (i = 0; i < branch->merge_nr; i++) {\n \t\tif (!branch->merge[i]->dst)\n-\t\t\tdie(\"No remote tracking branch for %s from %s\",\n+\t\t\tdie(_(\"No remote tracking branch for %s from %s\"),\n \t\t\t    branch->merge[i]->src, branch->remote_name);\n \t\targs[i] = branch->merge[i]->dst;\n \t}\n-- \n1.7.4.1\n"},{"id":"165570","messageId":"1302464048-21806-5-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 4/7] i18n: mark merge CHERRY_PICK_HEAD messages for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:05Z","receivedAt":"2011-04-10T19:34:05Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark CHERRY_PICK_HEAD related messages in builtin/merge.c that were\nadded in v1.7.5-rc0~88^2~2 (Introduce CHERRY_PICK_HEAD) by Jay Soffian\nfor translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/merge.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/merge.c b/builtin/merge.c\nindex 6e63c08..08245b6 100644\n--- a/builtin/merge.c\n+++ b/builtin/merge.c\n@@ -1043,10 +1043,10 @@ int cmd_merge(int argc, const char **argv, const char *prefix)\n \t}\n \tif (file_exists(git_path(\"CHERRY_PICK_HEAD\"))) {\n \t\tif (advice_resolve_conflict)\n-\t\t\tdie(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\\n\"\n-\t\t\t    \"Please, commit your changes before you can merge.\");\n+\t\t\tdie(_(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\\n\"\n+\t\t\t    \"Please, commit your changes before you can merge.\"));\n \t\telse\n-\t\t\tdie(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\");\n+\t\t\tdie(_(\"You have not concluded your cherry-pick (CHERRY_PICK_HEAD exists).\"));\n \t}\n \tresolve_undo_clear();\n \n-- \n1.7.4.1\n"},{"id":"165571","messageId":"1302464048-21806-6-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 5/7] i18n: mark clone nonexistent repository message for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:06Z","receivedAt":"2011-04-10T19:34:06Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the \"repository '%s' does not exist\" message added in\nv1.7.4.2~21^2 (clone: die when trying to clone missing local path) by\nJeff King for translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/clone.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 4144bcf..49c838f 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -417,7 +417,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)\n \tif (path)\n \t\trepo = xstrdup(absolute_path(repo_name));\n \telse if (!strchr(repo_name, ':'))\n-\t\tdie(\"repository '%s' does not exist\", repo_name);\n+\t\tdie(_(\"repository '%s' does not exist\"), repo_name);\n \telse\n \t\trepo = repo_name;\n \tis_local = path && !is_bundle;\n-- \n1.7.4.1\n"},{"id":"165573","messageId":"1302464048-21806-7-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 6/7] i18n: mark checkout --detach messages for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:07Z","receivedAt":"2011-04-10T19:34:07Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark messages added in v1.7.5-rc0~117^2~2 (checkout: introduce\n--detach synonym for \"git checkout foo^{commit}\") by Junio C Hamano\nfor translation.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/checkout.c |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex eece5d6..0b65edd 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -961,9 +961,9 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\tdie (_(\"--patch is incompatible with all other options\"));\n \n \tif (opts.force_detach && (opts.new_branch || opts.new_orphan_branch))\n-\t\tdie(\"--detach cannot be used with -b/-B/--orphan\");\n+\t\tdie(_(\"--detach cannot be used with -b/-B/--orphan\"));\n \tif (opts.force_detach && 0 < opts.track)\n-\t\tdie(\"--detach cannot be used with -t\");\n+\t\tdie(_(\"--detach cannot be used with -t\"));\n \n \t/* --track without -b should DWIM */\n \tif (0 < opts.track && !opts.new_branch) {\n@@ -1043,7 +1043,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\t}\n \n \t\tif (opts.force_detach)\n-\t\t\tdie(\"git checkout: --detach does not take a path argument\");\n+\t\t\tdie(_(\"git checkout: --detach does not take a path argument\"));\n \n \t\tif (1 < !!opts.writeout_stage + !!opts.force + !!opts.merge)\n \t\t\tdie(_(\"git checkout: --ours/--theirs, --force and --merge are incompatible when\\nchecking out of the index.\"));\n-- \n1.7.4.1\n"},{"id":"165574","messageId":"1302464048-21806-8-git-send-email-avarab@gmail.com","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"[PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-10T19:34:08Z","receivedAt":"2011-04-10T19:34:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark the \"Warning: you are leaving %d commit(s) behind\" message added\nin v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD\nto leave commits behind) by Junio C Hamano for translation.\n\nThis message requires the use of ngettext() features, and is the first\nmessage to use the Q_() wrapper around ngettext().\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n builtin/checkout.c         |   18 +++++++++++++++---\n t/t2020-checkout-detach.sh |   15 ++++++++++++---\n 2 files changed, 27 insertions(+), 6 deletions(-)\n\ndiff --git a/builtin/checkout.c b/builtin/checkout.c\nindex 0b65edd..5e94720 100644\n--- a/builtin/checkout.c\n+++ b/builtin/checkout.c\n@@ -648,18 +648,30 @@ static void suggest_reattach(struct commit *commit, struct rev_info *revs)\n \t\tif (more == 1)\n \t\t\tdescribe_one_orphan(&sb, last);\n \t\telse\n-\t\t\tstrbuf_addf(&sb, \" ... and %d more.\\n\", more);\n+\t\t\tstrbuf_addf(&sb, _(\" ... and %d more.\\n\"), more);\n \t}\n \n \tfprintf(stderr,\n-\t\t\"Warning: you are leaving %d commit%s behind, \"\n+\t\tQ_(\n+\t\t/* The singular version */\n+\t\t\"Warning: you are leaving %d commit behind, \"\n \t\t\"not connected to\\n\"\n \t\t\"any of your branches:\\n\\n\"\n \t\t\"%s\\n\"\n \t\t\"If you want to keep them by creating a new branch, \"\n \t\t\"this may be a good time\\nto do so with:\\n\\n\"\n \t\t\" git branch new_branch_name %s\\n\\n\",\n-\t\tlost, ((1 < lost) ? \"s\" : \"\"),\n+\t\t/* The plural version */\n+\t\t\"Warning: you are leaving %d commits behind, \"\n+\t\t\"not connected to\\n\"\n+\t\t\"any of your branches:\\n\\n\"\n+\t\t\"%s\\n\"\n+\t\t\"If you want to keep them by creating a new branch, \"\n+\t\t\"this may be a good time\\nto do so with:\\n\\n\"\n+\t\t\" git branch new_branch_name %s\\n\\n\",\n+\t\t/* Give ngettext() the count */\n+\t\tlost),\n+\t\tlost,\n \t\tsb.buf,\n \t\tsha1_to_hex(commit->object.sha1));\n \tstrbuf_release(&sb);\ndiff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh\nindex 569b27f..ab782e2 100755\n--- a/t/t2020-checkout-detach.sh\n+++ b/t/t2020-checkout-detach.sh\n@@ -108,21 +108,30 @@ test_expect_success 'checkout warns on orphan commits' '\n \techo content >orphan &&\n \tgit add orphan &&\n \tgit commit -a -m orphan &&\n-\tgit checkout master 2>stderr &&\n+\tgit checkout master 2>stderr\n+'\n+\n+test_expect_success C_LOCALE_OUTPUT 'checkout warns on orphan commits: output' '\n \tcheck_orphan_warning stderr\n '\n \n test_expect_success 'checkout does not warn leaving ref tip' '\n \treset &&\n \tgit checkout --detach two &&\n-\tgit checkout master 2>stderr &&\n+\tgit checkout master 2>stderr\n+'\n+\n+test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving ref tip' '\n \tcheck_no_orphan_warning stderr\n '\n \n test_expect_success 'checkout does not warn leaving reachable commit' '\n \treset &&\n \tgit checkout --detach HEAD^ &&\n-\tgit checkout master 2>stderr &&\n+\tgit checkout master 2>stderr\n+'\n+\n+test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving reachable commit' '\n \tcheck_no_orphan_warning stderr\n '\n \n-- \n1.7.4.1\n"},{"id":"165668","messageId":"7v39lorli9.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"1302464048-21806-2-git-send-email-avarab@gmail.com","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T07:12:30Z","receivedAt":"2011-04-12T07:12:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>  \tfp = fopen(git_link, \"w\");\n>  \tif (!fp)\n> -\t\tdie(\"Could not create git link %s\", git_link);\n> -\tfprintf(fp, \"gitdir: %s\\n\", git_dir);\n> +\t\tdie(_(\"Could not create git link %s\"), git_link);\n> +\tfprintf(fp, _(\"gitdir: %s\\n\"), git_dir);\n>  \tfclose(fp);\n>  }\n>  \n> diff --git a/t/t0001-init.sh b/t/t0001-init.sh\n> index a5816d0..fa31cbd 100755\n> --- a/t/t0001-init.sh\n> +++ b/t/t0001-init.sh\n> @@ -374,22 +374,28 @@ test_expect_success 'init prefers command line to GIT_DIR' '\n>  test_expect_success 'init with separate gitdir' '\n>  \trm -rf newdir &&\n>  \tgit init --separate-git-dir realgitdir newdir &&\n> -\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n> -\ttest_cmp expected newdir/.git &&\n>  \ttest -d realgitdir/refs\n>  '\n>  \n> +test_expect_success C_LOCALE_OUTPUT 'init with separate gitdir: output' '\n> +\techo \"gitdir: `pwd`/realgitdir\" >expected &&\n> +\ttest_cmp expected newdir/.git\n> +'\n\nI don't think this is correct.  The file \"git_link\" refers to .git that is\nnot a directory but is a regular file whose contents is \"gitdir: $path\"\nand that should _never_ be localized, so the patch to die() message is Ok,\nbut the string given to fprintf(fp, ...) is _not_.\n\nAnd t0001 should compare the expected output with \"gitdir: $path\"\nregardless of the poisoning.\n"},{"id":"165669","messageId":"7vy63gq6s2.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"7v39lorli9.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T07:15:57Z","receivedAt":"2011-04-12T07:15:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>>  \tfp = fopen(git_link, \"w\");\n>>  \tif (!fp)\n>> -\t\tdie(\"Could not create git link %s\", git_link);\n>> -\tfprintf(fp, \"gitdir: %s\\n\", git_dir);\n>> +\t\tdie(_(\"Could not create git link %s\"), git_link);\n>> +\tfprintf(fp, _(\"gitdir: %s\\n\"), git_dir);\n>>  \tfclose(fp);\n>> ...\n> I don't think this is correct.  The file \"git_link\" refers to .git that is\n> not a directory but is a regular file whose contents is \"gitdir: $path\"\n> and that should _never_ be localized, so the patch to die() message is Ok,\n> but the string given to fprintf(fp, ...) is _not_.\n\nSee read_gitfile_gently() in setup.c; that is the reader of the\ninformation contained in this file.\n"},{"id":"165671","messageId":"7vipukq6m0.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"1302464048-21806-8-git-send-email-avarab@gmail.com","subject":"Re: [PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T07:19:35Z","receivedAt":"2011-04-12T07:19:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> Mark the \"Warning: you are leaving %d commit(s) behind\" message added\n> in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD\n> to leave commits behind) by Junio C Hamano for translation.\n>\n> This message requires the use of ngettext() features, and is the first\n> message to use the Q_() wrapper around ngettext().\n\nThanks.\n\n>  \tfprintf(stderr,\n> +\t\tQ_(\n> +\t\t/* The singular version */\n> +\t\t\"Warning: you are leaving %d commit behind, \"\n>  \t\t\"not connected to\\n\"\n>  \t\t\"any of your branches:\\n\\n\"\n>  \t\t\"%s\\n\"\n>  \t\t\"If you want to keep them by creating a new branch, \"\n\ns/them/it/ as this is a singular case, no?\n"},{"id":"165672","messageId":"7vei58q68f.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"1302464048-21806-1-git-send-email-avarab@gmail.com","subject":"Re: [PATCH/RFC 0/7] i18n: mark missing C messages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T07:27:44Z","receivedAt":"2011-04-12T07:27:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n> This is an RFC because the first patch still leaves one remaining\n> gitdir test failing under GETTEXT_POISON, and I won't be able to find\n> out why tonight. Help welcome with figuring out why (in which case\n> this should all be OK), you just need too build with\n> GETTEXT_POISON=YesPlease and run t/t0001-init.sh.\n\nI didn't even compile test this one, but I highly suspect that all the\nfailures you saw come from the fact that .git file your patch produces\nwith gettext poisoning (or any l10n) would be malformed and cannot be\nparsed by read_gitfile_gently() anymore.\n\nI took a look at the remainder of the series, and except for the \"do not\ncall what you know is a singleton 'them'\" grammo, everything looked fine\nto me.\n\nI am tempted to merge them to 'master' before rc2; the alternative is to\nqueue it on ab/i18n-fixup and keep it in 'next' until the 1.7.5 final, and\nhave other people build on top of ab/i18n-fixup topic.\n"},{"id":"165673","messageId":"BANLkTincUmH7SjypXfDMXDfg8BxW4MW+Jg@mail.gmail.com","threadId":"27053","inReplyTo":"7vy63gq6s2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-12T07:44:58Z","receivedAt":"2011-04-12T07:44:58Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Apr 12, 2011 at 09:15, Junio C Hamano <gitster@pobox.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>>\n>>>      fp = fopen(git_link, \"w\");\n>>>      if (!fp)\n>>> -            die(\"Could not create git link %s\", git_link);\n>>> -    fprintf(fp, \"gitdir: %s\\n\", git_dir);\n>>> +            die(_(\"Could not create git link %s\"), git_link);\n>>> +    fprintf(fp, _(\"gitdir: %s\\n\"), git_dir);\n>>>      fclose(fp);\n>>> ...\n>> I don't think this is correct.  The file \"git_link\" refers to .git that is\n>> not a directory but is a regular file whose contents is \"gitdir: $path\"\n>> and that should _never_ be localized, so the patch to die() message is Ok,\n>> but the string given to fprintf(fp, ...) is _not_.\n>\n> See read_gitfile_gently() in setup.c; that is the reader of the\n> information contained in this file.\n\nAh, thanks. Missed that. I'd have spotted it if I dug down instead of sending.\n\nI'll re-send one without the translation for this plumbing message.\n"},{"id":"165674","messageId":"BANLkTimjYxz_7v8gyByjKX2Mf9vRzukWGw@mail.gmail.com","threadId":"27053","inReplyTo":"7vipukq6m0.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-12T07:54:58Z","receivedAt":"2011-04-12T07:54:58Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Apr 12, 2011 at 09:19, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>> Mark the \"Warning: you are leaving %d commit(s) behind\" message added\n>> in v1.7.5-rc0~74^2 (commit: give final warning when reattaching HEAD\n>> to leave commits behind) by Junio C Hamano for translation.\n>>\n>> This message requires the use of ngettext() features, and is the first\n>> message to use the Q_() wrapper around ngettext().\n>\n> Thanks.\n>\n>>       fprintf(stderr,\n>> +             Q_(\n>> +             /* The singular version */\n>> +             \"Warning: you are leaving %d commit behind, \"\n>>               \"not connected to\\n\"\n>>               \"any of your branches:\\n\\n\"\n>>               \"%s\\n\"\n>>               \"If you want to keep them by creating a new branch, \"\n>\n> s/them/it/ as this is a singular case, no?\n\nI just used the message as-is, we were using that for the singular before.\n\nBut maybe we should change that. Fix it up at your discretion.\n"},{"id":"165702","messageId":"7vsjtnpc0k.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"BANLkTincUmH7SjypXfDMXDfg8BxW4MW+Jg@mail.gmail.com","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T18:20:27Z","receivedAt":"2011-04-12T18:20:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> Ah, thanks. Missed that. I'd have spotted it if I dug down instead of sending.\n>\n> I'll re-send one without the translation for this plumbing message.\n\nNo need to resend, if the reroll is just the removal of the part that\nmarks the fprintf() argument, and sprinkles t0001 with C_LOCALE_OUTPUT\nto skip checking of the contents of .git file.\n\nBy the way, don't you think the attached is far easier to read than\nartificially breaking a single test into \"do\" and \"check\" phase?  The\nmajority of the l10n dependent tests can and should lose C_LOCALE_OUTPUT\nprerequisite and use this instead for far superiour readability, I think.\n\nAt least this makes it far more pleasant to read both the actual script\nand the output in non-poison cases.\n\n t/test-lib.sh               |    8 ++++\n t/t5526-fetch-submodules.sh |   93 ++++++++++++++++--------------------------\n 2 files changed, 44 insertions(+), 57 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex abc47f3..3e7c2bb 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1077,6 +1077,14 @@ else\n \ttest_set_prereq C_LOCALE_OUTPUT\n fi\n \n+# Use this instead of test_cmp to compare files that contain expected and\n+# actual output from git commands that can be translated.  When running\n+# under GETTEXT_POISON this pretends that the command produced expected\n+# results.\n+test_i18ncmp () {\n+\ttest -n \"$GETTEXT_POISON\" || test_cmp \"$@\"\n+}\n+\n # test whether the filesystem supports symbolic links\n ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS\n rm -f y\ndiff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh\nindex af78e21..a1fddd4 100755\n--- a/t/t5526-fetch-submodules.sh\n+++ b/t/t5526-fetch-submodules.sh\n@@ -66,12 +66,9 @@ test_expect_success \"fetch --recurse-submodules recurses into submodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"fetch --recurse-submodules recurses into submodules: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"fetch alone only fetches superproject\" '\n@@ -98,12 +95,9 @@ test_expect_success \"using fetchRecurseSubmodules=true in .gitmodules recurses i\n \t\tcd downstream &&\n \t\tgit config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&\n \t\tgit fetch >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"using fetchRecurseSubmodules=true in .gitmodules recurses into submodules\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"--no-recurse-submodules overrides .gitmodules config\" '\n@@ -132,12 +126,9 @@ test_expect_success \"--recurse-submodules overrides fetchRecurseSubmodules setti\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err &&\n \t\tgit config --unset -f .gitmodules submodule.submodule.fetchRecurseSubmodules &&\n \t\tgit config --unset submodule.submodule.fetchRecurseSubmodules\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"--recurse-submodules overrides fetchRecurseSubmodules setting from .git/config: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"--quiet propagates to submodules\" '\n@@ -154,24 +145,18 @@ test_expect_success \"--dry-run propagates to submodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules --dry-run >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"--dry-run propagates to submodules: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"Without --dry-run propagates to submodules\" '\n \t(\n \t\tcd downstream &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"Without --dry-run propagates to submodules: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n@@ -180,12 +165,9 @@ test_expect_success \"recurseSubmodules=true propagates into submodules\" '\n \t\tcd downstream &&\n \t\tgit config fetch.recurseSubmodules true\n \t\tgit fetch >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"recurseSubmodules=true propagates into submodules: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"--recurse-submodules overrides config in submodule\" '\n@@ -197,12 +179,9 @@ test_expect_success \"--recurse-submodules overrides config in submodule\" '\n \t\t\tgit config fetch.recurseSubmodules false\n \t\t) &&\n \t\tgit fetch --recurse-submodules >../actual.out 2>../actual.err\n-\t)\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT \"--recurse-submodules overrides config in submodule: output\" '\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\t) &&\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"--no-recurse-submodules overrides config setting\" '\n@@ -243,8 +222,8 @@ test_expect_success \"Recursion stops when no new submodule commits are fetched\"\n \t\tcd downstream &&\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.err.sub actual.err &&\n-\ttest_cmp expect.out.sub actual.out\n+\ttest_i18ncmp expect.err.sub actual.err &&\n+\ttest_i18ncmp expect.out.sub actual.out\n '\n \n test_expect_success \"Recursion doesn't happen when new superproject commits don't change any submodules\" '\n@@ -261,7 +240,7 @@ test_expect_success \"Recursion doesn't happen when new superproject commits don'\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n \t! test -s actual.out &&\n-\ttest_cmp expect.err.file actual.err\n+\ttest_i18ncmp expect.err.file actual.err\n '\n \n test_expect_success \"Recursion picks up config in submodule\" '\n@@ -289,8 +268,8 @@ test_expect_success \"Recursion picks up config in submodule\" '\n \t\t\tgit config --unset fetch.recurseSubmodules\n \t\t)\n \t) &&\n-\ttest_cmp expect.err.sub actual.err &&\n-\ttest_cmp expect.out actual.out\n+\ttest_i18ncmp expect.err.sub actual.err &&\n+\ttest_i18ncmp expect.out actual.out\n '\n \n test_expect_success \"Recursion picks up all submodules when necessary\" '\n@@ -321,8 +300,8 @@ test_expect_success \"Recursion picks up all submodules when necessary\" '\n \t\tcd downstream &&\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n-\ttest_cmp expect.err.2 actual.err &&\n-\ttest_cmp expect.out actual.out\n+\ttest_i18ncmp expect.err.2 actual.err &&\n+\ttest_i18ncmp expect.out actual.out\n '\n \n test_expect_success \"'--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)\" '\n@@ -375,8 +354,8 @@ test_expect_success \"'--recurse-submodules=on-demand' recurses as deep as necess\n \t\t\tgit config --unset -f .gitmodules submodule.deepsubmodule.fetchRecursive\n \t\t)\n \t) &&\n-\ttest_cmp expect.out actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_i18ncmp expect.out actual.out &&\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_expect_success \"'--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)\" '\n@@ -393,7 +372,7 @@ test_expect_success \"'--recurse-submodules=on-demand' stops when no new submodul\n \t\tgit fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err\n \t) &&\n \t! test -s actual.out &&\n-\ttest_cmp expect.err.file actual.err\n+\ttest_i18ncmp expect.err.file actual.err\n '\n \n test_expect_success \"'fetch.recurseSubmodules=on-demand' overrides global config\" '\n@@ -420,8 +399,8 @@ test_expect_success \"'fetch.recurseSubmodules=on-demand' overrides global config\n \t\tcd downstream &&\n \t\tgit config --unset fetch.recurseSubmodules\n \t) &&\n-\ttest_cmp expect.out.sub actual.out &&\n-\ttest_cmp expect.err.2 actual.err\n+\ttest_i18ncmp expect.out.sub actual.out &&\n+\ttest_i18ncmp expect.err.2 actual.err\n '\n \n test_expect_success \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules\" '\n@@ -448,8 +427,8 @@ test_expect_success \"'submodule.<sub>.fetchRecurseSubmodules=on-demand' override\n \t\tcd downstream &&\n \t\tgit config --unset submodule.submodule.fetchRecurseSubmodules\n \t) &&\n-\ttest_cmp expect.out.sub actual.out &&\n-\ttest_cmp expect.err.2 actual.err\n+\ttest_i18ncmp expect.out.sub actual.out &&\n+\ttest_i18ncmp expect.err.2 actual.err\n '\n \n test_expect_success \"don't fetch submodule when newly recorded commits are already present\" '\n@@ -468,7 +447,7 @@ test_expect_success \"don't fetch submodule when newly recorded commits are alrea\n \t\tgit fetch >../actual.out 2>../actual.err\n \t) &&\n \t! test -s actual.out &&\n-\ttest_cmp expect.err actual.err\n+\ttest_i18ncmp expect.err actual.err\n '\n \n test_done\n"},{"id":"165712","messageId":"7vzknvnq6o.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"BANLkTimjYxz_7v8gyByjKX2Mf9vRzukWGw@mail.gmail.com","subject":"Re: [PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T20:57:19Z","receivedAt":"2011-04-12T20:57:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>>> +             \"Warning: you are leaving %d commit behind, \"\n>>> ...\n>>>               \"If you want to keep them by creating a new branch, \"\n>>\n>> s/them/it/ as this is a singular case, no?\n>\n> I just used the message as-is, we were using that for the singular before.\n\nHeh, you cannot claim innocence in this case; it used to be \"leaving %d\ncommit(s) behind, ... if you want _them_\", which was consistent with the\nearlier use of \"commit(s)\" ;-).\n"},{"id":"165718","messageId":"7v62qjnkpe.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"7vsjtnpc0k.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T22:55:41Z","receivedAt":"2011-04-12T22:55:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> By the way, don't you think the attached is far easier to read than\n> artificially breaking a single test into \"do\" and \"check\" phase?  The\n> majority of the l10n dependent tests can and should lose C_LOCALE_OUTPUT\n> prerequisite and use this instead for far superiour readability, I think.\n>\n> At least this makes it far more pleasant to read both the actual script\n> and the output in non-poison cases.\n\nAnd this is for the other common pattern: use grep to find expected\nstring.\n\n t/test-lib.sh   |    8 ++++++++\n t/t0001-init.sh |   10 +++++-----\n 2 files changed, 13 insertions(+), 5 deletions(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3e7c2bb..b764acb 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1085,6 +1085,14 @@ test_i18ncmp () {\n \ttest -n \"$GETTEXT_POISON\" || test_cmp \"$@\"\n }\n \n+# Use this instead of \"grep expected-string actual\" to see if the\n+# output from a git command that acn be translated contains an\n+# expected string.  When running under GETTEXT_POISON this pretends\n+# that the command produced expected results.\n+test_i18ngrep () {\n+\ttest -n \"$GETTEXT_POISON\" || grep \"$@\"\n+}\n+\n # test whether the filesystem supports symbolic links\n ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS\n rm -f y\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex a5816d0..651e098 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -180,7 +180,7 @@ test_expect_success 'GIT_DIR & GIT_WORK_TREE (2)' '\n \tfi\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'reinit' '\n+test_expect_success 'reinit' '\n \n \t(\n \t\tsane_unset GIT_CONFIG GIT_WORK_TREE GIT_CONFIG &&\n@@ -190,11 +190,11 @@ test_expect_success C_LOCALE_OUTPUT 'reinit' '\n \t\tgit init >out1 2>err1 &&\n \t\tgit init >out2 2>err2\n \t) &&\n-\tgrep \"Initialized empty\" again/out1 &&\n-\tgrep \"Reinitialized existing\" again/out2 &&\n+\ttest_i18ngrep \"Initialized empty\" again/out1 &&\n+\ttest_i18ngrep \"Reinitialized existing\" again/out2 &&\n \t>again/empty &&\n-\ttest_cmp again/empty again/err1 &&\n-\ttest_cmp again/empty again/err2\n+\ttest_i18ncmp again/empty again/err1 &&\n+\ttest_i18ncmp again/empty again/err2\n '\n \n test_expect_success 'init with --template' '\n"},{"id":"165719","messageId":"7v1v17nk9z.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"7v62qjnkpe.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 1/7] i18n: mark init-db messages for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-12T23:04:56Z","receivedAt":"2011-04-12T23:04:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> +# Use this instead of \"grep expected-string actual\" to see if the\n> +# output from a git command that acn be translated contains an\n> +# expected string.  When running under GETTEXT_POISON this pretends\n> +# that the command produced expected results.\n> +test_i18ngrep () {\n> +\ttest -n \"$GETTEXT_POISON\" || grep \"$@\"\n> +}\n> +\n\nI spoke too early.\n\nThe common pattern is either to ensure that the actual output has an\nexpected string, of to ensure that the actual output does not have an\nunwanted string.  So this has to be something like:\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 3e7c2bb..874bcc5 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1085,6 +1085,23 @@ test_i18ncmp () {\n \ttest -n \"$GETTEXT_POISON\" || test_cmp \"$@\"\n }\n \n+# Use this instead of \"grep expected-string actual\" to see if the\n+# output from a git command that can be translated contains (or does\n+# not contain) an expected string.  When running under GETTEXT_POISON\n+# this pretends that the command produced expected results.\n+test_i18ngrep () {\n+\tif test -n \"$GETTEXT_POISON\"\n+\tthen\n+\t    : # pretend success\n+\telif test \"x!\" = \"x$1\"\n+\tthen\n+\t    \tshift\n+\t\t! grep \"$@\"\n+\telse\n+\t    \tgrep \"$@\"\n+\tfi\n+}\n+\n # test whether the filesystem supports symbolic links\n ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS\n rm -f y\ndiff --git a/t/t2019-checkout-ambiguous-ref.sh b/t/t2019-checkout-ambiguous-ref.sh\nindex cc34e55..30c2225 100755\n--- a/t/t2019-checkout-ambiguous-ref.sh\n+++ b/t/t2019-checkout-ambiguous-ref.sh\n@@ -29,9 +29,9 @@ test_expect_success 'checkout chooses branch over tag' '\n \ttest_cmp expect file\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'checkout reports switch to branch' '\n-\tgrep \"Switched to branch\" stderr &&\n-\t! grep \"^HEAD is now at\" stderr\n+test_expect_success 'checkout reports switch to branch' '\n+\ttest_i18ngrep \"Switched to branch\" stderr &&\n+\ttest_i18ngrep ! \"^HEAD is now at\" stderr\n '\n \n test_expect_success 'checkout vague ref succeeds' '\n"},{"id":"165728","messageId":"BANLkTimPzYA7oYkUZ3vwefb2HAKEHW-w7w@mail.gmail.com","threadId":"27053","inReplyTo":"7vzknvnq6o.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-04-13T08:30:35Z","receivedAt":"2011-04-13T08:30:35Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Apr 12, 2011 at 22:57, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>>>> +             \"Warning: you are leaving %d commit behind, \"\n>>>> ...\n>>>>               \"If you want to keep them by creating a new branch, \"\n>>>\n>>> s/them/it/ as this is a singular case, no?\n>>\n>> I just used the message as-is, we were using that for the singular before.\n>\n> Heh, you cannot claim innocence in this case; it used to be \"leaving %d\n> commit(s) behind, ... if you want _them_\", which was consistent with the\n> earlier use of \"commit(s)\" ;-).\n\nNo, it was:\n\n              \"Warning: you are leaving %d commit%s behind, \"\n               [...]\n               lost, ((1 < lost) ? \"s\" : \"\")\n\nSo it would be \"commit\" or \"commits\" depending on the value of the\n\"lost\" variable.\n\nAnyway I could re-submit this or you could fix it up, either is fine by me.\n"},{"id":"165757","messageId":"7vsjtmm9hg.fsf@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"BANLkTimPzYA7oYkUZ3vwefb2HAKEHW-w7w@mail.gmail.com","subject":"Re: [PATCH/RFC 7/7] i18n: mark checkout plural warning for translation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-13T15:55:39Z","receivedAt":"2011-04-13T15:55:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> Anyway I could re-submit this or you could fix it up, either is fine by me.\n\nThanks.  I've queued a fixup together with the test_i18ncmp changes in\n'pu'.\n"},{"id":"165842","messageId":"7v1v14h7rl.fsf_-_@alter.siamese.dyndns.org","threadId":"27053","inReplyTo":"7v1v17nk9z.fsf@alter.siamese.dyndns.org","subject":"[PATCH] i18n: use test_i18n{grep,cmp} in t7508","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-14T20:56:14Z","receivedAt":"2011-04-14T20:56:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Two tests looked for \"[Uu]sage\" in the output, but we cannot expect the\nl10n to use that phrase.  Mark them with test_i18ngrep so that in later\nversions we can test truly localized versions with the same tests, not\njust GETTEXT_POISON that happens to keep the original string in the\noutput.\n\nMerge a few tests that were artificially split into \"do\" and \"test output\nunder C_LOCALE_OUTPUT\" in the original i18n patches back.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n * I've queued many others in 'pu' without sending them on the list, but\n   this one is a bit different and can use extra sets of eyeballs, so...\n\n t/t7508-status.sh |  222 ++++++++++++++++++++++++-----------------------------\n 1 files changed, 102 insertions(+), 120 deletions(-)\n\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex a93e70f..cd6e2c5 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -16,7 +16,7 @@ test_expect_success 'status -h in broken repository' '\n \t\techo \"[status] showuntrackedfiles = CORRUPT\" >>.git/config &&\n \t\ttest_expect_code 129 git status -h >usage 2>&1\n \t) &&\n-\tgrep \"[Uu]sage\" broken/usage\n+\ttest_i18ngrep \"[Uu]sage\" broken/usage\n '\n \n test_expect_success 'commit -h in broken repository' '\n@@ -28,7 +28,7 @@ test_expect_success 'commit -h in broken repository' '\n \t\techo \"[status] showuntrackedfiles = CORRUPT\" >>.git/config &&\n \t\ttest_expect_code 129 git commit -h >usage 2>&1\n \t) &&\n-\tgrep \"[Uu]sage\" broken/usage\n+\ttest_i18ngrep \"[Uu]sage\" broken/usage\n '\n \n test_expect_success 'setup' '\n@@ -55,10 +55,8 @@ test_expect_success 'setup' '\n \tgit add dir2/added\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'status (1)' '\n-\n-\tgrep \"use \\\"git rm --cached <file>\\.\\.\\.\\\" to unstage\" output\n-\n+test_expect_success 'status (1)' '\n+\ttest_i18ngrep \"use \\\"git rm --cached <file>\\.\\.\\.\\\" to unstage\" output\n '\n \n cat >expect <<\\EOF\n@@ -85,11 +83,9 @@ cat >expect <<\\EOF\n #\tuntracked\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT 'status (2)' '\n-\n+test_expect_success 'status (2)' '\n \tgit status >output &&\n-\ttest_cmp expect output\n-\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<\\EOF\n@@ -109,17 +105,14 @@ cat >expect <<\\EOF\n #\tuntracked\n EOF\n \n-git config advice.statusHints false\n-\n-test_expect_success C_LOCALE_OUTPUT 'status (advice.statusHints false)' '\n-\n+test_expect_success 'status (advice.statusHints false)' '\n+\ttest_when_finished \"git config --unset advice.statusHints\" &&\n+\tgit config advice.statusHints false &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n \n '\n \n-git config --unset advice.statusHints\n-\n cat >expect <<\\EOF\n  M dir1/modified\n A  dir2/added\n@@ -178,16 +171,16 @@ cat >expect <<EOF\n #\n # Untracked files not listed (use -u option to show untracked files)\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'status -uno' '\n+test_expect_success 'status -uno' '\n \tgit status -uno >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles no)' '\n+test_expect_success 'status (status.showUntrackedFiles no)' '\n \tgit config status.showuntrackedfiles no\n \ttest_when_finished \"git config --unset status.showuntrackedfiles\" &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -201,9 +194,9 @@ cat >expect <<EOF\n # Untracked files not listed\n EOF\n git config advice.statusHints false\n-test_expect_success C_LOCALE_OUTPUT 'status -uno (advice.statusHints false)' '\n+test_expect_success 'status -uno (advice.statusHints false)' '\n \tgit status -uno >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n git config --unset advice.statusHints\n \n@@ -246,16 +239,16 @@ cat >expect <<EOF\n #\toutput\n #\tuntracked\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'status -unormal' '\n+test_expect_success 'status -unormal' '\n \tgit status -unormal >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles normal)' '\n+test_expect_success 'status (status.showUntrackedFiles normal)' '\n \tgit config status.showuntrackedfiles normal\n \ttest_when_finished \"git config --unset status.showuntrackedfiles\" &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -305,15 +298,16 @@ cat >expect <<EOF\n #\toutput\n #\tuntracked\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'status -uall' '\n+test_expect_success 'status -uall' '\n \tgit status -uall >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n-test_expect_success C_LOCALE_OUTPUT 'status (status.showUntrackedFiles all)' '\n+\n+test_expect_success 'status (status.showUntrackedFiles all)' '\n \tgit config status.showuntrackedfiles all\n \ttest_when_finished \"git config --unset status.showuntrackedfiles\" &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n test_expect_success 'teardown dir3' '\n@@ -367,11 +361,9 @@ cat >expect <<\\EOF\n #\t../untracked\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT 'status with relative paths' '\n-\n+test_expect_success 'status with relative paths' '\n \t(cd dir1 && git status) >output &&\n-\ttest_cmp expect output\n-\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<\\EOF\n@@ -440,22 +432,18 @@ cat >expect <<\\EOF\n #\t<BLUE>untracked<RESET>\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT 'status with color.ui' '\n-\n+test_expect_success 'status with color.ui' '\n \tgit config color.ui always &&\n \ttest_when_finished \"git config --unset color.ui\" &&\n \tgit status | test_decode_color >output &&\n-\ttest_cmp expect output\n-\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT 'status with color.status' '\n-\n+test_expect_success 'status with color.status' '\n \tgit config color.status always &&\n \ttest_when_finished \"git config --unset color.status\" &&\n \tgit status | test_decode_color >output &&\n-\ttest_cmp expect output\n-\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<\\EOF\n@@ -570,12 +558,12 @@ cat >expect <<\\EOF\n EOF\n \n \n-test_expect_success C_LOCALE_OUTPUT 'status without relative paths' '\n+test_expect_success 'status without relative paths' '\n \n \tgit config status.relativePaths false &&\n \ttest_when_finished \"git config --unset status.relativePaths\" &&\n \t(cd dir1 && git status) >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n \n '\n \n@@ -616,11 +604,8 @@ cat <<EOF >expect\n #\tuntracked\n EOF\n test_expect_success 'dry-run of partial commit excluding new file in index' '\n-\tgit commit --dry-run dir1/modified >output\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT 'dry-run of partial commit excluding new file in index: output' '\n-\ttest_cmp expect output\n+\tgit commit --dry-run dir1/modified >output &&\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -667,15 +652,15 @@ cat >expect <<EOF\n #\toutput\n #\tuntracked\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'status submodule summary is disabled by default' '\n+test_expect_success 'status submodule summary is disabled by default' '\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n # we expect the same as the previous test\n-test_expect_success C_LOCALE_OUTPUT 'status --untracked-files=all does not show submodule' '\n+test_expect_success 'status --untracked-files=all does not show submodule' '\n \tgit status --untracked-files=all >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -731,10 +716,10 @@ cat >expect <<EOF\n #\toutput\n #\tuntracked\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'status submodule summary' '\n+test_expect_success 'status submodule summary' '\n \tgit config status.submodulesummary 10 &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -773,15 +758,12 @@ cat >expect <<EOF\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n EOF\n test_expect_success 'status submodule summary (clean submodule): commit' '\n-\tgit commit -m \"commit submodule\"\n-'\n-\n-test_expect_success C_LOCALE_OUTPUT 'status submodule summary (clean submodule): output' '\n+\tgit commit -m \"commit submodule\" &&\n \tgit config status.submodulesummary 10 &&\n \ttest_must_fail git commit --dry-run >output &&\n-\ttest_cmp expect output &&\n+\ttest_i18ncmp expect output &&\n \tgit status >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n cat >expect <<EOF\n@@ -827,10 +809,10 @@ cat >expect <<EOF\n #\toutput\n #\tuntracked\n EOF\n-test_expect_success C_LOCALE_OUTPUT 'commit --dry-run submodule summary (--amend)' '\n+test_expect_success 'commit --dry-run submodule summary (--amend)' '\n \tgit config status.submodulesummary 10 &&\n \tgit commit --dry-run --amend >output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository' '\n@@ -882,84 +864,84 @@ cat > expect << EOF\n #\tuntracked\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=untracked suppresses submodules with untracked content' '\n-\techo modified > sm/untracked &&\n-\tgit status --ignore-submodules=untracked > output &&\n-\ttest_cmp expect output\n+test_expect_success '--ignore-submodules=untracked suppresses submodules with untracked content' '\n+\techo modified  sm/untracked &&\n+\tgit status --ignore-submodules=untracked >output &&\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=untracked suppresses submodules with untracked content' '\n+test_expect_success '.gitmodules ignore=untracked suppresses submodules with untracked content' '\n \tgit config diff.ignoreSubmodules dirty &&\n \tgit status >output &&\n-\ttest_cmp expect output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname &&\n \tgit config --unset diff.ignoreSubmodules\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.git/config ignore=untracked suppresses submodules with untracked content' '\n+test_expect_success '.git/config ignore=untracked suppresses submodules with untracked content' '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore untracked &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config --remove-section -f .gitmodules submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=dirty suppresses submodules with untracked content' '\n-\tgit status --ignore-submodules=dirty > output &&\n-\ttest_cmp expect output\n+test_expect_success '--ignore-submodules=dirty suppresses submodules with untracked content' '\n+\tgit status --ignore-submodules=dirty >output &&\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=dirty suppresses submodules with untracked content' '\n+test_expect_success '.gitmodules ignore=dirty suppresses submodules with untracked content' '\n \tgit config diff.ignoreSubmodules dirty &&\n \tgit status >output &&\n \t! test -s actual &&\n \tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname &&\n \tgit config --unset diff.ignoreSubmodules\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.git/config ignore=dirty suppresses submodules with untracked content' '\n+test_expect_success '.git/config ignore=dirty suppresses submodules with untracked content' '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore dirty &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT '--ignore-submodules=dirty suppresses submodules with modified content' '\n-\techo modified > sm/foo &&\n-\tgit status --ignore-submodules=dirty > output &&\n-\ttest_cmp expect output\n+test_expect_success '--ignore-submodules=dirty suppresses submodules with modified content' '\n+\techo modified >sm/foo &&\n+\tgit status --ignore-submodules=dirty >output &&\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.gitmodules ignore=dirty suppresses submodules with modified content' '\n+test_expect_success '.gitmodules ignore=dirty suppresses submodules with modified content' '\n \tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT '.git/config ignore=dirty suppresses submodules with modified content' '\n+test_expect_success '.git/config ignore=dirty suppresses submodules with modified content' '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore dirty &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n@@ -996,26 +978,26 @@ cat > expect << EOF\n #\tuntracked\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n+test_expect_success \"--ignore-submodules=untracked doesn't suppress submodules with modified content\" '\n \tgit status --ignore-submodules=untracked > output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT \".gitmodules ignore=untracked doesn't suppress submodules with modified content\" '\n+test_expect_success \".gitmodules ignore=untracked doesn't suppress submodules with modified content\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT \".git/config ignore=untracked doesn't suppress submodules with modified content\" '\n+test_expect_success \".git/config ignore=untracked doesn't suppress submodules with modified content\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore untracked &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n@@ -1058,49 +1040,49 @@ cat > expect << EOF\n #\tuntracked\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n+test_expect_success \"--ignore-submodules=untracked doesn't suppress submodule summary\" '\n \tgit status --ignore-submodules=untracked > output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n-test_expect_success C_LOCALE_OUTPUT \".gitmodules ignore=untracked doesn't suppress submodule summary\" '\n+test_expect_success \".gitmodules ignore=untracked doesn't suppress submodule summary\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT \".git/config ignore=untracked doesn't suppress submodule summary\" '\n+test_expect_success \".git/config ignore=untracked doesn't suppress submodule summary\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore untracked &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT \"--ignore-submodules=dirty doesn't suppress submodule summary\" '\n+test_expect_success \"--ignore-submodules=dirty doesn't suppress submodule summary\" '\n \tgit status --ignore-submodules=dirty > output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n-test_expect_success C_LOCALE_OUTPUT \".gitmodules ignore=dirty doesn't suppress submodule summary\" '\n+test_expect_success \".gitmodules ignore=dirty doesn't suppress submodule summary\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n \n-test_expect_success C_LOCALE_OUTPUT \".git/config ignore=dirty doesn't suppress submodule summary\" '\n+test_expect_success \".git/config ignore=dirty doesn't suppress submodule summary\" '\n \tgit config --add -f .gitmodules submodule.subname.ignore none &&\n \tgit config --add -f .gitmodules submodule.subname.path sm &&\n \tgit config --add submodule.subname.ignore dirty &&\n \tgit config --add submodule.subname.path sm &&\n-\tgit status > output &&\n-\ttest_cmp expect output &&\n+\tgit status >output &&\n+\ttest_i18ncmp expect output &&\n \tgit config --remove-section submodule.subname &&\n \tgit config -f .gitmodules  --remove-section submodule.subname\n '\n@@ -1126,9 +1108,9 @@ cat > expect << EOF\n no changes added to commit (use \"git add\" and/or \"git commit -a\")\n EOF\n \n-test_expect_success C_LOCALE_OUTPUT \"--ignore-submodules=all suppresses submodule summary\" '\n+test_expect_success \"--ignore-submodules=all suppresses submodule summary\" '\n \tgit status --ignore-submodules=all > output &&\n-\ttest_cmp expect output\n+\ttest_i18ncmp expect output\n '\n \n test_expect_failure '.gitmodules ignore=all suppresses submodule summary' '\n"}]}