git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 19/51] i18n: git-pull "rebase against" / "merge with" messages
Date: Sun, 3 Apr 2011 13:33:25 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1104031314520.25129@debian> (raw)
In-Reply-To: <1301849175-1697-20-git-send-email-avarab@gmail.com>

On Sun, 3 Apr 2011, ?var Arnfj?r? Bjarmason wrote:

> Gettextize the two messages that used "rebase against" and "merge
> with". Split them into two depending on whether we are rebasing or not.

I think this conflicts a lot with my 15a147e (rebase: use @{upstream}
if no upstream specified, 2011-02-09), which factored out most or all
of the code touched in your patch a reused it in git-rebase.sh. I
remember thinking about i18n at some point while extracting that code,
but then I forgot about it. I have inlcluded the relevant part of that
patch below for your reference. As you can see, I added another
variable $cmd that is either "pull" or "rebase". It is used in plain
text because the command matches the verb in English, but I guess that
may not be ideal in all translations. Maybe we extract some parts of
the message, so we don't have to make four nearly identical copies of
the message... I don't have any concrete suggestion right now, though.

+error_on_missing_default_upstream () {
+	cmd="$1"
+	op_type="$2"
+	op_prep="$3"
+	example="$4"
+	branch_name=$(git symbolic-ref -q HEAD)
+	if test -z "$branch_name"
+	then
+		echo "You are not currently on a branch, so I cannot use any
+'branch.<branchname>.merge' in your configuration file.
+Please specify which branch you want to $op_type $op_prep on the command
+line and try again (e.g. '$example').
+See git-${cmd}(1) for details."
+	else
+		echo "You asked me to $cmd without telling me which branch you
+want to $op_type $op_prep, and 'branch.${branch_name#refs/heads/}.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. '$example').
+See git-${cmd}(1) for details.
+
+If you often $op_type $op_prep the same branch, you may want to
+use something like the following in your configuration file:
+    [branch \"${branch_name#refs/heads/}\"]
+    remote = <nickname>
+    merge = <remote-ref>"
+		test rebase = "$op_type" &&
+		echo "    rebase = true"
+		echo "
+    [remote \"<nickname>\"]
+    url = <url>
+    fetch = <refspec>
+
+See git-config(1) for details."
+	fi
+	exit 1
+}

  reply	other threads:[~2011-04-03 17:33 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-03 16:45 [PATCH 00/51] i18n: Shell script translations Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 01/51] i18n: git-am add git-sh-i18n Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 02/51] i18n: git-am one-line gettext $msg; echo Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 03/51] i18n: git-am multi-line getttext " Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 04/51] i18n: git-am eval_gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 05/51] i18n: git-am echo + gettext message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 06/51] i18n: git-am die messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 07/51] i18n: git-am cannot_fallback messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 08/51] i18n: git-am clean_abort messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 09/51] i18n: git-am "Apply?" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 10/51] i18n: git-am core say messages Ævar Arnfjörð Bjarmason
2011-04-03 17:33   ` Jakub Narebski
2011-04-03 17:35     ` Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 11/51] i18n: git-am printf(1) message to eval_gettext Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 12/51] i18n: git-pull add git-sh-i18n Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 13/51] i18n: git-pull die messages Ævar Arnfjörð Bjarmason
2011-04-03 18:14   ` Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 14/51] i18n: git-pull eval_gettext + die message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 15/51] i18n: git-pull eval_gettext + warning message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 16/51] i18n: git-pull split up "no candidate" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 17/51] i18n: git-pull "You asked to pull" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 18/51] i18n: git-pull "[...] not currently on a branch" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 19/51] i18n: git-pull "rebase against" / "merge with" messages Ævar Arnfjörð Bjarmason
2011-04-03 17:33   ` Martin von Zweigbergk [this message]
2011-04-04  7:39     ` Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 20/51] i18n: git-submodule add git-sh-i18n Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 21/51] i18n: git-submodule echo + eval_gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 22/51] i18n: git-submodule say " Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 23/51] i18n: git-submodule die " Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 24/51] i18n: git-submodule $update_module say + die messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 25/51] i18n: git-submodule "cached cannot be used" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 26/51] i18n: git-submodule "Submodule change[...]" messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 27/51] i18n: git-submodule $errmsg messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 28/51] i18n: git-submodule "Entering [...]" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 29/51] i18n: git-submodule "[...] path is ignored" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 30/51] i18n: git-submodule "path not initialized" message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 31/51] i18n: git-submodule "blob" and "submodule" messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 32/51] i18n: git-stash add git-sh-i18n Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 33/51] i18n: git-stash echo + gettext message Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 34/51] i18n: git-stash say + gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:45 ` [PATCH 35/51] i18n: git-stash die " Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 36/51] i18n: git-stash die + eval_gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 37/51] i18n: git-stash die + eval_gettext $* messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 38/51] i18n: git-stash die + eval_gettext $1 messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 39/51] i18n: git-stash "unknown option" message Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 40/51] i18n: git-stash drop_stash say/die messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 41/51] i18n: git-bisect add git-sh-i18n Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 42/51] i18n: git-bisect gettext + echo message Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 43/51] i18n: git-bisect echo + gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 44/51] i18n: git-bisect echo + eval_gettext message Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 45/51] i18n: git-bisect die + gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 46/51] i18n: git-bisect die + eval_gettext messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 47/51] i18n: git-bisect bisect_run + $@ messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 48/51] i18n: git-bisect bisect_reset + $1 messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 49/51] i18n: git-bisect bisect_replay " Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 50/51] i18n: git-bisect [Y/n] messages Ævar Arnfjörð Bjarmason
2011-04-03 16:46 ` [PATCH 51/51] i18n: git-bisect bisect_next_check "You need to" message Ævar Arnfjörð Bjarmason
2011-04-03 19:05 ` [PATCH 00/51] i18n: Shell script translations Junio C Hamano
2011-04-10 13:04   ` Æ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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1104031314520.25129@debian \
    --to=martin.von.zweigbergk@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).