Merge branch 'va/i18n_2' into pu
authorPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 3 Oct 2016 22:40:50 +0000 (23:40 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Mon, 3 Oct 2016 22:40:50 +0000 (23:40 +0100)
17 files changed:
git-gui.sh
lib/blame.tcl
lib/branch_checkout.tcl
lib/branch_create.tcl
lib/branch_delete.tcl
lib/branch_rename.tcl
lib/browser.tcl
lib/database.tcl
lib/diff.tcl
lib/error.tcl
lib/merge.tcl
lib/option.tcl
lib/remote_add.tcl
lib/remote_branch_delete.tcl
lib/shortcut.tcl
lib/tools_dlg.tcl
lib/transport.tcl
index 5e3fb23300583755b16f112ca6c339ab2ef9fd94..f9b323abff381be44d056ee56105270830a43146 100755 (executable)
@@ -3029,7 +3029,7 @@ bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
 
 set subcommand_args {}
 proc usage {} {
-       set s "usage: $::argv0 $::subcommand $::subcommand_args"
+       set s "[mc usage:] $::argv0 $::subcommand $::subcommand_args"
        if {[tk windowingsystem] eq "win32"} {
                wm withdraw .
                tk_messageBox -icon info -message $s \
@@ -3161,7 +3161,7 @@ gui {
        # fall through to setup UI for commits
 }
 default {
-       set err "usage: $argv0 \[{blame|browser|citool}\]"
+       set err "[mc usage:] $argv0 \[{blame|browser|citool}\]"
        if {[tk windowingsystem] eq "win32"} {
                wm withdraw .
                tk_messageBox -icon error -message $err \
index b1d15f46218e793866bee9300684663e2c04fd29..a1aeb8b96e2df47c776bd1bb373fac6c5189a3ae 100644 (file)
@@ -70,7 +70,7 @@ constructor new {i_commit i_path i_jump} {
        set path   $i_path
 
        make_toplevel top w
-       wm title $top [append "[appname] ([reponame]): " [mc "File Viewer"]]
+       wm title $top [mc "%s (%s): File Viewer" [appname] [reponame]]
 
        set font_w [font measure font_diff "0"]
 
index 2e459a82976c6bf77cf1e9f2f1edeae8872a3364..d06037decc1a44ad0f0c153cd461a22a138f35ea 100644 (file)
@@ -13,7 +13,7 @@ constructor dialog {} {
        global use_ttk NS
        make_dialog top w
        wm withdraw $w
-       wm title $top [append "[appname] ([reponame]): " [mc "Checkout Branch"]]
+       wm title $top [mc "%s (%s): Checkout Branch" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index 4bb907705c5f1ea5a33596a9bbbb2ef5ccf66b9a..ba367d551d217f12cfae3c2f99cd19da58f1226f 100644 (file)
@@ -20,7 +20,7 @@ constructor dialog {} {
 
        make_dialog top w
        wm withdraw $w
-       wm title $top [append "[appname] ([reponame]): " [mc "Create Branch"]]
+       wm title $top [mc "%s (%s): Create Branch" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index 867938ec6a63ba77cc6efd700080e194d23d620f..a5051637bbc2388c4aab14479ded14d2c41df314 100644 (file)
@@ -13,7 +13,7 @@ constructor dialog {} {
 
        make_dialog top w
        wm withdraw $w
-       wm title $top [append "[appname] ([reponame]): " [mc "Delete Branch"]]
+       wm title $top [mc "%s (%s): Delete Branch" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
@@ -128,7 +128,7 @@ method _delete {} {
                set b [lindex $i 0]
                set o [lindex $i 1]
                if {[catch {git branch -D $b} err]} {
-                       append failed " - $b: $err\n"
+                       append failed [mc " - %s:" $b] " $err\n"
                }
        }
 
index 6e510ec2e39305e6d89de61ab2c925bcbc821a65..3a2d79a9cc3a1ade90db21721f75266d797c26f0 100644 (file)
@@ -12,7 +12,7 @@ constructor dialog {} {
 
        make_dialog top w
        wm withdraw $w
-       wm title $top [append "[appname] ([reponame]): " [mc "Rename Branch"]]
+       wm title $top [mc "%s (%s): Rename Branch" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index 0328338fda22c90c674630e0351982ff1bb2fbc4..158049353f4eca4ed9079b157f9951ab0cc53542 100644 (file)
@@ -24,7 +24,7 @@ constructor new {commit {path {}}} {
        global cursor_ptr M1B use_ttk NS
        make_dialog top w
        wm withdraw $top
-       wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
+       wm title $top [mc "%s (%s): File Browser" [appname] [reponame]]
 
        if {$path ne {}} {
                if {[string index $path end] ne {/}} {
@@ -272,7 +272,7 @@ constructor dialog {} {
        global use_ttk NS
        make_dialog top w
        wm withdraw $top
-       wm title $top [append "[appname] ([reponame]): " [mc "Browse Branch Files"]]
+       wm title $top [mc "%s (%s): Browse Branch Files" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
                wm transient $top .
index 1f187ed286f877eab84ea2bc13ae210de9660e21..85783081e0d887a7c7857f07670847ef1bc0629d 100644 (file)
@@ -54,7 +54,7 @@ proc do_stats {} {
                        set value "$value[lindex $s 2]"
                }
 
-               ${NS}::label $w.stat.l_$name -text "$label:" -anchor w
+               ${NS}::label $w.stat.l_$name -text [mc "%s:" $label] -anchor w
                ${NS}::label $w.stat.v_$name -text $value -anchor w
                grid $w.stat.l_$name $w.stat.v_$name -sticky we -padx {0 5}
        }
@@ -63,7 +63,7 @@ proc do_stats {} {
        bind $w <Visibility> "grab $w; focus $w.buttons.close"
        bind $w <Key-Escape> [list destroy $w]
        bind $w <Key-Return> [list destroy $w]
-       wm title $w [append "[appname] ([reponame]): " [mc "Database Statistics"]]
+       wm title $w [mc "%s (%s): Database Statistics" [appname] [reponame]]
        wm deiconify $w
        tkwait window $w
 }
index 30bdd691ee0447a0498e0ec06c1bcaa3379c2d3c..4cae10a4c7f197aab9ae0bc145254a8d4a1bae50 100644 (file)
@@ -223,10 +223,9 @@ proc show_other_diff {path w m cont_info} {
                }
                $ui_diff conf -state normal
                if {$type eq {submodule}} {
-                       $ui_diff insert end [append \
-                               "* " \
-                               [mc "Git Repository (subproject)"] \
-                               "\n"] d_info
+                       $ui_diff insert end \
+                               "* [mc "Git Repository (subproject)"]\n" \
+                               d_info
                } elseif {![catch {set type [exec file $path]}]} {
                        set n [string length $path]
                        if {[string equal -length $n $path $type]} {
@@ -611,7 +610,7 @@ proc apply_hunk {x y} {
                puts -nonewline $p $current_diff_header
                puts -nonewline $p [$ui_diff get $s_lno $e_lno]
                close $p} err]} {
-               error_popup [append $failed_msg "\n\n$err"]
+               error_popup "$failed_msg\n\n$err"
                unlock_index
                return
        }
@@ -829,7 +828,7 @@ proc apply_range_or_line {x y} {
                puts -nonewline $p $current_diff_header
                puts -nonewline $p $wholepatch
                close $p} err]} {
-               error_popup [append $failed_msg "\n\n$err"]
+               error_popup "$failed_msg\n\n$err"
        }
 
        unlock_index
index c0fa69af561b7789cdcfea46b14bf6d2646f5962..8968a57f33e37584e3589f03918db2cb89db24e9 100644 (file)
@@ -17,7 +17,7 @@ proc error_popup {msg} {
        set cmd [list tk_messageBox \
                -icon error \
                -type ok \
-               -title [append "$title: " [mc "error"]] \
+               -title [mc "%s: error" $title] \
                -message $msg]
        if {[winfo ismapped [_error_parent]]} {
                lappend cmd -parent [_error_parent]
@@ -33,7 +33,7 @@ proc warn_popup {msg} {
        set cmd [list tk_messageBox \
                -icon warning \
                -type ok \
-               -title [append "$title: " [mc "warning"]] \
+               -title [mc "%s: warning" $title] \
                -message $msg]
        if {[winfo ismapped [_error_parent]]} {
                lappend cmd -parent [_error_parent]
@@ -77,7 +77,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
        wm withdraw $w
 
        ${NS}::frame $w.m
-       ${NS}::label $w.m.l1 -text "$hook hook failed:" \
+       ${NS}::label $w.m.l1 -text [mc "%s hook failed:" $hook] \
                -anchor w \
                -justify left \
                -font font_uibold
@@ -113,7 +113,7 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
 
        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
 }
index 5ab6f8f10210a0e394315e247a2895d4577569f4..2b10a983898c8d918a68f2fbb70c9d3973de2797 100644 (file)
@@ -144,7 +144,7 @@ constructor dialog {} {
        }
 
        make_dialog top w
-       wm title $top [append "[appname] ([reponame]): " [mc "Merge"]]
+       wm title $top [mc "%s (%s): Merge" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index b5b6b2fea6c29ce7f1deb9e2c23060b92fbd83e4..e43971bfa3e0084e1a306fc82111895a301f905e 100644 (file)
@@ -179,7 +179,7 @@ proc do_options {} {
                        i-* {
                                regexp -- {-(\d+)\.\.(\d+)$} $type _junk min max
                                ${NS}::frame $w.$f.$optid
-                               ${NS}::label $w.$f.$optid.l -text "$text:"
+                               ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
                                pack $w.$f.$optid.l -side left -anchor w -fill x
                                tspinbox $w.$f.$optid.v \
                                        -textvariable ${f}_config_new($name) \
@@ -194,7 +194,7 @@ proc do_options {} {
                        c -
                        t {
                                ${NS}::frame $w.$f.$optid
-                               ${NS}::label $w.$f.$optid.l -text "$text:"
+                               ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
                                ${NS}::entry $w.$f.$optid.v \
                                        -width 20 \
                                        -textvariable ${f}_config_new($name)
@@ -217,7 +217,7 @@ proc do_options {} {
                        s {
                                set opts [eval [lindex $option 3]]
                                ${NS}::frame $w.$f.$optid
-                               ${NS}::label $w.$f.$optid.l -text "$text:"
+                               ${NS}::label $w.$f.$optid.l -text [mc "%s:" $text]
                                if {$use_ttk} {
                                        ttk::combobox $w.$f.$optid.v \
                                                -textvariable ${f}_config_new($name) \
@@ -279,7 +279,7 @@ proc do_options {} {
                        [font configure $font -size]
 
                ${NS}::frame $w.global.$name
-               ${NS}::label $w.global.$name.l -text "$text:"
+               ${NS}::label $w.global.$name.l -text [mc "%s:" $text]
                ${NS}::button $w.global.$name.b \
                        -text [mc "Change Font"] \
                        -command [list \
index 50029d0ceeee0fdab884754022e3015b3925f6f7..480a6b30d0a9c9aa4f667a618b0e852d637432dd 100644 (file)
@@ -17,7 +17,7 @@ constructor dialog {} {
 
        make_dialog top w
        wm withdraw $top
-       wm title $top [append "[appname] ([reponame]): " [mc "Add Remote"]]
+       wm title $top [mc "%s (%s): Add Remote" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index fcc06d03a1dfc4919f762d70e2809f29dab77390..5ba9fcadd17f315a4a47220f91f81ba964d64b08 100644 (file)
@@ -26,7 +26,7 @@ constructor dialog {} {
        global all_remotes M1B use_ttk NS
 
        make_dialog top w
-       wm title $top [append "[appname] ([reponame]): " [mc "Delete Branch Remotely"]]
+       wm title $top [mc "%s (%s): Delete Branch Remotely" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
        }
index 39d23f96dfcab14e5f921450522d332e39e70abe..97d1d7aa02686606912dd5ff7b512343083a17c0 100644 (file)
@@ -5,7 +5,7 @@ proc do_windows_shortcut {} {
        global _gitworktree
        set fn [tk_getSaveFile \
                -parent . \
-               -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
+               -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \
                -initialfile "Git [reponame].lnk"]
        if {$fn != {}} {
                if {[file extension $fn] ne {.lnk}} {
@@ -40,7 +40,7 @@ proc do_cygwin_shortcut {} {
        }
        set fn [tk_getSaveFile \
                -parent . \
-               -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
+               -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \
                -initialdir $desktop \
                -initialfile "Git [reponame].lnk"]
        if {$fn != {}} {
@@ -72,7 +72,7 @@ proc do_macosx_app {} {
 
        set fn [tk_getSaveFile \
                -parent . \
-               -title [append "[appname] ([reponame]): " [mc "Create Desktop Icon"]] \
+               -title [mc "%s (%s): Create Desktop Icon" [appname] [reponame]] \
                -initialdir [file join $env(HOME) Desktop] \
                -initialfile "Git [reponame].app"]
        if {$fn != {}} {
index 7eeda9daf23161a0abbe4abcc857ebfb0e18f9de..c05413ce432d2d37cc2461f1f1a739001c2220f4 100644 (file)
@@ -19,7 +19,7 @@ constructor dialog {} {
        global repo_config use_ttk NS
 
        make_dialog top w
-       wm title $top [append "[appname] ([reponame]): " [mc "Add Tool"]]
+       wm title $top [mc "%s (%s): Add Tool" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
                wm transient $top .
@@ -184,7 +184,7 @@ constructor dialog {} {
        load_config 1
 
        make_dialog top w
-       wm title $top [append "[appname] ([reponame]): " [mc "Remove Tool"]]
+       wm title $top [mc "%s (%s): Remove Tool" [appname] [reponame]]
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
                wm transient $top .
@@ -280,7 +280,7 @@ constructor dialog {fullname} {
        }
 
        make_dialog top w -autodelete 0
-       wm title $top [append "[appname] ([reponame]): " $title]
+       wm title $top "[mc "%s (%s):" [appname] [reponame]] $title"
        if {$top ne {.}} {
                wm geometry $top "+[winfo rootx .]+[winfo rooty .]"
                wm transient $top .
index e5d211edea05cbfb856e81a9d683a5fb0f4f4b20..a1a424aab540663957c96a37cd277ae666287051 100644 (file)
@@ -226,7 +226,7 @@ proc do_push_anywhere {} {
        bind $w <Visibility> "grab $w; focus $w.buttons.create"
        bind $w <Key-Escape> "destroy $w"
        bind $w <Key-Return> [list start_push_anywhere_action $w]
-       wm title $w [append "[appname] ([reponame]): " [mc "Push"]]
+       wm title $w [mc "%s (%s): Push" [appname] [reponame]]
        wm deiconify $w
        tkwait window $w
 }