All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Lars Hjemli" <hjemli@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH/RFC 04/12] gettextize: git-submodule die + eval_gettext messages
Date: Mon, 13 Sep 2010 22:09:10 +0000	[thread overview]
Message-ID: <1284415758-20931-5-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1284415758-20931-1-git-send-email-avarab@gmail.com>

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

diff --git a/git-submodule.sh b/git-submodule.sh
index 086acdd..1b3132f 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -35,7 +35,7 @@ resolve_relative_url ()
 {
 	remote=$(get_default_remote)
 	remoteurl=$(git config "remote.$remote.url") ||
-		die "remote ($remote) does not have a url defined in .git/config"
+		die "$(eval_gettext "remote (\$remote) does not have a url defined in .git/config")"
 	url="$1"
 	remoteurl=${remoteurl%/}
 	while test -n "$url"
@@ -76,7 +76,7 @@ module_name()
 	name=$( git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
 		sed -n -e 's|^submodule\.\(.*\)\.path '"$re"'$|\1|p' )
        test -z "$name" &&
-       die "No submodule mapping found in .gitmodules for path '$path'"
+       die "$(eval_gettext "No submodule mapping found in .gitmodules for path '\$path'")"
        echo "$name"
 }
 
@@ -102,11 +102,11 @@ module_clone()
 	if test -d "$path"
 	then
 		rmdir "$path" 2>/dev/null ||
-		die "Directory '$path' exists, but is neither empty nor a git repository"
+		die "$(eval_gettext "Directory '\$path' exists, but is neither empty nor a git repository")"
 	fi
 
 	test -e "$path" &&
-	die "A file already exist at path '$path'"
+	die "$(eval_gettext "A file already exist at path '\$path'")"
 
 	if test -n "$reference"
 	then
@@ -114,7 +114,7 @@ module_clone()
 	else
 		git-clone -n "$url" "$path"
 	fi ||
-	die "Clone of '$url' into submodule path '$path' failed"
+	die "$(eval_gettext "Clone of '\$url' into submodule path '\$path' failed")"
 }
 
 #
@@ -187,7 +187,7 @@ cmd_add()
 		realrepo=$repo
 		;;
 	*)
-		die "repo URL: '$repo' must be absolute or begin with ./|../"
+		die "$(eval_gettext "repo URL: '\$repo' must be absolute or begin with ./|../")"
 	;;
 	esac
 
@@ -204,7 +204,7 @@ cmd_add()
 			s|/*$||
 		')
 	git ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
-	die "'$path' already exists in the index"
+	die "$(eval_gettext "'\$path' already exists in the index")"
 
 	if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
 	then
@@ -221,7 +221,7 @@ cmd_add()
 		then
 			echo "$(eval_gettext "Adding existing repo at '\$path' to the index")"
 		else
-			die "'$path' already exists and is not a valid git repo"
+			die "$(eval_gettext "'\$path' already exists and is not a valid git repo")"
 		fi
 
 		case "$repo" in
@@ -244,16 +244,16 @@ cmd_add()
 			'') git checkout -f -q ;;
 			?*) git checkout -f -q -b "$branch" "origin/$branch" ;;
 			esac
-		) || die "Unable to checkout submodule '$path'"
+		) || die "$(eval_gettext "Unable to checkout submodule '\$path'")"
 	fi
 
 	git add $force "$path" ||
-	die "Failed to add submodule '$path'"
+	die "$(eval_gettext "Failed to add submodule '\$path'")"
 
 	git config -f .gitmodules submodule."$path".path "$path" &&
 	git config -f .gitmodules submodule."$path".url "$repo" &&
 	git add --force .gitmodules ||
-	die "Failed to register submodule '$path'"
+	die "$(eval_gettext "Failed to register submodule '\$path'")"
 }
 
 #
@@ -303,7 +303,7 @@ cmd_foreach()
 					cmd_foreach "--recursive" "$@"
 				fi
 			) ||
-			die "Stopping at '$path'; script returned non-zero status."
+			die "$(eval_gettext "Stopping at '\$path'; script returned non-zero status.")"
 		fi
 	done
 }
@@ -346,7 +346,7 @@ cmd_init()
 
 		url=$(git config -f .gitmodules submodule."$name".url)
 		test -z "$url" &&
-		die "No url found for submodule path '$path' in .gitmodules"
+		die "$(eval_gettext "No url found for submodule path '\$path' in .gitmodules")"
 
 		# Possibly a url relative to parent
 		case "$url" in
@@ -356,14 +356,14 @@ cmd_init()
 		esac
 
 		git config submodule."$name".url "$url" ||
-		die "Failed to register url for submodule path '$path'"
+		die "$(eval_gettext "Failed to register url for submodule path '\$path'")"
 
 		upd="$(git config -f .gitmodules submodule."$name".update)"
 		test -z "$upd" ||
 		git config submodule."$name".update "$upd" ||
-		die "Failed to register update mode for submodule path '$path'"
+		die "$(eval_gettext "Failed to register update mode for submodule path '\$path'")"
 
-		say "Submodule '$name' ($url) registered for path '$path'"
+		say "$(eval_gettext "Submodule '\$name' (\$url) registered for path '\$path'")"
 	done
 }
 
@@ -453,7 +453,7 @@ cmd_update()
 		else
 			subsha1=$(clear_local_git_env; cd "$path" &&
 				git rev-parse --verify HEAD) ||
-			die "Unable to find current revision in submodule path '$path'"
+			die "$(eval_gettext "Unable to find current revision in submodule path '\$path'")"
 		fi
 
 		if ! test -z "$update"
@@ -473,7 +473,7 @@ cmd_update()
 			then
 				(clear_local_git_env; cd "$path" &&
 					git-fetch) ||
-				die "Unable to fetch in submodule path '$path'"
+				die "$(eval_gettext "Unable to fetch in submodule path '\$path'")"
 			fi
 
 			case "$update_module" in
@@ -502,7 +502,7 @@ cmd_update()
 		if test -n "$recursive"
 		then
 			(clear_local_git_env; cd "$path" && cmd_update $orig_args) ||
-			die "Failed to recurse into submodule path '$path'"
+			die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
 		fi
 	done
 }
@@ -793,7 +793,7 @@ cmd_status()
 				cd "$path" &&
 				cmd_status $orig_args
 			) ||
-			die "Failed to recurse into submodule path '$path'"
+			die "$(eval_gettext "Failed to recurse into submodule path '\$path'")"
 		fi
 	done
 }
-- 
1.7.3.rc1.220.gb4d42

  parent reply	other threads:[~2010-09-13 22:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 22:09 [PATCH/RFC 00/12] gettextize: git-submodule Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 01/12] gettextize: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 02/12] gettextize: git-submodule echo + eval_gettext messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 03/12] gettextize: git-submodule say " Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-13 22:09 ` [PATCH/RFC 05/12] gettextize: git-submodule $update_module say + die messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 06/12] gettextize: git-submodule "cached cannot be used" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 07/12] gettextize: git-submodule "Submodule change[...]" messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 08/12] gettextize: git-submodule $errmsg messages Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 09/12] gettextize: git-submodule "Entering [...]" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 10/12] gettextize: git-submodule "[...] path is ignored" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 11/12] gettextize: git-submodule "path not initialized" message Ævar Arnfjörð Bjarmason
2010-09-13 22:09 ` [PATCH/RFC 12/12] gettextize: git-submodule "blob" and "submodule" 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=1284415758-20931-5-git-send-email-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hjemli@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.