From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one
Date: Fri, 21 Oct 2011 23:19:40 +0100 [thread overview]
Message-ID: <87ipni3s3n.fsf@fox.patthoyts.tk> (raw)
In-Reply-To: <2fef219736a0787ed864b5c18adf31f7a4e8acda.1319139139.git.bert.wesarg@googlemail.com> (Bert Wesarg's message of "Thu, 20 Oct 2011 21:32:30 +0200")
Bert Wesarg <bert.wesarg@googlemail.com> writes:
>Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>---
> lib/tools.tcl | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
>diff --git a/lib/tools.tcl b/lib/tools.tcl
>index 95e6e55..39e08f0 100644
>--- a/lib/tools.tcl
>+++ b/lib/tools.tcl
>@@ -87,8 +87,14 @@ proc tools_exec {fullname} {
> return
> }
> } elseif {[is_config_true "guitool.$fullname.confirm"]} {
>- if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
>- return
>+ if {[is_config_true "guitool.$fullname.needsfile"]} {
>+ if {[ask_popup [mc "Are you sure you want to run %s on file \"%s\"?" $fullname $current_diff_path]] ne {yes}} {
>+ return
>+ }
>+ } else {
>+ if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
>+ return
>+ }
> }
> }
This looks good. I modified the string there to use positional
parameters as sometimes translations need to re-order things and the
msgcat format can support this using [mc {%2$s and %1$d} $first $second]
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
next prev parent reply other threads:[~2011-10-21 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 19:32 [PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one Bert Wesarg
2011-10-21 22:19 ` Pat Thoyts [this message]
2011-10-21 22:43 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ipni3s3n.fsf@fox.patthoyts.tk \
--to=patthoyts@users.sourceforge.net \
--cc=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox