git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Jan Krüger" <jk@jk.gs>, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH/RFC 6/8] gettextize: git-pull "You asked to pull" message
Date: Mon, 13 Sep 2010 19:35:56 +0000	[thread overview]
Message-ID: <1284406558-23684-7-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1284406558-23684-1-git-send-email-avarab@gmail.com>

Gettextize the "You asked to pull" error message. This message
interpolated $1 which won't work with eval_gettext for obvious
reasons, so I needed to provide an alias for it.

This also made the message easier to translate, and I added a
TRANSLATORS comment to make it even easier.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-pull.sh |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/git-pull.sh b/git-pull.sh
index bbb2a0a..6ab09b6 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -156,9 +156,12 @@ Generally this means that you provided a wildcard refspec which had no
 matches on the remote end."; echo
 		fi
 	elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then
-		echo "You asked to pull from the remote '$1', but did not specify"
-		echo "a branch. Because this is not the default configured remote"
-		echo "for your current branch, you must specify a branch on the command line."
+		requested_remote=$1
+		# TRANSLATORS: $requested_remote will be a remote name, like
+		# "origin" or "avar"
+		eval_gettext "You asked to pull from the remote '\$requested_remote', but did not specify
+a branch. Because this is not the default configured remote
+for your current branch, you must specify a branch on the command line."; echo
 	elif [ -z "$curr_branch" ]; then
 		echo "You are not currently on a branch, so I cannot use any"
 		echo "'branch.<branchname>.merge' in your configuration file."
-- 
1.7.3.rc1.110.g6776a.dirty

  parent reply	other threads:[~2010-09-13 19:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 19:35 [PATCH/RFC 0/8] gettextize: git-pull Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 1/8] gettextize: git-pull add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 2/8] gettextize: git-pull die messages Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 3/8] gettextize: git-pull eval_gettext + die message Ævar Arnfjörð Bjarmason
2010-09-13 21:57   ` Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 4/8] gettextize: git-pull eval_gettext + warning message Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 5/8] gettextize: git-pull split up "no candidate" message Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-13 19:35 ` [PATCH/RFC 7/8] gettextize: git-pull "[...] not currently on a branch" message Ævar Arnfjörð Bjarmason
2010-09-13 19:35 ` [PATCH/RFC 8/8] gettextize: git-pull "rebase against" / "merge with" messages Ævar Arnfjörð Bjarmason

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=1284406558-23684-7-git-send-email-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jk@jk.gs \
    /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;
as well as URLs for NNTP newsgroup(s).