Thread (10 messages) flat view 10 messages, 1 author, 2016-06-15
DORMANTno replies

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:32
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help