Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Vasco Almeida <vascomalmeida@sapo.pt>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] i18n: unpack-trees: avoid substituting only a verb in sentences
Date: Thu, 12 May 2016 16:28:34 -0700	[thread overview]
Message-ID: <xmqqoa8ac0v1.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1463094986-7344-1-git-send-email-vascomalmeida@sapo.pt> (Vasco Almeida's message of "Thu, 12 May 2016 23:16:26 +0000")

Vasco Almeida <vascomalmeida@sapo.pt> writes:

> Instead of reusing the same set of message templates for checkout
> and other actions and substituting the verb with "%s", prepare
> separate message templates for each known action. That would make
> it easier for translation into languages where the same verb may
> conjugate differently depending on the message we are giving.
>
> See gettext documentation for details:
> http://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html
>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
> ---
>
> I removed "Please," in favor of "Please" as Junio C Hamano sugested.

Thanks.  I think we should squash the following in, as all these
messages are now i18ned and without being marked with test_i18ncmp,
GETTEXT_POISON build would fail to pass these tests.

 t/t7609-merge-co-error-msgs.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/t/t7609-merge-co-error-msgs.sh b/t/t7609-merge-co-error-msgs.sh
index 0e4a682..6729cb3 100755
--- a/t/t7609-merge-co-error-msgs.sh
+++ b/t/t7609-merge-co-error-msgs.sh
@@ -37,14 +37,14 @@ EOF
 
 test_expect_success 'untracked files overwritten by merge (fast and non-fast forward)' '
 	test_must_fail git merge branch 2>out &&
-	test_cmp out expect &&
+	test_i18ncmp out expect &&
 	git commit --allow-empty -m empty &&
 	(
 		GIT_MERGE_VERBOSITY=0 &&
 		export GIT_MERGE_VERBOSITY &&
 		test_must_fail git merge branch 2>out2
 	) &&
-	test_cmp out2 expect &&
+	test_i18ncmp out2 expect &&
 	git reset --hard HEAD^
 '
 
@@ -53,7 +53,7 @@ error: Your local changes to the following files would be overwritten by merge:
 	four
 	three
 	two
-Please, commit your changes or stash them before you can merge.
+Please commit your changes or stash them before you can merge.
 error: The following untracked working tree files would be overwritten by merge:
 	five
 Please move or remove them before you can merge.
@@ -65,14 +65,14 @@ test_expect_success 'untracked files or local changes ovewritten by merge' '
 	git add three &&
 	git add four &&
 	test_must_fail git merge branch 2>out &&
-	test_cmp out expect
+	test_i18ncmp out expect
 '
 
 cat >expect <<\EOF
 error: Your local changes to the following files would be overwritten by checkout:
 	rep/one
 	rep/two
-Please, commit your changes or stash them before you can switch branches.
+Please commit your changes or stash them before you can switch branches.
 Aborting
 EOF
 
@@ -87,21 +87,21 @@ test_expect_success 'cannot switch branches because of local changes' '
 	echo uno >rep/one &&
 	echo dos >rep/two &&
 	test_must_fail git checkout branch 2>out &&
-	test_cmp out expect
+	test_i18ncmp out expect
 '
 
 cat >expect <<\EOF
 error: Your local changes to the following files would be overwritten by checkout:
 	rep/one
 	rep/two
-Please, commit your changes or stash them before you can switch branches.
+Please commit your changes or stash them before you can switch branches.
 Aborting
 EOF
 
 test_expect_success 'not uptodate file porcelain checkout error' '
 	git add rep/one rep/two &&
 	test_must_fail git checkout branch 2>out &&
-	test_cmp out expect
+	test_i18ncmp out expect
 '
 
 cat >expect <<\EOF
@@ -132,7 +132,7 @@ test_expect_success 'not_uptodate_dir porcelain checkout error' '
 	>rep/untracked-file &&
 	>rep2/untracked-file &&
 	test_must_fail git checkout branch 2>out &&
-	test_cmp out ../expect
+	test_i18ncmp out ../expect
 '
 
 test_done

  reply	other threads:[~2016-05-12 23:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 13:19 [PATCH v3 1/7] i18n: index-pack: use plural string instead of normal one Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 2/7] i18n: unpack-trees: mark strings for translation Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 3/7] i18n: git-parse-remote.sh: " Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 4/7] i18n: builtin/pull.c: mark placeholders " Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 5/7] i18n: builtin/pull.c: split strings marked " Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 6/7] i18n: builtin/rm.c: remove a comma ',' from string Vasco Almeida
2016-04-19 13:19 ` [PATCH v3 7/7] i18n: builtin/branch.c: mark option for translation Vasco Almeida
2016-04-19 19:06 ` [PATCH v3 1/7] i18n: index-pack: use plural string instead of normal one Junio C Hamano
2016-04-19 19:46   ` Junio C Hamano
2016-05-12 19:59 ` [PATCH v4 0/7] i18n miscellaneous updates Vasco Almeida
2016-05-12 21:10   ` Junio C Hamano
2016-05-12 19:59 ` [PATCH v4 1/7] i18n: index-pack: use plural string instead of normal one Vasco Almeida
2016-05-12 19:59 ` [PATCH v4 2/7] i18n: unpack-trees: mark strings for translation Vasco Almeida
2016-05-12 22:50   ` Junio C Hamano
2016-05-12 23:16     ` [PATCH] i18n: unpack-trees: avoid substituting only a verb in sentences Vasco Almeida
2016-05-12 23:28       ` Junio C Hamano [this message]
2016-05-12 23:30         ` Junio C Hamano
2016-05-12 19:59 ` [PATCH v4 3/7] i18n: git-parse-remote.sh: mark strings for translation Vasco Almeida
2016-05-12 19:59 ` [PATCH v4 4/7] i18n: builtin/pull.c: mark placeholders " Vasco Almeida
2016-05-12 19:59 ` [PATCH v4 5/7] i18n: builtin/pull.c: split strings marked " Vasco Almeida
2016-05-12 19:59 ` [PATCH v4 6/7] i18n: builtin/rm.c: remove a comma ',' from string Vasco Almeida
2016-05-12 21:05   ` Junio C Hamano
2016-05-12 19:59 ` [PATCH v4 7/7] i18n: builtin/branch.c: mark option for translation Vasco Almeida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqoa8ac0v1.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=vascomalmeida@sapo.pt \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox