summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorBernt Hansen <bernt@norang.ca>2009-11-02 12:41:00 (GMT)
committerPaul Mackerras <paulus@samba.org>2009-11-03 11:28:42 (GMT)
commit8d849957d81fc0480a52570d66cc3c2a688ecb1b (patch)
tree294e800c37569568ca52a8ff17a2ea60ac9c7256 /gitk
parentd40bc70ab88ab0d8fde20650c6ca132d3ca3cd2c (diff)
downloadgit-8d849957d81fc0480a52570d66cc3c2a688ecb1b.zip
git-8d849957d81fc0480a52570d66cc3c2a688ecb1b.tar.gz
git-8d849957d81fc0480a52570d66cc3c2a688ecb1b.tar.bz2
gitk: Skip translation of "wrong Tcl version" message
We check the required Tcl version number before we setup msgcat for language translation. If the Tcl version is too old just display the untranslated error text. The caller of show_error can now pass an alternative function for mc. The Tcl list function turns the translation into a no-op. This fixes the error: Error in startup script: invalid command name "mc" when attempting to start gitk with Tcl 8.3. Tested with both Tcl 8.3 and 8.4. Signed-off-by: Bernt Hansen <bernt@norang.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk8
1 files changed, 4 insertions, 4 deletions
diff --git a/gitk b/gitk
index 59d5925..db5ec54 100755
--- a/gitk
+++ b/gitk
@@ -1787,10 +1787,10 @@ proc make_transient {window origin} {
}
}
-proc show_error {w top msg} {
+proc show_error {w top msg {mc mc}} {
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- button $w.ok -text [mc OK] -command "destroy $top"
+ button $w.ok -text [$mc OK] -command "destroy $top"
pack $w.ok -side bottom -fill x
bind $top <Visibility> "grab $top; focus $top"
bind $top <Key-Return> "destroy $top"
@@ -11034,8 +11034,8 @@ proc get_path_encoding {path} {
# First check that Tcl/Tk is recent enough
if {[catch {package require Tk 8.4} err]} {
- show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
- Gitk requires at least Tcl/Tk 8.4."]
+ show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
+ Gitk requires at least Tcl/Tk 8.4." list
exit 1
}