Skip to content

Commit 7905603

Browse files
committed
gitk: Regenerate .po files
This is the result of running make update-po and removing or fixing the strings that were fuzzily matched. The ones that were fixed were the ones where the only change was "git rev-list" to "git log", and the "about gitk" message where the copyright year got updated. To get xgettext to see the menu labels as needing translation, it was necessary for arrange for them to be preceded by "mc". This therefore changes makemenu to ignore the first element in each menu item so that it can be "mc" in the makemenu call. Signed-off-by: Paul Mackerras <[email protected]>
1 parent f2d0bbb commit 7905603

File tree

5 files changed

+1037
-966
lines changed

5 files changed

+1037
-966
lines changed

gitk

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,12 +1750,20 @@ proc setoptions {} {
17501750
option add *Entry.font uifont startupFile
17511751
}
17521752

1753+
# Make a menu and submenus.
1754+
# m is the window name for the menu, items is the list of menu items to add.
1755+
# Each item is a list {mc label type description options...}
1756+
# mc is ignored; it's so we can put mc there to alert xgettext
1757+
# label is the string that appears in the menu
1758+
# type is cascade, command or radiobutton (should add checkbutton)
1759+
# description depends on type; it's the sublist for cascade, the
1760+
# command to invoke for command, or {variable value} for radiobutton
17531761
proc makemenu {m items} {
17541762
menu $m
17551763
foreach i $items {
1756-
set name [mc [lindex $i 0]]
1757-
set type [lindex $i 1]
1758-
set thing [lindex $i 2]
1764+
set name [mc [lindex $i 1]]
1765+
set type [lindex $i 2]
1766+
set thing [lindex $i 3]
17591767
set params [list $type]
17601768
if {$name ne {}} {
17611769
set u [string first "&" [string map {&& x} $name]]
@@ -1766,7 +1774,7 @@ proc makemenu {m items} {
17661774
}
17671775
switch -- $type {
17681776
"cascade" {
1769-
set submenu [string tolower [string map {& ""} [lindex $i 0]]]
1777+
set submenu [string tolower [string map {& ""} [lindex $i 1]]]
17701778
lappend params -menu $m.$submenu
17711779
}
17721780
"command" {
@@ -1777,7 +1785,7 @@ proc makemenu {m items} {
17771785
-value [lindex $thing 1]
17781786
}
17791787
}
1780-
eval $m add $params [lrange $i 3 end]
1788+
eval $m add $params [lrange $i 4 end]
17811789
if {$type eq "cascade"} {
17821790
makemenu $m.$submenu $thing
17831791
}
@@ -1806,27 +1814,29 @@ proc makewindow {} {
18061814
global rprogitem rprogcoord rownumsel numcommits
18071815
global have_tk85
18081816

1817+
# The "mc" arguments here are purely so that xgettext
1818+
# sees the following string as needing to be translated
18091819
makemenu .bar {
1810-
{"File" cascade {
1811-
{"Update" command updatecommits -accelerator F5}
1812-
{"Reload" command reloadcommits}
1813-
{"Reread references" command rereadrefs}
1814-
{"List references" command showrefs}
1815-
{"Quit" command doquit}
1820+
{mc "File" cascade {
1821+
{mc "Update" command updatecommits -accelerator F5}
1822+
{mc "Reload" command reloadcommits}
1823+
{mc "Reread references" command rereadrefs}
1824+
{mc "List references" command showrefs}
1825+
{mc "Quit" command doquit}
18161826
}}
1817-
{"Edit" cascade {
1818-
{"Preferences" command doprefs}
1827+
{mc "Edit" cascade {
1828+
{mc "Preferences" command doprefs}
18191829
}}
1820-
{"View" cascade {
1821-
{"New view..." command {newview 0}}
1822-
{"Edit view..." command editview -state disabled}
1823-
{"Delete view" command delview -state disabled}
1824-
{"" separator}
1825-
{"All files" radiobutton {selectedview 0} -command {showview 0}}
1830+
{mc "View" cascade {
1831+
{mc "New view..." command {newview 0}}
1832+
{mc "Edit view..." command editview -state disabled}
1833+
{mc "Delete view" command delview -state disabled}
1834+
{xx "" separator}
1835+
{mc "All files" radiobutton {selectedview 0} -command {showview 0}}
18261836
}}
1827-
{"Help" cascade {
1828-
{"About gitk" command about}
1829-
{"Key bindings" command keys}
1837+
{mc "Help" cascade {
1838+
{mc "About gitk" command about}
1839+
{mc "Key bindings" command keys}
18301840
}}
18311841
}
18321842
. configure -menu .bar
@@ -2210,39 +2220,39 @@ proc makewindow {} {
22102220

22112221
set rowctxmenu .rowctxmenu
22122222
makemenu $rowctxmenu {
2213-
{"Diff this -> selected" command {diffvssel 0}}
2214-
{"Diff selected -> this" command {diffvssel 1}}
2215-
{"Make patch" command mkpatch}
2216-
{"Create tag" command mktag}
2217-
{"Write commit to file" command writecommit}
2218-
{"Create new branch" command mkbranch}
2219-
{"Cherry-pick this commit" command cherrypick}
2220-
{"Reset HEAD branch to here" command resethead}
2223+
{mc "Diff this -> selected" command {diffvssel 0}}
2224+
{mc "Diff selected -> this" command {diffvssel 1}}
2225+
{mc "Make patch" command mkpatch}
2226+
{mc "Create tag" command mktag}
2227+
{mc "Write commit to file" command writecommit}
2228+
{mc "Create new branch" command mkbranch}
2229+
{mc "Cherry-pick this commit" command cherrypick}
2230+
{mc "Reset HEAD branch to here" command resethead}
22212231
}
22222232
$rowctxmenu configure -tearoff 0
22232233

22242234
set fakerowmenu .fakerowmenu
22252235
makemenu $fakerowmenu {
2226-
{"Diff this -> selected" command {diffvssel 0}}
2227-
{"Diff selected -> this" command {diffvssel 1}}
2228-
{"Make patch" command mkpatch}
2236+
{mc "Diff this -> selected" command {diffvssel 0}}
2237+
{mc "Diff selected -> this" command {diffvssel 1}}
2238+
{mc "Make patch" command mkpatch}
22292239
}
22302240
$fakerowmenu configure -tearoff 0
22312241

22322242
set headctxmenu .headctxmenu
22332243
makemenu $headctxmenu {
2234-
{"Check out this branch" command cobranch}
2235-
{"Remove this branch" command rmbranch}
2244+
{mc "Check out this branch" command cobranch}
2245+
{mc "Remove this branch" command rmbranch}
22362246
}
22372247
$headctxmenu configure -tearoff 0
22382248

22392249
global flist_menu
22402250
set flist_menu .flistctxmenu
22412251
makemenu $flist_menu {
2242-
{"Highlight this too" command {flist_hl 0}}
2243-
{"Highlight this only" command {flist_hl 1}}
2244-
{"External diff" command {external_diff}}
2245-
{"Blame parent commit" command {external_blame 1}}
2252+
{mc "Highlight this too" command {flist_hl 0}}
2253+
{mc "Highlight this only" command {flist_hl 1}}
2254+
{mc "External diff" command {external_diff}}
2255+
{mc "Blame parent commit" command {external_blame 1}}
22462256
}
22472257
$flist_menu configure -tearoff 0
22482258
}

0 commit comments

Comments
 (0)