From aa7abb454239c6e7fcf7675ee39c2909291eea13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 13 Sep 2010 19:22:37 +0000 Subject: [PATCH] gettextize: git-pull "rebase against" / "merge with" messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Gettextize the two messages that used "rebase against" and "merge with". Split them into two depending on whether we are rebasing or not. This results in some duplication, but makes it much easier for translators to translate these messages. Signed-off-by: Ævar Arnfjörð Bjarmason --- git-pull.sh | 84 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/git-pull.sh b/git-pull.sh index 380137b0a..833e62a92 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -132,15 +132,6 @@ error_on_no_merge_candidates () { esac done - if test true = "$rebase" - then - op_type=rebase - op_prep=against - else - op_type=merge - op_prep=with - fi - curr_branch=${curr_branch#refs/heads/} upstream=$(git config "branch.$curr_branch.merge") remote=$(git config "branch.$curr_branch.remote") @@ -169,30 +160,59 @@ Please specify which remote branch you want to use on the command line and try again (e.g. 'git pull '). See git-pull(1) for details."; echo elif [ -z "$upstream" ]; then - echo "You asked me to pull without telling me which branch you" - echo "want to $op_type $op_prep, and 'branch.${curr_branch}.merge' in" - echo "your configuration file does not tell me, either. Please" - echo "specify which branch you want to use on the command line and" - echo "try again (e.g. 'git pull ')." - echo "See git-pull(1) for details." - echo - echo "If you often $op_type $op_prep the same branch, you may want to" - echo "use something like the following in your configuration file:" - echo - echo " [branch \"${curr_branch}\"]" - echo " remote = " - echo " merge = " - test rebase = "$op_type" && - echo " rebase = true" - echo - echo " [remote \"\"]" - echo " url = " - echo " fetch = " - echo - echo "See git-config(1) for details." + if test true = "$rebase" + then + eval_gettext "You asked me to pull without telling me which branch you +want to rebase against, and 'branch.\${curr_branch}.merge' in +your configuration file does not tell me, either. Please +specify which branch you want to use on the command line and +try again (e.g. 'git pull '). +See git-pull(1) for details. + +If you often rebase against the same branch, you may want to +use something like the following in your configuration file: + + [branch \"\${curr_branch}\"] + remote = + merge = + rebase = true + + [remote \"\"] + url = + fetch = + +See git-config(1) for details."; echo + else + eval_gettext "You asked me to pull without telling me which branch you +want to merge with, and 'branch.\${curr_branch}.merge' in +your configuration file does not tell me, either. Please +specify which branch you want to use on the command line and +try again (e.g. 'git pull '). +See git-pull(1) for details. + +If you often merge with the same branch, you may want to +use something like the following in your configuration file: + + [branch \"\${curr_branch}\"] + remote = + merge = + + [remote \"\"] + url = + fetch = + +See git-config(1) for details."; echo + fi else - echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'" - echo "from the remote, but no such ref was fetched." + upstream_branch="${upstream#refs/heads/}" + if test true = "$rebase" + then + eval_gettext "Your configuration specifies to rebase against the ref '\$upstream_branch' +from the remote, but no such ref was fetched."; echo + else + eval_gettext "Your configuration specifies to merge with the ref '\$upstream_branch' +from the remote, but no such ref was fetched."; echo + fi fi exit 1 } -- 2.30.2