git-gui: include the file path in guitools confirmation dialog

For those guitools that require a filename, display this filename when
asking the user to confirm the tool launch.

[PT: modified to use positional parameters for i18n]

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
Bert Wesarg 2011-10-20 21:32:30 +02:00 committed by Pat Thoyts
parent ff3f01bba9
commit 95fa862b57

View file

@ -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 %1\$s on file \"%2\$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
}
}
}