Merge branch 'maint'
[gitweb.git] / git-gui / lib / error.tcl
index d0253ae2ffa72e491784434ff6ad98ed675ff10c..13565b7ab02b22123f0b7b9000dc1f4a993994b0 100644 (file)
@@ -9,7 +9,7 @@ proc error_popup {msg} {
        set cmd [list tk_messageBox \
                -icon error \
                -type ok \
-               -title "$title: error" \
+               -title [append "$title: " [mc "error"]] \
                -message $msg]
        if {[winfo ismapped .]} {
                lappend cmd -parent .
@@ -25,7 +25,7 @@ proc warn_popup {msg} {
        set cmd [list tk_messageBox \
                -icon warning \
                -type ok \
-               -title "$title: warning" \
+               -title [append "$title: " [mc "warning"]] \
                -message $msg]
        if {[winfo ismapped .]} {
                lappend cmd -parent .
@@ -51,12 +51,15 @@ proc ask_popup {msg} {
        if {[reponame] ne {}} {
                append title " ([reponame])"
        }
-       return [tk_messageBox \
-               -parent . \
+       set cmd [list tk_messageBox \
                -icon question \
                -type yesno \
                -title $title \
                -message $msg]
+       if {[winfo ismapped .]} {
+               lappend cmd -parent .
+       }
+       eval $cmd
 }
 
 proc hook_failed_popup {hook msg} {
@@ -75,7 +78,7 @@ proc hook_failed_popup {hook msg} {
                -font font_diff \
                -yscrollcommand [list $w.m.sby set]
        label $w.m.l2 \
-               -text {You must correct the above errors before committing.} \
+               -text [mc "You must correct the above errors before committing."] \
                -anchor w \
                -justify left \
                -font font_uibold
@@ -96,6 +99,6 @@ proc hook_failed_popup {hook msg} {
 
        bind $w <Visibility> "grab $w; focus $w"
        bind $w <Key-Return> "destroy $w"
-       wm title $w "[appname] ([reponame]): error"
+       wm title $w [append "[appname] ([reponame]): " [mc "error"]]
        tkwait window $w
 }