From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 35/51] i18n: git-stash die + gettext messages
Date: Sun, 3 Apr 2011 16:45:59 +0000 [thread overview]
Message-ID: <1301849175-1697-36-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1301849175-1697-1-git-send-email-avarab@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
git-stash.sh | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index 1fe8918..753ddf2 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -40,7 +40,7 @@ no_changes () {
clear_stash () {
if test $# != 0
then
- die "git stash clear with parameters is unimplemented"
+ die "$(gettext "git stash clear with parameters is unimplemented")"
fi
if current=$(git rev-parse --verify $ref_stash 2>/dev/null)
then
@@ -62,7 +62,7 @@ create_stash () {
then
head=$(git rev-list --oneline -n 1 HEAD --)
else
- die "You do not have the initial commit yet"
+ die "$(gettext "You do not have the initial commit yet")"
fi
if branch=$(git symbolic-ref -q HEAD)
@@ -77,7 +77,7 @@ create_stash () {
i_tree=$(git write-tree) &&
i_commit=$(printf 'index on %s\n' "$msg" |
git commit-tree $i_tree -p $b_commit) ||
- die "Cannot save the current index state"
+ die "$(gettext "Cannot save the current index state")"
if test -z "$patch_mode"
then
@@ -91,7 +91,7 @@ create_stash () {
git write-tree &&
rm -f "$TMPindex"
) ) ||
- die "Cannot save the current worktree state"
+ die "$(gettext "Cannot save the current worktree state")"
else
@@ -104,14 +104,14 @@ create_stash () {
# state of the working tree
w_tree=$(GIT_INDEX_FILE="$TMP-index" git write-tree) ||
- die "Cannot save the current worktree state"
+ die "$(gettext "Cannot save the current worktree state")"
git diff-tree -p HEAD $w_tree > "$TMP-patch" &&
test -s "$TMP-patch" ||
- die "No changes selected"
+ die "$(gettext "No changes selected")"
rm -f "$TMP-index" ||
- die "Cannot remove temporary index (can't happen)"
+ die "$(gettext "Cannot remove temporary index (can't happen)")"
fi
@@ -124,7 +124,7 @@ create_stash () {
fi
w_commit=$(printf '%s\n' "$stash_msg" |
git commit-tree $w_tree -p $b_commit -p $i_commit) ||
- die "Cannot record working tree state"
+ die "$(gettext "Cannot record working tree state")"
}
save_stash () {
@@ -171,7 +171,7 @@ save_stash () {
exit 0
fi
test -f "$GIT_DIR/logs/$ref_stash" ||
- clear_stash || die "Cannot initialize stash"
+ clear_stash || die "$(gettext "Cannot initialize stash")"
create_stash "$stash_msg"
@@ -179,7 +179,7 @@ save_stash () {
: >>"$GIT_DIR/logs/$ref_stash"
git update-ref -m "$stash_msg" $ref_stash $w_commit ||
- die "Cannot save the current status"
+ die "$(gettext "Cannot save the current status")"
say Saved working directory and index state "$stash_msg"
if test -z "$patch_mode"
@@ -192,7 +192,7 @@ save_stash () {
fi
else
git apply -R < "$TMP-patch" ||
- die "Cannot remove worktree changes"
+ die "$(gettext "Cannot remove worktree changes")"
if test -z "$keep_index"
then
@@ -287,7 +287,7 @@ parse_flags_and_rev()
case $# in
0)
- have_stash || die "No stash found."
+ have_stash || die "$(gettext "No stash found.")"
set -- ${ref_stash}@{0}
;;
1)
@@ -347,11 +347,11 @@ apply_stash () {
git update-index -q --refresh &&
git diff-files --quiet --ignore-submodules ||
- die 'Cannot apply to a dirty working tree, please stage your changes'
+ die "$(gettext "Cannot apply to a dirty working tree, please stage your changes")"
# current index state
c_tree=$(git write-tree) ||
- die 'Cannot apply a stash in the middle of a merge'
+ die "$(gettext "Cannot apply a stash in the middle of a merge")"
unstashed_index_tree=
if test -n "$INDEX_OPTION" && test "$b_tree" != "$i_tree" &&
@@ -359,9 +359,9 @@ apply_stash () {
then
git diff-tree --binary $s^2^..$s^2 | git apply --cached
test $? -ne 0 &&
- die 'Conflicts in index. Try without --index.'
+ die "$(gettext "Conflicts in index. Try without --index.")"
unstashed_index_tree=$(git write-tree) ||
- die 'Could not save index tree'
+ die "$(gettext "Could not save index tree")"
git reset
fi
@@ -387,7 +387,7 @@ apply_stash () {
git diff-index --cached --name-only --diff-filter=A $c_tree >"$a" &&
git read-tree --reset $c_tree &&
git update-index --add --stdin <"$a" ||
- die "Cannot unstage modified files"
+ die "$(gettext "Cannot unstage modified files")"
rm -f "$a"
fi
squelch=
@@ -425,7 +425,7 @@ drop_stash () {
}
apply_to_branch () {
- test -n "$1" || die 'No branch name specified'
+ test -n "$1" || die "$(gettext "No branch name specified")"
branch=$1
shift 1
--
1.7.4.1
next prev parent reply other threads:[~2011-04-03 16:48 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
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 ` Ævar Arnfjörð Bjarmason [this message]
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=1301849175-1697-36-git-send-email-avarab@gmail.com \
--to=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).