git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC 6/8] gettextize: git-pull "You asked to pull" message

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 13, 2010, 19:35 UTC
Message-ID
<1284406558-23684-7-git-send-email-avarab@gmail.com>
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
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 8 of 10 in “gettextize: git-pull”
  1. 0/8 gettextize: git-pullÆvar Arnfjörð Bjarmason, Sep 13, 2010
  2. 1/8 gettextize: git-pull add git-sh-i18nÆvar Arnfjörð Bjarmason, Sep 13, 2010
  3. 2/8 gettextize: git-pull die messagesÆvar Arnfjörð Bjarmason, Sep 13, 2010
  4. 3/8 gettextize: git-pull eval_gettext + die messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  5. Ævar Arnfjörð BjarmasonSep 13, 2010
  6. 4/8 gettextize: git-pull eval_gettext + warning messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  7. 5/8 gettextize: git-pull split up "no candidate" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  8. 6/8 gettextize: git-pull "You asked to pull" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  9. 7/8 gettextize: git-pull "[...] not currently on a branch" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  10. 8/8 gettextize: git-pull "rebase against" / "merge with" messagesÆvar Arnfjörð Bjarmason, Sep 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.