summaryrefslogtreecommitdiff
path: root/git-submodule.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-13 18:24:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-13 18:24:10 (GMT)
commit2703572b3a005848ed058d2775fb933a17ac3656 (patch)
tree8e4d016d4f8eb1975fb2b2325bdafd5ca74cd40f /git-submodule.sh
parentb1ec08fda8e0c3ed19b680404770ca4ec313ca8c (diff)
parent415c7dd026e4649bea48c35ccbe29d2fa8b69be5 (diff)
downloadgit-2703572b3a005848ed058d2775fb933a17ac3656.zip
git-2703572b3a005848ed058d2775fb933a17ac3656.tar.gz
git-2703572b3a005848ed058d2775fb933a17ac3656.tar.bz2
Merge branch 'va/i18n-even-more'
More markings of messages for i18n, with updates to various tests to pass GETTEXT_POISON tests. One patch from the original submission dropped due to conflicts with jk/upload-pack-hook, which is still in flux. * va/i18n-even-more: (38 commits) t5541: become resilient to GETTEXT_POISON i18n: branch: mark comment when editing branch description for translation i18n: unmark die messages for translation i18n: submodule: escape shell variables inside eval_gettext i18n: submodule: join strings marked for translation i18n: init-db: join message pieces i18n: remote: allow translations to reorder message i18n: remote: mark URL fallback text for translation i18n: standardise messages i18n: sequencer: add period to error message i18n: merge: change command option help to lowercase i18n: merge: mark messages for translation i18n: notes: mark options for translation i18n: notes: mark strings for translation i18n: transport-helper.c: change N_() call to _() i18n: bisect: mark strings for translation t5523: use test_i18ngrep for negation t4153: fix negated test_i18ngrep call t9003: become resilient to GETTEXT_POISON tests: unpack-trees: update to use test_i18n* functions ...
Diffstat (limited to 'git-submodule.sh')
-rwxr-xr-xgit-submodule.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/git-submodule.sh b/git-submodule.sh
index 7c62b53..4ec7546 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -16,7 +16,6 @@ USAGE="[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <re
OPTIONS_SPEC=
SUBDIRECTORY_OK=Yes
. git-sh-setup
-. git-sh-i18n
. git-parse-remote
require_work_tree
wt_prefix=$(git rev-parse --show-prefix)
@@ -240,14 +239,15 @@ Use -f if you really want to add it." >&2
then
if test -z "$force"
then
- echo >&2 "$(eval_gettext "A git directory for '\$sm_name' is found locally with remote(s):")"
+ eval_gettextln >&2 "A git directory for '\$sm_name' is found locally with remote(s):"
GIT_DIR=".git/modules/$sm_name" GIT_WORK_TREE=. git remote -v | grep '(fetch)' | sed -e s,^," ", -e s,' (fetch)',, >&2
- echo >&2 "$(eval_gettext "If you want to reuse this local git directory instead of cloning again from")"
- echo >&2 " $realrepo"
- echo >&2 "$(eval_gettext "use the '--force' option. If the local git directory is not the correct repo")"
- die "$(eval_gettext "or you are unsure what this means choose another name with the '--name' option.")"
+ die "$(eval_gettextln "\
+If you want to reuse this local git directory instead of cloning again from
+ \$realrepo
+use the '--force' option. If the local git directory is not the correct repo
+or you are unsure what this means choose another name with the '--name' option.")"
else
- echo "$(eval_gettext "Reactivating local git directory for submodule '\$sm_name'.")"
+ eval_gettextln "Reactivating local git directory for submodule '\$sm_name'."
fi
fi
git submodule--helper clone ${GIT_QUIET:+--quiet} --prefix "$wt_prefix" --path "$sm_path" --name "$sm_name" --url "$realrepo" ${reference:+"$reference"} ${depth:+"$depth"} || exit
@@ -438,8 +438,9 @@ cmd_deinit()
# Protect submodules containing a .git directory
if test -d "$sm_path/.git"
then
- echo >&2 "$(eval_gettext "Submodule work tree '\$displaypath' contains a .git directory")"
- die "$(eval_gettext "(use 'rm -rf' if you really want to remove it including all of its history)")"
+ die "$(eval_gettext "\
+Submodule work tree '\$displaypath' contains a .git directory
+(use 'rm -rf' if you really want to remove it including all of its history)")"
fi
if test -z "$force"
@@ -624,7 +625,7 @@ cmd_update()
remote_name=$(sanitize_submodule_env; cd "$sm_path" && get_default_remote)
sha1=$(sanitize_submodule_env; cd "$sm_path" &&
git rev-parse --verify "${remote_name}/${branch}") ||
- die "$(eval_gettext "Unable to find current ${remote_name}/${branch} revision in submodule path '\$sm_path'")"
+ die "$(eval_gettext "Unable to find current \${remote_name}/\${branch} revision in submodule path '\$sm_path'")"
fi
if test "$subsha1" != "$sha1" || test -n "$force"
@@ -648,7 +649,7 @@ cmd_update()
# not be reachable from any of the refs
is_tip_reachable "$sm_path" "$sha1" ||
fetch_in_submodule "$sm_path" "$sha1" ||
- die "$(eval_gettext "Fetched in submodule path '\$displaypath', but it did not contain $sha1. Direct fetching of that commit failed.")"
+ die "$(eval_gettext "Fetched in submodule path '\$displaypath', but it did not contain \$sha1. Direct fetching of that commit failed.")"
fi
must_die_on_failure=