git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC 2/8] gettextize: git-pull die messages

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 13, 2010, 19:35 UTC
Message-ID
<1284406558-23684-3-git-send-email-avarab@gmail.com>
In-Reply-To
<1284406558-23684-1-git-send-email-avarab@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 git-pull.sh |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/git-pull.sh b/git-pull.sh
index 544b73f..324ac95 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -18,20 +18,20 @@ cd_to_toplevel
 die_conflict () {
     git diff-index --cached --name-status -r --ignore-submodules HEAD --
     if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
-	die "Pull is not possible because you have unmerged files.
+	die "$(gettext "Pull is not possible because you have unmerged files.
 Please, fix them up in the work tree, and then use 'git add/rm <file>'
-as appropriate to mark resolution, or use 'git commit -a'."
+as appropriate to mark resolution, or use 'git commit -a'.")"
     else
-	die "Pull is not possible because you have unmerged files."
+	die "$(gettext "Pull is not possible because you have unmerged files.")"
     fi
 }
 
 die_merge () {
     if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
-	die "You have not concluded your merge (MERGE_HEAD exists).
-Please, commit your changes before you can merge."
+	die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).
+Please, commit your changes before you can merge.")"
     else
-	die "You have not concluded your merge (MERGE_HEAD exists)."
+	die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).")"
     fi
 }
 
@@ -199,13 +199,13 @@ test true = "$rebase" && {
 		# On an unborn branch
 		if test -f "$GIT_DIR/index"
 		then
-			die "updating an unborn branch with changes added to the index"
+			die "$(gettext "updating an unborn branch with changes added to the index")"
 		fi
 	else
 		git update-index --ignore-submodules --refresh &&
 		git diff-files --ignore-submodules --quiet &&
 		git diff-index --ignore-submodules --cached --quiet HEAD -- ||
-		die "refusing to pull with rebase: your working tree is not up-to-date"
+		die "$(gettext "refusing to pull with rebase: your working tree is not up-to-date")"
 	fi
 	oldremoteref= &&
 	. git-parse-remote &&
@@ -258,11 +258,11 @@ case "$merge_head" in
 ?*' '?*)
 	if test -z "$orig_head"
 	then
-		die "Cannot merge multiple branches into empty head"
+		die "$(gettext "Cannot merge multiple branches into empty head")"
 	fi
 	if test true = "$rebase"
 	then
-		die "Cannot rebase onto multiple branches"
+		die "$(gettext "Cannot rebase onto multiple branches")"
 	fi
 	;;
 esac
-- 
1.7.3.rc1.110.g6776a.dirty
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 3 of 10 in “gettextize: git-pull”
  1. 0/8 gettextize: git-pullÆvar Arnfjörð Bjarmason, Sep 13, 2010
  2. 1/8 gettextize: git-pull add git-sh-i18nÆvar Arnfjörð Bjarmason, Sep 13, 2010
  3. 2/8 gettextize: git-pull die messagesÆvar Arnfjörð Bjarmason, Sep 13, 2010
  4. 3/8 gettextize: git-pull eval_gettext + die messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  5. Ævar Arnfjörð BjarmasonSep 13, 2010
  6. 4/8 gettextize: git-pull eval_gettext + warning messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  7. 5/8 gettextize: git-pull split up "no candidate" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  8. 6/8 gettextize: git-pull "You asked to pull" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  9. 7/8 gettextize: git-pull "[...] not currently on a branch" messageÆvar Arnfjörð Bjarmason, Sep 13, 2010
  10. 8/8 gettextize: git-pull "rebase against" / "merge with" messagesÆvar Arnfjörð Bjarmason, Sep 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.