]> git.ipfire.org Git - thirdparty/git.git/blobdiff - lib/error.tcl
git-gui i18n: internationalize use of colon punctuation
[thirdparty/git.git] / lib / error.tcl
index 08a24622c7ff199399805ef34f0396f6cb81613c..9b7d2294baab90d8d67130b4f3336b998c6b8159 100644 (file)
@@ -47,7 +47,7 @@ proc info_popup {msg} {
                append title " ([reponame])"
        }
        tk_messageBox \
-               -parent $parent \
+               -parent [_error_parent] \
                -icon info \
                -type ok \
                -title $title \
@@ -71,24 +71,28 @@ proc ask_popup {msg} {
 }
 
 proc hook_failed_popup {hook msg {is_fatal 1}} {
+       global use_ttk NS
        set w .hookfail
-       toplevel $w
+       Dialog $w
+       wm withdraw $w
 
-       frame $w.m
-       label $w.m.l1 -text "$hook hook failed:" \
+       ${NS}::frame $w.m
+       ${NS}::label $w.m.l1 -text "$hook hook failed:" \
                -anchor w \
                -justify left \
                -font font_uibold
        text $w.m.t \
-               -background white -borderwidth 1 \
+               -background white \
+               -foreground black \
+               -borderwidth 1 \
                -relief sunken \
                -width 80 -height 10 \
                -font font_diff \
                -yscrollcommand [list $w.m.sby set]
-       scrollbar $w.m.sby -command [list $w.m.t yview]
+       ${NS}::scrollbar $w.m.sby -command [list $w.m.t yview]
        pack $w.m.l1 -side top -fill x
        if {$is_fatal} {
-               label $w.m.l2 \
+               ${NS}::label $w.m.l2 \
                        -text [mc "You must correct the above errors before committing."] \
                        -anchor w \
                        -justify left \
@@ -102,13 +106,14 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
        $w.m.t insert 1.0 $msg
        $w.m.t conf -state disabled
 
-       button $w.ok -text OK \
+       ${NS}::button $w.ok -text OK \
                -width 15 \
                -command "destroy $w"
        pack $w.ok -side bottom -anchor e -pady 10 -padx 10
 
        bind $w <Visibility> "grab $w; focus $w"
        bind $w <Key-Return> "destroy $w"
-       wm title $w [strcat "[appname] ([reponame]): " [mc "error"]]
+       wm title $w [mc "%s (%s): error" [appname] [reponame]]
+       wm deiconify $w
        tkwait window $w
 }