Skip to content

Commit

Permalink
git-gui i18n: internationalize use of colon punctuation
Browse files Browse the repository at this point in the history
Internationalize use of colon punctuation ':' in options window, windows
titles, database statistics window. Some languages might use a different
style, for instance French uses "User Name :" (space before colon).

Signed-off-by: Vasco Almeida <[email protected]>
Signed-off-by: Pat Thoyts <[email protected]>
  • Loading branch information
vascool authored and patthoyts committed Oct 3, 2016
1 parent 99ba48e commit eca9636
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/branch_delete.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/database.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/error.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
8 changes: 4 additions & 4 deletions lib/option.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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)
Expand All @@ -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) \
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit eca9636

Please sign in to comment.