{"thread":{"id":"9265","subject":"Re: [PATCH 2/2] gitk: Markup many strings for translation.","startedAt":"2007-07-27T20:19:08Z","lastAt":"2007-07-28T12:52:17Z","messageCount":4,"participants":["Brett Schwarz","Paul Mackerras","Christian Stimming"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"48835","messageId":"959247.27950.qm@web38905.mail.mud.yahoo.com","threadId":"9265","inReplyTo":null,"subject":"Re: [PATCH 2/2] gitk: Markup many strings for translation.","fromName":"Brett Schwarz","fromEmail":"brett_schwarz@yahoo.com","sentAt":"2007-07-27T20:19:08Z","receivedAt":"2007-07-27T20:19:08Z","isPatch":true,"sender":{"key":"brett_schwarz@yahoo.com","avatar":null},"body":"> \n> ----- Original Message ----\n> From: Christian Stimming <stimming@tuhh.de>\n> To: Paul Mackerras <paulus@samba.org>\n> Cc: git@vger.kernel.org\n> Sent: Friday, July 27, 2007 8:03:00 AM\n> Subject: [PATCH 2/2] gitk: Markup many strings for translation.\n> \n> Similar to the discussion in git-gui, all user-visible strings are  \n> passed through the [mc ...] procedure to have them translated by msgcat.\n> \n> Signed-off-by: Christian Stimming <stimming@tuhh.de>\n> ---\n\n<snip>\n\n>   proc getcommitlines {fd view}  {\n> @@ -273,7 +273,7 @@ proc chewcommits {view} {\n>           #set ms [expr {[clock clicks -milliseconds] - $startmsecs}]\n>           #puts \"overall $ms ms for $numcommits commits\"\n>           } else {\n> -        show_status \"No commits selected\"\n> +        show_status [mc \"No commits selected\"]\n>           }\n>           notbusy layout\n>           set phase {}\n> @@ -378,7 +378,7 @@ proc getcommit {id} {\n>       } else {\n>       readcommit $id\n>       if {![info exists commitinfo($id)]} {\n> -        set commitinfo($id) {\"No commit information available\"}\n> +        set commitinfo($id) {[mc \"No commit information available\"]}\n\nI think this is probably a typo (on the original), and carrying that forward will probably result in what was not intended.\n\nThe original has the {} and \"\". I don't know if this was intended (it will keep the quotes).\n\nThe translated version, will result in a literal string [mc \"No commit information available\"], and unless it is explicitly eval'ed later, it will not result in the translated string.\n\nSo, if the quotes need to stay in the string, then the translation will have to be:\n\n  set commitinfo($id) \\\"[mc \"No commit information available\"]\\\"\n\nOr, if the quotes are not needed:\n\n  set commitinfo($id) [mc \"No commit information available\"]\n\n\nRegards,\n    --brett\n\n\n       \n____________________________________________________________________________________\nPinpoint customers who are looking for what you sell. \nhttp://searchmarketing.yahoo.com/\n"},{"id":"48862","messageId":"18090.44180.802184.747398@cargo.ozlabs.ibm.com","threadId":"9265","inReplyTo":"959247.27950.qm@web38905.mail.mud.yahoo.com","subject":"Re: [PATCH 2/2] gitk: Markup many strings for translation.","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-07-28T02:40:20Z","receivedAt":"2007-07-28T02:40:20Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Brett Schwarz writes:\n\n> > -        set commitinfo($id) {\"No commit information available\"}\n> > +        set commitinfo($id) {[mc \"No commit information available\"]}\n> \n> I think this is probably a typo (on the original), and carrying that\n> forward will probably result in what was not intended.\n> \n> The original has the {} and \"\". I don't know if this was intended\n> (it will keep the quotes).\n\nYes it is what was intended - it is a list with one element, which is\na string.\n\nPaul.\n"},{"id":"48901","messageId":"200707281440.26660.stimming@tuhh.de","threadId":"9265","inReplyTo":"18090.44180.802184.747398@cargo.ozlabs.ibm.com","subject":"Re: [PATCH 2/2] gitk: Markup many strings for translation.","fromName":"Christian Stimming","fromEmail":"stimming@tuhh.de","sentAt":"2007-07-28T12:40:26Z","receivedAt":"2007-07-28T12:40:26Z","isPatch":true,"sender":{"key":"stimming@tuhh.de","avatar":"https://avatars.githubusercontent.com/u/227778?v=4"},"body":"Markup many strings for translation.\n\n2nd try: Correctly handle list-of-strings with translations.\n\nSigned-off-by: Christian Stimming <stimming@tuhh.de>\n---\nAm Samstag, 28. Juli 2007 04:40 schrieb Paul Mackerras:\n> > > -        set commitinfo($id) {\"No commit information available\"}\n> > > +        set commitinfo($id) {[mc \"No commit information available\"]}\n> >\n> > I think this is probably a typo (on the original), and carrying that\n> > forward will probably result in what was not intended.\n> >\n> > The original has the {} and \"\". I don't know if this was intended\n> > (it will keep the quotes).\n>\n> Yes it is what was intended - it is a list with one element, which is\n> a string.\n\nThanks for pointing this one out.\n\nBelow you find a patch against master of git.kernel.org/gitk.git that has the message markup with these two instances fixed (and is adapted to latest master on gitk.git). Also, I hope this time the mailer doesn't mess with the linebreaks.\n\n gitk |  360 +++++++++++++++++++++++++++++++++---------------------------------\n 1 files changed, 180 insertions(+), 180 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex b3c8230..7ac5f28 100755\n--- a/gitk\n+++ b/gitk\n@@ -128,7 +128,7 @@ proc getcommits {} {\n     set phase getcommits\n     initlayout\n     start_rev_list $curview\n-    show_status \"Reading commits...\"\n+    show_status [mc \"Reading commits...\"]\n }\n \n proc getcommitlines {fd view}  {\n@@ -277,7 +277,7 @@ proc chewcommits {view} {\n \t\t#set ms [expr {[clock clicks -milliseconds] - $startmsecs}]\n \t\t#puts \"overall $ms ms for $numcommits commits\"\n \t    } else {\n-\t\tshow_status \"No commits selected\"\n+\t\tshow_status [mc \"No commits selected\"]\n \t    }\n \t    notbusy layout\n \t    set phase {}\n@@ -382,7 +382,7 @@ proc getcommit {id} {\n     } else {\n \treadcommit $id\n \tif {![info exists commitinfo($id)]} {\n-\t    set commitinfo($id) {\"No commit information available\"}\n+\t    set commitinfo($id) [list [mc \"No commit information available\"]]\n \t}\n     }\n     return 1\n@@ -481,7 +481,7 @@ proc removehead {id name} {\n proc show_error {w top msg} {\n     message $w.m -text $msg -justify center -aspect 400\n     pack $w.m -side top -fill x -padx 20 -pady 20\n-    button $w.ok -text OK -command \"destroy $top\"\n+    button $w.ok -text [mc OK] -command \"destroy $top\"\n     pack $w.ok -side bottom -fill x\n     bind $top <Visibility> \"grab $top; focus $top\"\n     bind $top <Key-Return> \"destroy $top\"\n@@ -503,9 +503,9 @@ proc confirm_popup msg {\n     wm transient $w .\n     message $w.m -text $msg -justify center -aspect 400\n     pack $w.m -side top -fill x -padx 20 -pady 20\n-    button $w.ok -text OK -command \"set confirm_ok 1; destroy $w\"\n+    button $w.ok -text [mc OK] -command \"set confirm_ok 1; destroy $w\"\n     pack $w.ok -side left -fill x\n-    button $w.cancel -text Cancel -command \"destroy $w\"\n+    button $w.cancel -text [mc Cancel] -command \"destroy $w\"\n     pack $w.cancel -side right -fill x\n     bind $w <Visibility> \"grab $w; focus $w\"\n     tkwait window $w\n@@ -525,32 +525,32 @@ proc makewindow {} {\n     global headctxmenu\n \n     menu .bar\n-    .bar add cascade -label \"File\" -menu .bar.file\n+    .bar add cascade -label [mc \"File\"] -menu .bar.file\n     .bar configure -font $uifont\n     menu .bar.file\n-    .bar.file add command -label \"Update\" -command updatecommits\n-    .bar.file add command -label \"Reread references\" -command rereadrefs\n-    .bar.file add command -label \"Quit\" -command doquit\n+    .bar.file add command -label [mc \"Update\"] -command updatecommits\n+    .bar.file add command -label [mc \"Reread references\"] -command rereadrefs\n+    .bar.file add command -label [mc \"Quit\"] -command doquit\n     .bar.file configure -font $uifont\n     menu .bar.edit\n-    .bar add cascade -label \"Edit\" -menu .bar.edit\n-    .bar.edit add command -label \"Preferences\" -command doprefs\n+    .bar add cascade -label [mc \"Edit\"] -menu .bar.edit\n+    .bar.edit add command -label [mc \"Preferences\"] -command doprefs\n     .bar.edit configure -font $uifont\n \n     menu .bar.view -font $uifont\n-    .bar add cascade -label \"View\" -menu .bar.view\n-    .bar.view add command -label \"New view...\" -command {newview 0}\n-    .bar.view add command -label \"Edit view...\" -command editview \\\n+    .bar add cascade -label [mc \"View\"] -menu .bar.view\n+    .bar.view add command -label [mc \"New view...\"] -command {newview 0}\n+    .bar.view add command -label [mc \"Edit view...\"] -command editview \\\n \t-state disabled\n-    .bar.view add command -label \"Delete view\" -command delview -state disabled\n+    .bar.view add command -label [mc \"Delete view\"] -command delview -state disabled\n     .bar.view add separator\n-    .bar.view add radiobutton -label \"All files\" -command {showview 0} \\\n+    .bar.view add radiobutton -label [mc \"All files\"] -command {showview 0} \\\n \t-variable selectedview -value 0\n \n     menu .bar.help\n-    .bar add cascade -label \"Help\" -menu .bar.help\n-    .bar.help add command -label \"About gitk\" -command about\n-    .bar.help add command -label \"Key bindings\" -command keys\n+    .bar add cascade -label [mc \"Help\"] -menu .bar.help\n+    .bar.help add command -label [mc \"About gitk\"] -command about\n+    .bar.help add command -label [mc \"Key bindings\"] -command keys\n     .bar.help configure -font $uifont\n     . configure -menu .bar\n \n@@ -607,7 +607,7 @@ proc makewindow {} {\n     set sha1entry .tf.bar.sha1\n     set entries $sha1entry\n     set sha1but .tf.bar.sha1label\n-    button $sha1but -text \"SHA1 ID: \" -state disabled -relief flat \\\n+    button $sha1but -text [mc \"SHA1 ID: \"] -state disabled -relief flat \\\n \t-command gotocommit -width 8 -font $uifont\n     $sha1but conf -disabledforeground [$sha1but cget -foreground]\n     pack .tf.bar.sha1label -side left\n@@ -638,7 +638,7 @@ proc makewindow {} {\n \t-state disabled -width 26\n     pack .tf.bar.rightbut -side left -fill y\n \n-    button .tf.bar.findbut -text \"Find\" -command dofind -font $uifont\n+    button .tf.bar.findbut -text [mc \"Find\"] -command dofind -font $uifont\n     pack .tf.bar.findbut -side left\n     set findstring {}\n     set fstring .tf.bar.findstring\n@@ -648,13 +648,13 @@ proc makewindow {} {\n     pack $fstring -side left -expand 1 -fill x -in .tf.bar\n     set findtype Exact\n     set findtypemenu [tk_optionMenu .tf.bar.findtype \\\n-\t\t      findtype Exact IgnCase Regexp]\n+\t\t\t  findtype [mc Exact] [mc IgnCase] [mc Regexp]]\n     trace add variable findtype write find_change\n     .tf.bar.findtype configure -font $uifont\n     .tf.bar.findtype.menu configure -font $uifont\n-    set findloc \"All fields\"\n-    tk_optionMenu .tf.bar.findloc findloc \"All fields\" Headline \\\n-\tComments Author Committer\n+    set findloc [mc \"All fields\"]\n+    tk_optionMenu .tf.bar.findloc findloc [mc \"All fields\"] [mc Headline] \\\n+\t[mc Comments] [mc Author] [mc Committer]\n     trace add variable findloc write find_change\n     .tf.bar.findloc configure -font $uifont\n     .tf.bar.findloc.menu configure -font $uifont\n@@ -662,12 +662,12 @@ proc makewindow {} {\n     pack .tf.bar.findtype -side right\n \n     # build up the bottom bar of upper window\n-    label .tf.lbar.flabel -text \"Highlight:  Commits \" \\\n+    label .tf.lbar.flabel -text [mc \"Highlight:  Commits \"] \\\n     -font $uifont\n     pack .tf.lbar.flabel -side left -fill y\n-    set gdttype \"touching paths:\"\n-    set gm [tk_optionMenu .tf.lbar.gdttype gdttype \"touching paths:\" \\\n-\t\"adding/removing string:\"]\n+    set gdttype [mc \"touching paths:\"]\n+    set gm [tk_optionMenu .tf.lbar.gdttype gdttype [mc \"touching paths:\"] \\\n+\t[mc \"adding/removing string:\"]]\n     trace add variable gdttype write hfiles_change\n     $gm conf -font $uifont\n     .tf.lbar.gdttype conf -font $uifont\n@@ -677,19 +677,19 @@ proc makewindow {} {\n     trace add variable highlight_files write hfiles_change\n     lappend entries .tf.lbar.fent\n     pack .tf.lbar.fent -side left -fill x -expand 1\n-    label .tf.lbar.vlabel -text \" OR in view\" -font $uifont\n+    label .tf.lbar.vlabel -text [mc \" OR in view\"] -font $uifont\n     pack .tf.lbar.vlabel -side left -fill y\n     global viewhlmenu selectedhlview\n-    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview None]\n+    set viewhlmenu [tk_optionMenu .tf.lbar.vhl selectedhlview [mc None]]\n     $viewhlmenu entryconf None -command delvhighlight\n     $viewhlmenu conf -font $uifont\n     .tf.lbar.vhl conf -font $uifont\n     pack .tf.lbar.vhl -side left -fill y\n-    label .tf.lbar.rlabel -text \" OR \" -font $uifont\n+    label .tf.lbar.rlabel -text [mc \" OR \"] -font $uifont\n     pack .tf.lbar.rlabel -side left -fill y\n     global highlight_related\n-    set m [tk_optionMenu .tf.lbar.relm highlight_related None \\\n-\t\"Descendent\" \"Not descendent\" \"Ancestor\" \"Not ancestor\"]\n+    set m [tk_optionMenu .tf.lbar.relm highlight_related [mc None] \\\n+\t[mc \"Descendent\"] [mc \"Not descendent\"] [mc \"Ancestor\"] [mc \"Not ancestor\"]]\n     $m conf -font $uifont\n     .tf.lbar.relm conf -font $uifont\n     trace add variable highlight_related write vrel_change\n@@ -717,7 +717,7 @@ proc makewindow {} {\n     frame .bleft.top\n     frame .bleft.mid\n \n-    button .bleft.top.search -text \"Search\" -command dosearch \\\n+    button .bleft.top.search -text [mc \"Search\"] -command dosearch \\\n \t-font $uifont\n     pack .bleft.top.search -side left -padx 5\n     set sstring .bleft.top.sstring\n@@ -725,11 +725,11 @@ proc makewindow {} {\n     lappend entries $sstring\n     trace add variable searchstring write incrsearch\n     pack $sstring -side left -expand 1 -fill x\n-    radiobutton .bleft.mid.diff -text \"Diff\" \\\n+    radiobutton .bleft.mid.diff -text [mc \"Diff\"] \\\n \t-command changediffdisp -variable diffelide -value {0 0}\n-    radiobutton .bleft.mid.old -text \"Old version\" \\\n+    radiobutton .bleft.mid.old -text [mc \"Old version\"] \\\n \t-command changediffdisp -variable diffelide -value {0 1}\n-    radiobutton .bleft.mid.new -text \"New version\" \\\n+    radiobutton .bleft.mid.new -text [mc \"New version\"] \\\n \t-command changediffdisp -variable diffelide -value {1 0}\n     pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left\n     set ctext .bleft.ctext\n@@ -778,10 +778,10 @@ proc makewindow {} {\n     # lower right\n     frame .bright\n     frame .bright.mode\n-    radiobutton .bright.mode.patch -text \"Patch\" \\\n+    radiobutton .bright.mode.patch -text [mc \"Patch\"] \\\n \t-command reselectline -variable cmitmode -value \"patch\"\n     .bright.mode.patch configure -font $uifont\n-    radiobutton .bright.mode.tree -text \"Tree\" \\\n+    radiobutton .bright.mode.tree -text [mc \"Tree\"] \\\n \t-command reselectline -variable cmitmode -value \"tree\"\n     .bright.mode.tree configure -font $uifont\n     grid .bright.mode.patch .bright.mode.tree -sticky ew\n@@ -886,35 +886,35 @@ proc makewindow {} {\n \n     set rowctxmenu .rowctxmenu\n     menu $rowctxmenu -tearoff 0\n-    $rowctxmenu add command -label \"Diff this -> selected\" \\\n+    $rowctxmenu add command -label [mc \"Diff this -> selected\"] \\\n \t-command {diffvssel 0}\n-    $rowctxmenu add command -label \"Diff selected -> this\" \\\n+    $rowctxmenu add command -label [mc \"Diff selected -> this\"] \\\n \t-command {diffvssel 1}\n-    $rowctxmenu add command -label \"Make patch\" -command mkpatch\n-    $rowctxmenu add command -label \"Create tag\" -command mktag\n-    $rowctxmenu add command -label \"Write commit to file\" -command writecommit\n-    $rowctxmenu add command -label \"Create new branch\" -command mkbranch\n-    $rowctxmenu add command -label \"Cherry-pick this commit\" \\\n+    $rowctxmenu add command -label [mc \"Make patch\"] -command mkpatch\n+    $rowctxmenu add command -label [mc \"Create tag\"] -command mktag\n+    $rowctxmenu add command -label [mc \"Write commit to file\"] -command writecommit\n+    $rowctxmenu add command -label [mc \"Create new branch\"] -command mkbranch\n+    $rowctxmenu add command -label [mc \"Cherry-pick this commit\"] \\\n \t-command cherrypick\n-    $rowctxmenu add command -label \"Reset HEAD branch to here\" \\\n+    $rowctxmenu add command -label [mc \"Reset HEAD branch to here\"] \\\n \t-command resethead\n \n     set fakerowmenu .fakerowmenu\n     menu $fakerowmenu -tearoff 0\n-    $fakerowmenu add command -label \"Diff this -> selected\" \\\n+    $fakerowmenu add command -label [mc \"Diff this -> selected\"] \\\n \t-command {diffvssel 0}\n-    $fakerowmenu add command -label \"Diff selected -> this\" \\\n+    $fakerowmenu add command -label [mc \"Diff selected -> this\"] \\\n \t-command {diffvssel 1}\n-    $fakerowmenu add command -label \"Make patch\" -command mkpatch\n-#    $fakerowmenu add command -label \"Commit\" -command {mkcommit 0}\n-#    $fakerowmenu add command -label \"Commit all\" -command {mkcommit 1}\n-#    $fakerowmenu add command -label \"Revert local changes\" -command revertlocal\n+    $fakerowmenu add command -label [mc \"Make patch\"] -command mkpatch\n+#    $fakerowmenu add command -label [mc \"Commit\"] -command {mkcommit 0}\n+#    $fakerowmenu add command -label [mc \"Commit all\"] -command {mkcommit 1}\n+#    $fakerowmenu add command -label [mc \"Revert local changes\"] -command revertlocal\n \n     set headctxmenu .headctxmenu\n     menu $headctxmenu -tearoff 0\n-    $headctxmenu add command -label \"Check out this branch\" \\\n+    $headctxmenu add command -label [mc \"Check out this branch\"] \\\n \t-command cobranch\n-    $headctxmenu add command -label \"Remove this branch\" \\\n+    $headctxmenu add command -label [mc \"Remove this branch\"] \\\n \t-command rmbranch\n }\n \n@@ -1086,17 +1086,17 @@ proc about {} {\n \treturn\n     }\n     toplevel $w\n-    wm title $w \"About gitk\"\n-    message $w.m -text {\n+    wm title $w [mc \"About gitk\"]\n+    message $w.m -text [mc \"\n Gitk - a commit viewer for git\n \n Copyright � 2005-2006 Paul Mackerras\n \n-Use and redistribute under the terms of the GNU General Public License} \\\n+Use and redistribute under the terms of the GNU General Public License\"] \\\n \t    -justify center -aspect 400 -border 2 -bg white -relief groove\n     pack $w.m -side top -fill x -padx 2 -pady 2\n     $w.m configure -font $uifont\n-    button $w.ok -text Close -command \"destroy $w\" -default active\n+    button $w.ok -text [mc Close] -command \"destroy $w\" -default active\n     pack $w.ok -side bottom\n     $w.ok configure -font $uifont\n     bind $w <Visibility> \"focus $w.ok\"\n@@ -1117,8 +1117,8 @@ proc keys {} {\n \tset M1T Ctrl\n     }\n     toplevel $w\n-    wm title $w \"Gitk key bindings\"\n-    message $w.m -text \"\n+    wm title $w [mc \"Gitk key bindings\"]\n+    message $w.m -text [mc \"\n Gitk key bindings:\n \n <$M1T-Q>\t\tQuit\n@@ -1156,11 +1156,11 @@ f\t\tScroll diff view to next file\n <$M1T-KP->\tDecrease font size\n <$M1T-minus>\tDecrease font size\n <F5>\t\tUpdate\n-\" \\\n+\"] \\\n \t    -justify left -bg white -border 2 -relief groove\n     pack $w.m -side top -fill both -padx 2 -pady 2\n     $w.m configure -font $uifont\n-    button $w.ok -text Close -command \"destroy $w\" -default active\n+    button $w.ok -text [mc Close] -command \"destroy $w\" -default active\n     pack $w.ok -side bottom\n     $w.ok configure -font $uifont\n     bind $w <Visibility> \"focus $w.ok\"\n@@ -1608,7 +1608,7 @@ proc newview {ishighlight} {\n     set newviewname($nextviewnum) \"View $nextviewnum\"\n     set newviewperm($nextviewnum) 0\n     set newviewargs($nextviewnum) [shellarglist $revtreeargs]\n-    vieweditor $top $nextviewnum \"Gitk view definition\"\n+    vieweditor $top $nextviewnum [mc \"Gitk view definition\"]\n }\n \n proc editview {} {\n@@ -1633,20 +1633,20 @@ proc vieweditor {top n title} {\n \n     toplevel $top\n     wm title $top $title\n-    label $top.nl -text \"Name\" -font $uifont\n+    label $top.nl -text [mc \"Name\"] -font $uifont\n     entry $top.name -width 20 -textvariable newviewname($n) -font $uifont\n     grid $top.nl $top.name -sticky w -pady 5\n-    checkbutton $top.perm -text \"Remember this view\" -variable newviewperm($n) \\\n+    checkbutton $top.perm -text [mc \"Remember this view\"] -variable newviewperm($n) \\\n \t-font $uifont\n     grid $top.perm - -pady 5 -sticky w\n     message $top.al -aspect 1000 -font $uifont \\\n-\t-text \"Commits to include (arguments to git rev-list):\"\n+\t-text [mc \"Commits to include (arguments to git rev-list):\"]\n     grid $top.al - -sticky w -pady 5\n     entry $top.args -width 50 -textvariable newviewargs($n) \\\n \t-background white -font $uifont\n     grid $top.args - -sticky ew -padx 5\n     message $top.l -aspect 1000 -font $uifont \\\n-\t-text \"Enter files and directories to include, one per line:\"\n+\t-text [mc \"Enter files and directories to include, one per line:\"]\n     grid $top.l - -sticky w\n     text $top.t -width 40 -height 10 -background white -font $uifont\n     if {[info exists viewfiles($n)]} {\n@@ -1659,9 +1659,9 @@ proc vieweditor {top n title} {\n     }\n     grid $top.t - -sticky ew -padx 5\n     frame $top.buts\n-    button $top.buts.ok -text \"OK\" -command [list newviewok $top $n] \\\n+    button $top.buts.ok -text [mc \"OK\"] -command [list newviewok $top $n] \\\n \t-font $uifont\n-    button $top.buts.can -text \"Cancel\" -command [list destroy $top] \\\n+    button $top.buts.can -text [mc \"Cancel\"] -command [list destroy $top] \\\n \t-font $uifont\n     grid $top.buts.ok $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n@@ -1908,11 +1908,11 @@ proc showview {n} {\n     }\n     if {$phase ne {}} {\n \tif {$phase eq \"getcommits\"} {\n-\t    show_status \"Reading commits...\"\n+\t    show_status [mc \"Reading commits...\"]\n \t}\n \trun chewcommits $n\n     } elseif {$numcommits == 0} {\n-\tshow_status \"No commits selected\"\n+\tshow_status [mc \"No commits selected\"]\n     }\n }\n \n@@ -2203,9 +2203,9 @@ proc askfindhighlight {row id} {\n     set isbold 0\n     set fldtypes {Headline Author Date Committer CDate Comments}\n     foreach f $info ty $fldtypes {\n-\tif {($findloc eq \"All fields\" || $findloc eq $ty) &&\n+\tif {($findloc eq [mc \"All fields\"] || $findloc eq $ty) &&\n \t    [doesmatch $f]} {\n-\t    if {$ty eq \"Author\"} {\n+\t    if {$ty eq [mc \"Author\"]} {\n \t\tset isbold 2\n \t\tbreak\n \t    }\n@@ -2254,7 +2254,7 @@ proc vrel_change {name ix op} {\n     global highlight_related\n \n     rhighlight_none\n-    if {$highlight_related ne \"None\"} {\n+    if {$highlight_related ne [mc \"None\"]} {\n \trun drawvisible\n     }\n }\n@@ -2268,7 +2268,7 @@ proc rhighlight_sel {a} {\n     set desc_todo [list $a]\n     catch {unset ancestor}\n     set anc_todo [list $a]\n-    if {$highlight_related ne \"None\"} {\n+    if {$highlight_related ne [mc \"None\"]} {\n \trhighlight_none\n \trun drawvisible\n     }\n@@ -2351,20 +2351,20 @@ proc askrelhighlight {row id} {\n \n     if {![info exists selectedline]} return\n     set isbold 0\n-    if {$highlight_related eq \"Descendent\" ||\n-\t$highlight_related eq \"Not descendent\"} {\n+    if {$highlight_related eq [mc \"Descendent\"] ||\n+\t$highlight_related eq [mc \"Not descendent\"]} {\n \tif {![info exists descendent($id)]} {\n \t    is_descendent $id\n \t}\n-\tif {$descendent($id) == ($highlight_related eq \"Descendent\")} {\n+\tif {$descendent($id) == ($highlight_related eq [mc \"Descendent\"])} {\n \t    set isbold 1\n \t}\n-    } elseif {$highlight_related eq \"Ancestor\" ||\n-\t      $highlight_related eq \"Not ancestor\"} {\n+    } elseif {$highlight_related eq [mc \"Ancestor\"] ||\n+\t      $highlight_related eq [mc \"Not ancestor\"]} {\n \tif {![info exists ancestor($id)]} {\n \t    is_ancestor $id\n \t}\n-\tif {$ancestor($id) == ($highlight_related eq \"Ancestor\")} {\n+\tif {$ancestor($id) == ($highlight_related eq [mc \"Ancestor\"])} {\n \t    set isbold 1\n \t}\n     }\n@@ -2402,7 +2402,7 @@ proc next_hlcont {} {\n \t    }\n \t    if {$nhighlights($row) > 0} break\n \t}\n-\tif {$highlight_related ne \"None\"} {\n+\tif {$highlight_related ne [mc \"None\"]} {\n \t    if {![info exists rhighlights($row)]} {\n \t\taskrelhighlight $row $id\n \t    }\n@@ -2439,7 +2439,7 @@ proc next_highlight {dirn} {\n \n     if {![info exists selectedline]} return\n     if {!([info exists hlview] || $findstring ne {} ||\n-\t  $highlight_related ne \"None\" || [info exists filehighlight])} return\n+\t  $highlight_related ne [mc \"None\"] || [info exists filehighlight])} return\n     set fhl_row [expr {$selectedline + $dirn}]\n     set fhl_dirn $dirn\n     next_hlcont\n@@ -2786,7 +2786,7 @@ proc readdiffindex {fd serial} {\n     if {$isdiff && $serial == $lserial && $localirow == -1} {\n \t# add the line for the changes in the index to the graph\n \tset localirow $commitrow($curview,$mainheadid)\n-\tset hl \"Local changes checked in to index but not committed\"\n+\tset hl [mc \"Local changes checked in to index but not committed\"]\n \tset commitinfo($nullid2) [list  $hl {} {} {} {} \"    $hl\\n\"]\n \tset commitdata($nullid2) \"\\n    $hl\\n\"\n \tinsertrow $localirow $nullid2\n@@ -2816,7 +2816,7 @@ proc readdifffiles {fd serial} {\n \t} else {\n \t    set localfrow $commitrow($curview,$mainheadid)\n \t}\n-\tset hl \"Local uncommitted changes, not checked in to index\"\n+\tset hl [mc \"Local uncommitted changes, not checked in to index\"]\n \tset commitinfo($nullid) [list  $hl {} {} {} {} \"    $hl\\n\"]\n \tset commitdata($nullid) \"\\n    $hl\\n\"\n \tinsertrow $localfrow $nullid\n@@ -2945,7 +2945,7 @@ proc addextraid {id row} {\n     set commitrow($curview,$id) $row\n     readcommit $id\n     if {![info exists commitinfo($id)]} {\n-\tset commitinfo($id) {\"No commit information available\"}\n+\tset commitinfo($id) [list [mc \"No commit information available\"]]\n     }\n     if {![info exists children($curview,$id)]} {\n \tset children($curview,$id) {}\n@@ -3518,7 +3518,7 @@ proc drawcmitrow {row} {\n     if {$findstring ne {} && ![info exists nhighlights($row)]} {\n \taskfindhighlight $row $id\n     }\n-    if {$highlight_related ne \"None\" && ![info exists rhighlights($row)]} {\n+    if {$highlight_related ne [mc \"None\"] && ![info exists rhighlights($row)]} {\n \taskrelhighlight $row $id\n     }\n     if {![info exists iddrawn($id)]} {\n@@ -4018,11 +4018,11 @@ proc notbusy {what} {\n \n proc findmatches {f} {\n     global findtype findstring\n-    if {$findtype == \"Regexp\"} {\n+    if {$findtype == [mc \"Regexp\"]} {\n \tset matches [regexp -indices -all -inline $findstring $f]\n     } else {\n \tset fs $findstring\n-\tif {$findtype == \"IgnCase\"} {\n+\tif {$findtype == [mc \"IgnCase\"]} {\n \t    set f [string tolower $f]\n \t    set fs [string tolower $fs]\n \t}\n@@ -4114,7 +4114,7 @@ proc findmore {} {\n \t}\n \tset info $commitinfo($id)\n \tforeach f $info ty $fldtypes {\n-\t    if {($findloc eq \"All fields\" || $findloc eq $ty) &&\n+\t    if {($findloc eq [mc \"All fields\"] || $findloc eq $ty) &&\n \t\t[doesmatch $f]} {\n \t\tfindselectline $l\n \t\tnotbusy finding\n@@ -4159,7 +4159,7 @@ proc findmorerev {} {\n \t}\n \tset info $commitinfo($id)\n \tforeach f $info ty $fldtypes {\n-\t    if {($findloc eq \"All fields\" || $findloc eq $ty) &&\n+\t    if {($findloc eq [mc \"All fields\"] || $findloc eq $ty) &&\n \t\t[doesmatch $f]} {\n \t\tfindselectline $l\n \t\tnotbusy finding\n@@ -4183,7 +4183,7 @@ proc findselectline {l} {\n     set markingmatches 1\n     set findcurline $l\n     selectline $l 1\n-    if {$findloc == \"All fields\" || $findloc == \"Comments\"} {\n+    if {$findloc == [mc \"All fields\"] || $findloc == [mc \"Comments\"]} {\n \t# highlight the matches in the comments\n \tset f [$ctext get 1.0 $commentend]\n \tset matches [findmatches $f]\n@@ -4477,11 +4477,11 @@ proc selectline {l isnew} {\n     set linknum 0\n     set info $commitinfo($id)\n     set date [formatdate [lindex $info 2]]\n-    $ctext insert end \"Author: [lindex $info 1]  $date\\n\"\n+    $ctext insert end \"[mc \"Author:\"] [lindex $info 1]  $date\\n\"\n     set date [formatdate [lindex $info 4]]\n-    $ctext insert end \"Committer: [lindex $info 3]  $date\\n\"\n+    $ctext insert end \"[mc \"Committer:\"] [lindex $info 3]  $date\\n\"\n     if {[info exists idtags($id)]} {\n-\t$ctext insert end \"Tags:\"\n+\t$ctext insert end [mc \"Tags:\"]\n \tforeach tag $idtags($id) {\n \t    $ctext insert end \" $tag\"\n \t}\n@@ -4498,18 +4498,18 @@ proc selectline {l isnew} {\n \t    } else {\n \t\tset tag m$np\n \t    }\n-\t    $ctext insert end \"Parent: \" $tag\n+\t    $ctext insert end \"[mc \"Parent:\"] \" $tag\n \t    appendwithlinks [commit_descriptor $p] {}\n \t    incr np\n \t}\n     } else {\n \tforeach p $olds {\n-\t    append headers \"Parent: [commit_descriptor $p]\"\n+\t    append headers \"[mc \"Parent:\"] [commit_descriptor $p]\"\n \t}\n     }\n \n     foreach c $children($curview,$id) {\n-\tappend headers \"Child:  [commit_descriptor $c]\"\n+\tappend headers \"[mc \"Child:\"]  [commit_descriptor $c]\"\n     }\n \n     # make anything that looks like a SHA1 ID be a clickable link\n@@ -4518,13 +4518,13 @@ proc selectline {l isnew} {\n \tif {![info exists allcommits]} {\n \t    getallcommits\n \t}\n-\t$ctext insert end \"Branch: \"\n+\t$ctext insert end \"[mc \"Branch:\"] \"\n \t$ctext mark set branch \"end -1c\"\n \t$ctext mark gravity branch left\n-\t$ctext insert end \"\\nFollows: \"\n+\t$ctext insert end \"\\n[mc \"Follows:\"] \"\n \t$ctext mark set follows \"end -1c\"\n \t$ctext mark gravity follows left\n-\t$ctext insert end \"\\nPrecedes: \"\n+\t$ctext insert end \"\\n[mc \"Precedes:\"] \"\n \t$ctext mark set precedes \"end -1c\"\n \t$ctext mark gravity precedes left\n \t$ctext insert end \"\\n\"\n@@ -4541,7 +4541,7 @@ proc selectline {l isnew} {\n     $ctext conf -state disabled\n     set commentend [$ctext index \"end - 1c\"]\n \n-    init_flist \"Comments\"\n+    init_flist [mc \"Comments\"]\n     if {$cmitmode eq \"tree\"} {\n \tgettree $id\n     } elseif {[llength $olds] <= 1} {\n@@ -5351,9 +5351,9 @@ proc sha1change {n1 n2 op} {\n     }\n     if {[$sha1but cget -state] == $state} return\n     if {$state == \"normal\"} {\n-\t$sha1but conf -state normal -relief raised -text \"Goto: \"\n+\t$sha1but conf -state normal -relief raised -text \"[mc \"Goto:\"] \"\n     } else {\n-\t$sha1but conf -state disabled -relief flat -text \"SHA1 ID: \"\n+\t$sha1but conf -state disabled -relief flat -text \"[mc \"SHA1 ID:\"] \"\n     }\n }\n \n@@ -5378,7 +5378,7 @@ proc gotocommit {} {\n \t    }\n \t    if {$matches ne {}} {\n \t\tif {[llength $matches] > 1} {\n-\t\t    error_popup \"Short SHA1 id $id is ambiguous\"\n+\t\t    error_popup [mc \"Short SHA1 id %s is ambiguous\" $id]\n \t\t    return\n \t\t}\n \t\tset id [lindex $matches 0]\n@@ -5526,17 +5526,17 @@ proc lineclick {x y id isnew} {\n     $ctext tag conf link -foreground blue -underline 1\n     $ctext tag bind link <Enter> { %W configure -cursor hand2 }\n     $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor }\n-    $ctext insert end \"Parent:\\t\"\n+    $ctext insert end \"[mc \"Parent:\"]\\t\"\n     $ctext insert end $id [list link link0]\n     $ctext tag bind link0 <1> [list selbyid $id]\n     set info $commitinfo($id)\n     $ctext insert end \"\\n\\t[lindex $info 0]\\n\"\n-    $ctext insert end \"\\tAuthor:\\t[lindex $info 1]\\n\"\n+    $ctext insert end \"\\t[mc \"Author:\"]\\t[lindex $info 1]\\n\"\n     set date [formatdate [lindex $info 2]]\n-    $ctext insert end \"\\tDate:\\t$date\\n\"\n+    $ctext insert end \"\\t[mc \"Date:\"]\\t$date\\n\"\n     set kids $children($curview,$id)\n     if {$kids ne {}} {\n-\t$ctext insert end \"\\nChildren:\"\n+\t$ctext insert end \"\\n[mc \"Children:\"]\"\n \tset i 0\n \tforeach child $kids {\n \t    incr i\n@@ -5546,9 +5546,9 @@ proc lineclick {x y id isnew} {\n \t    $ctext insert end $child [list link link$i]\n \t    $ctext tag bind link$i <1> [list selbyid $child]\n \t    $ctext insert end \"\\n\\t[lindex $info 0]\"\n-\t    $ctext insert end \"\\n\\tAuthor:\\t[lindex $info 1]\"\n+\t    $ctext insert end \"\\n\\t[mc \"Author:\"]\\t[lindex $info 1]\"\n \t    set date [formatdate [lindex $info 2]]\n-\t    $ctext insert end \"\\n\\tDate:\\t$date\\n\"\n+\t    $ctext insert end \"\\n\\t[mc \"Date:\"]\\t$date\\n\"\n \t}\n     }\n     $ctext conf -state disabled\n@@ -5592,13 +5592,13 @@ proc rowmenu {x y id} {\n     }\n     if {$id ne $nullid && $id ne $nullid2} {\n \tset menu $rowctxmenu\n-\t$menu entryconfigure 7 -label \"Reset $mainhead branch to here\"\n+\t$menu entryconfigure 7 -label [mc \"Reset %s branch to here\" $mainhead]\n     } else {\n \tset menu $fakerowmenu\n     }\n-    $menu entryconfigure \"Diff this*\" -state $state\n-    $menu entryconfigure \"Diff selected*\" -state $state\n-    $menu entryconfigure \"Make patch\" -state $state\n+    $menu entryconfigure [mc \"Diff this*\"] -state $state\n+    $menu entryconfigure [mc \"Diff selected*\"] -state $state\n+    $menu entryconfigure [mc \"Make patch\"] -state $state\n     tk_popup $menu $x $y\n }\n \n@@ -5623,8 +5623,8 @@ proc doseldiff {oldid newid} {\n \n     $ctext conf -state normal\n     clear_ctext\n-    init_flist \"Top\"\n-    $ctext insert end \"From \"\n+    init_flist [mc \"Top\"]\n+    $ctext insert end [mc \"From \"]\n     $ctext tag conf link -foreground blue -underline 1\n     $ctext tag bind link <Enter> { %W configure -cursor hand2 }\n     $ctext tag bind link <Leave> { %W configure -cursor $curtextcursor }\n@@ -5632,7 +5632,7 @@ proc doseldiff {oldid newid} {\n     $ctext insert end $oldid [list link link0]\n     $ctext insert end \"\\n     \"\n     $ctext insert end [lindex $commitinfo($oldid) 0]\n-    $ctext insert end \"\\n\\nTo   \"\n+    $ctext insert end \"\\n\\n[mc \"To\"]   \"\n     $ctext tag bind link1 <1> [list selbyid $newid]\n     $ctext insert end $newid [list link link1]\n     $ctext insert end \"\\n     \"\n@@ -5655,9 +5655,9 @@ proc mkpatch {} {\n     set patchtop $top\n     catch {destroy $top}\n     toplevel $top\n-    label $top.title -text \"Generate patch\"\n+    label $top.title -text [mc \"Generate patch\"]\n     grid $top.title - -pady 10\n-    label $top.from -text \"From:\"\n+    label $top.from -text [mc \"From:\"]\n     entry $top.fromsha1 -width 40 -relief flat\n     $top.fromsha1 insert 0 $oldid\n     $top.fromsha1 conf -state readonly\n@@ -5666,7 +5666,7 @@ proc mkpatch {} {\n     $top.fromhead insert 0 $oldhead\n     $top.fromhead conf -state readonly\n     grid x $top.fromhead -sticky w\n-    label $top.to -text \"To:\"\n+    label $top.to -text [mc \"To:\"]\n     entry $top.tosha1 -width 40 -relief flat\n     $top.tosha1 insert 0 $newid\n     $top.tosha1 conf -state readonly\n@@ -5675,16 +5675,16 @@ proc mkpatch {} {\n     $top.tohead insert 0 $newhead\n     $top.tohead conf -state readonly\n     grid x $top.tohead -sticky w\n-    button $top.rev -text \"Reverse\" -command mkpatchrev -padx 5\n+    button $top.rev -text [mc \"Reverse\"] -command mkpatchrev -padx 5\n     grid $top.rev x -pady 10\n-    label $top.flab -text \"Output file:\"\n+    label $top.flab -text [mc \"Output file:\"]\n     entry $top.fname -width 60\n     $top.fname insert 0 [file normalize \"patch$patchnum.patch\"]\n     incr patchnum\n     grid $top.flab $top.fname -sticky w\n     frame $top.buts\n-    button $top.buts.gen -text \"Generate\" -command mkpatchgo\n-    button $top.buts.can -text \"Cancel\" -command mkpatchcan\n+    button $top.buts.gen -text [mc \"Generate\"] -command mkpatchgo\n+    button $top.buts.can -text [mc \"Cancel\"] -command mkpatchcan\n     grid $top.buts.gen $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n@@ -5737,9 +5737,9 @@ proc mktag {} {\n     set mktagtop $top\n     catch {destroy $top}\n     toplevel $top\n-    label $top.title -text \"Create tag\"\n+    label $top.title -text [mc \"Create tag\"]\n     grid $top.title - -pady 10\n-    label $top.id -text \"ID:\"\n+    label $top.id -text [mc \"ID:\"]\n     entry $top.sha1 -width 40 -relief flat\n     $top.sha1 insert 0 $rowmenuid\n     $top.sha1 conf -state readonly\n@@ -5748,12 +5748,12 @@ proc mktag {} {\n     $top.head insert 0 [lindex $commitinfo($rowmenuid) 0]\n     $top.head conf -state readonly\n     grid x $top.head -sticky w\n-    label $top.tlab -text \"Tag name:\"\n+    label $top.tlab -text [mc \"Tag name:\"]\n     entry $top.tag -width 60\n     grid $top.tlab $top.tag -sticky w\n     frame $top.buts\n-    button $top.buts.gen -text \"Create\" -command mktaggo\n-    button $top.buts.can -text \"Cancel\" -command mktagcan\n+    button $top.buts.gen -text [mc \"Create\"] -command mktaggo\n+    button $top.buts.can -text [mc \"Cancel\"] -command mktagcan\n     grid $top.buts.gen $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n@@ -5767,11 +5767,11 @@ proc domktag {} {\n     set id [$mktagtop.sha1 get]\n     set tag [$mktagtop.tag get]\n     if {$tag == {}} {\n-\terror_popup \"No tag name specified\"\n+\terror_popup [mc \"No tag name specified\"]\n \treturn\n     }\n     if {[info exists tagids($tag)]} {\n-\terror_popup \"Tag \\\"$tag\\\" already exists\"\n+\terror_popup [mc \"Tag \\\"%s\\\" already exists\" $tag]\n \treturn\n     }\n     if {[catch {\n@@ -5832,9 +5832,9 @@ proc writecommit {} {\n     set wrcomtop $top\n     catch {destroy $top}\n     toplevel $top\n-    label $top.title -text \"Write commit to file\"\n+    label $top.title -text [mc \"Write commit to file\"]\n     grid $top.title - -pady 10\n-    label $top.id -text \"ID:\"\n+    label $top.id -text [mc \"ID:\"]\n     entry $top.sha1 -width 40 -relief flat\n     $top.sha1 insert 0 $rowmenuid\n     $top.sha1 conf -state readonly\n@@ -5843,16 +5843,16 @@ proc writecommit {} {\n     $top.head insert 0 [lindex $commitinfo($rowmenuid) 0]\n     $top.head conf -state readonly\n     grid x $top.head -sticky w\n-    label $top.clab -text \"Command:\"\n+    label $top.clab -text [mc \"Command:\"]\n     entry $top.cmd -width 60 -textvariable wrcomcmd\n     grid $top.clab $top.cmd -sticky w -pady 10\n-    label $top.flab -text \"Output file:\"\n+    label $top.flab -text [mc \"Output file:\"]\n     entry $top.fname -width 60\n     $top.fname insert 0 [file normalize \"commit-[string range $rowmenuid 0 6]\"]\n     grid $top.flab $top.fname -sticky w\n     frame $top.buts\n-    button $top.buts.gen -text \"Write\" -command wrcomgo\n-    button $top.buts.can -text \"Cancel\" -command wrcomcan\n+    button $top.buts.gen -text [mc \"Write\"] -command wrcomgo\n+    button $top.buts.can -text [mc \"Cancel\"] -command wrcomcan\n     grid $top.buts.gen $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n@@ -5886,19 +5886,19 @@ proc mkbranch {} {\n     set top .makebranch\n     catch {destroy $top}\n     toplevel $top\n-    label $top.title -text \"Create new branch\"\n+    label $top.title -text [mc \"Create new branch\"]\n     grid $top.title - -pady 10\n-    label $top.id -text \"ID:\"\n+    label $top.id -text [mc \"ID:\"]\n     entry $top.sha1 -width 40 -relief flat\n     $top.sha1 insert 0 $rowmenuid\n     $top.sha1 conf -state readonly\n     grid $top.id $top.sha1 -sticky w\n-    label $top.nlab -text \"Name:\"\n+    label $top.nlab -text [mc \"Name:\"]\n     entry $top.name -width 40\n     grid $top.nlab $top.name -sticky w\n     frame $top.buts\n-    button $top.buts.go -text \"Create\" -command [list mkbrgo $top]\n-    button $top.buts.can -text \"Cancel\" -command \"catch {destroy $top}\"\n+    button $top.buts.go -text [mc \"Create\"] -command [list mkbrgo $top]\n+    button $top.buts.can -text [mc \"Cancel\"] -command \"catch {destroy $top}\"\n     grid $top.buts.go $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n     grid columnconfigure $top.buts 1 -weight 1 -uniform a\n@@ -5912,7 +5912,7 @@ proc mkbrgo {top} {\n     set name [$top.name get]\n     set id [$top.sha1 get]\n     if {$name eq {}} {\n-\terror_popup \"Please specify a name for the new branch\"\n+\terror_popup [mc \"Please specify a name for the new branch\"]\n \treturn\n     }\n     catch {destroy $top}\n@@ -5956,7 +5956,7 @@ proc cherrypick {} {\n     set newhead [exec git rev-parse HEAD]\n     if {$newhead eq $oldhead} {\n \tnotbusy cherrypick\n-\terror_popup \"No changes committed\"\n+\terror_popup [mc \"No changes committed\"]\n \treturn\n     }\n     addnewchild $newhead $oldhead\n@@ -5980,28 +5980,28 @@ proc resethead {} {\n     set w \".confirmreset\"\n     toplevel $w\n     wm transient $w .\n-    wm title $w \"Confirm reset\"\n+    wm title $w [mc \"Confirm reset\"]\n     message $w.m -text \\\n-\t\"Reset branch $mainhead to [string range $rowmenuid 0 7]?\" \\\n+\t[mc \"Reset branch %s to %s?\" $mainhead [string range $rowmenuid 0 7]] \\\n \t-justify center -aspect 1000\n     pack $w.m -side top -fill x -padx 20 -pady 20\n     frame $w.f -relief sunken -border 2\n-    message $w.f.rt -text \"Reset type:\" -aspect 1000\n+    message $w.f.rt -text [mc \"Reset type:\"] -aspect 1000\n     grid $w.f.rt -sticky w\n     set resettype mixed\n     radiobutton $w.f.soft -value soft -variable resettype -justify left \\\n-\t-text \"Soft: Leave working tree and index untouched\"\n+\t-text [mc \"Soft: Leave working tree and index untouched\"]\n     grid $w.f.soft -sticky w\n     radiobutton $w.f.mixed -value mixed -variable resettype -justify left \\\n-\t-text \"Mixed: Leave working tree untouched, reset index\"\n+\t-text [mc \"Mixed: Leave working tree untouched, reset index\"]\n     grid $w.f.mixed -sticky w\n     radiobutton $w.f.hard -value hard -variable resettype -justify left \\\n-\t-text \"Hard: Reset working tree and index\\n(discard ALL local changes)\"\n+\t-text [mc \"Hard: Reset working tree and index\\n(discard ALL local changes)\"]\n     grid $w.f.hard -sticky w\n     pack $w.f -side top -fill x\n-    button $w.ok -text OK -command \"set confirm_ok 1; destroy $w\"\n+    button $w.ok -text [mc OK] -command \"set confirm_ok 1; destroy $w\"\n     pack $w.ok -side left -fill x -padx 20 -pady 20\n-    button $w.cancel -text Cancel -command \"destroy $w\"\n+    button $w.cancel -text [mc Cancel] -command \"destroy $w\"\n     pack $w.cancel -side right -fill x -padx 20 -pady 20\n     bind $w <Visibility> \"grab $w; focus $w\"\n     tkwait window $w\n@@ -6015,8 +6015,8 @@ proc resethead {} {\n \tfilerun $fd [list readresetstat $fd $w]\n \ttoplevel $w\n \twm transient $w\n-\twm title $w \"Reset progress\"\n-\tmessage $w.m -text \"Reset in progress, please wait...\" \\\n+\twm title $w [mc \"Reset progress\"]\n+\tmessage $w.m -text [mc \"Reset in progress, please wait...\"] \\\n \t    -justify center -aspect 1000\n \tpack $w.m -side top -fill x -padx 20 -pady 5\n \tcanvas $w.c -width 150 -height 20 -bg white\n@@ -6107,7 +6107,7 @@ proc rmbranch {} {\n     set id $headmenuid\n     # this check shouldn't be needed any more...\n     if {$head eq $mainhead} {\n-\terror_popup \"Cannot delete the currently checked-out branch\"\n+\terror_popup [mc \"Cannot delete the currently checked-out branch\"]\n \treturn\n     }\n     set dheads [descheads $id]\n@@ -7066,7 +7066,7 @@ proc showtag {tag isnew} {\n     if {[info exists tagcontents($tag)]} {\n \tset text $tagcontents($tag)\n     } else {\n-\tset text \"Tag: $tag\\nId:  $tagids($tag)\"\n+\tset text \"[mc \"Tag:\"] $tag\\n[mc \"Id:\"]  $tagids($tag)\"\n     }\n     appendwithlinks $text {}\n     $ctext conf -state disabled\n@@ -7096,77 +7096,77 @@ proc doprefs {} {\n \tset oldprefs($v) [set $v]\n     }\n     toplevel $top\n-    wm title $top \"Gitk preferences\"\n-    label $top.ldisp -text \"Commit list display options\"\n+    wm title $top [mc \"Gitk preferences\"]\n+    label $top.ldisp -text [mc \"Commit list display options\"]\n     $top.ldisp configure -font $uifont\n     grid $top.ldisp - -sticky w -pady 10\n     label $top.spacer -text \" \"\n-    label $top.maxwidthl -text \"Maximum graph width (lines)\" \\\n+    label $top.maxwidthl -text [mc \"Maximum graph width (lines)\"] \\\n \t-font optionfont\n     spinbox $top.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth\n     grid $top.spacer $top.maxwidthl $top.maxwidth -sticky w\n-    label $top.maxpctl -text \"Maximum graph width (% of pane)\" \\\n+    label $top.maxpctl -text [mc \"Maximum graph width (% of pane)\"] \\\n \t-font optionfont\n     spinbox $top.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct\n     grid x $top.maxpctl $top.maxpct -sticky w\n     frame $top.showlocal\n-    label $top.showlocal.l -text \"Show local changes\" -font optionfont\n+    label $top.showlocal.l -text [mc \"Show local changes\"] -font optionfont\n     checkbutton $top.showlocal.b -variable showlocalchanges\n     pack $top.showlocal.b $top.showlocal.l -side left\n     grid x $top.showlocal -sticky w\n \n-    label $top.ddisp -text \"Diff display options\"\n+    label $top.ddisp -text [mc \"Diff display options\"]\n     $top.ddisp configure -font $uifont\n     grid $top.ddisp - -sticky w -pady 10\n-    label $top.diffoptl -text \"Options for diff program\" \\\n+    label $top.diffoptl -text [mc \"Options for diff program\"] \\\n \t-font optionfont\n     entry $top.diffopt -width 20 -textvariable diffopts\n     grid x $top.diffoptl $top.diffopt -sticky w\n     frame $top.ntag\n-    label $top.ntag.l -text \"Display nearby tags\" -font optionfont\n+    label $top.ntag.l -text [mc \"Display nearby tags\"] -font optionfont\n     checkbutton $top.ntag.b -variable showneartags\n     pack $top.ntag.b $top.ntag.l -side left\n     grid x $top.ntag -sticky w\n-    label $top.tabstopl -text \"tabstop\" -font optionfont\n+    label $top.tabstopl -text [mc \"tabstop\"] -font optionfont\n     spinbox $top.tabstop -from 1 -to 20 -width 4 -textvariable tabstop\n     grid x $top.tabstopl $top.tabstop -sticky w\n \n-    label $top.cdisp -text \"Colors: press to choose\"\n+    label $top.cdisp -text [mc \"Colors: press to choose\"]\n     $top.cdisp configure -font $uifont\n     grid $top.cdisp - -sticky w -pady 10\n     label $top.bg -padx 40 -relief sunk -background $bgcolor\n-    button $top.bgbut -text \"Background\" -font optionfont \\\n+    button $top.bgbut -text [mc \"Background\"] -font optionfont \\\n \t-command [list choosecolor bgcolor 0 $top.bg background setbg]\n     grid x $top.bgbut $top.bg -sticky w\n     label $top.fg -padx 40 -relief sunk -background $fgcolor\n-    button $top.fgbut -text \"Foreground\" -font optionfont \\\n+    button $top.fgbut -text [mc \"Foreground\"] -font optionfont \\\n \t-command [list choosecolor fgcolor 0 $top.fg foreground setfg]\n     grid x $top.fgbut $top.fg -sticky w\n     label $top.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]\n-    button $top.diffoldbut -text \"Diff: old lines\" -font optionfont \\\n+    button $top.diffoldbut -text [mc \"Diff: old lines\"] -font optionfont \\\n \t-command [list choosecolor diffcolors 0 $top.diffold \"diff old lines\" \\\n \t\t      [list $ctext tag conf d0 -foreground]]\n     grid x $top.diffoldbut $top.diffold -sticky w\n     label $top.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]\n-    button $top.diffnewbut -text \"Diff: new lines\" -font optionfont \\\n+    button $top.diffnewbut -text [mc \"Diff: new lines\"] -font optionfont \\\n \t-command [list choosecolor diffcolors 1 $top.diffnew \"diff new lines\" \\\n \t\t      [list $ctext tag conf d1 -foreground]]\n     grid x $top.diffnewbut $top.diffnew -sticky w\n     label $top.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]\n-    button $top.hunksepbut -text \"Diff: hunk header\" -font optionfont \\\n+    button $top.hunksepbut -text [mc \"Diff: hunk header\"] -font optionfont \\\n \t-command [list choosecolor diffcolors 2 $top.hunksep \\\n \t\t      \"diff hunk header\" \\\n \t\t      [list $ctext tag conf hunksep -foreground]]\n     grid x $top.hunksepbut $top.hunksep -sticky w\n     label $top.selbgsep -padx 40 -relief sunk -background $selectbgcolor\n-    button $top.selbgbut -text \"Select bg\" -font optionfont \\\n+    button $top.selbgbut -text [mc \"Select bg\"] -font optionfont \\\n \t-command [list choosecolor selectbgcolor 0 $top.selbgsep background setselbg]\n     grid x $top.selbgbut $top.selbgsep -sticky w\n \n     frame $top.buts\n-    button $top.buts.ok -text \"OK\" -command prefsok -default active\n+    button $top.buts.ok -text [mc \"OK\"] -command prefsok -default active\n     $top.buts.ok configure -font $uifont\n-    button $top.buts.can -text \"Cancel\" -command prefscan -default normal\n+    button $top.buts.can -text [mc \"Cancel\"] -command prefscan -default normal\n     $top.buts.can configure -font $uifont\n     grid $top.buts.ok $top.buts.can\n     grid columnconfigure $top.buts 0 -weight 1 -uniform a\n@@ -7179,7 +7179,7 @@ proc choosecolor {v vi w x cmd} {\n     global $v\n \n     set c [tk_chooseColor -initialcolor [lindex [set $v] $vi] \\\n-\t       -title \"Gitk: choose color for $x\"]\n+\t       -title [mc \"Gitk: choose color for %s\" $x]]\n     if {$c eq {}} return\n     $w conf -background $c\n     lset $v $vi $c\n@@ -7681,7 +7681,7 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} {\n     set curview 1\n     set selectedview 1\n     set nextviewnum 2\n-    set viewname(1) \"Command line\"\n+    set viewname(1) [mc \"Command line\"]\n     set viewfiles(1) $cmdline_files\n     set viewargs(1) $revtreeargs\n     set viewperm(1) 0\n-- \n1.5.2\n"},{"id":"48902","messageId":"200707281452.17560.stimming@tuhh.de","threadId":"9265","inReplyTo":"200707281440.26660.stimming@tuhh.de","subject":"[PATCH] gitk.git: Add Makefile with rules for po file creation.","fromName":"Christian Stimming","fromEmail":"stimming@tuhh.de","sentAt":"2007-07-28T12:52:17Z","receivedAt":"2007-07-28T12:52:17Z","isPatch":true,"sender":{"key":"stimming@tuhh.de","avatar":"https://avatars.githubusercontent.com/u/227778?v=4"},"body":"Signed-off-by: Christian Stimming <stimming@tuhh.de>\n---\nSimilar to the previous patch with the message markup, this one has also been created against the kernel.org gitk.git. These would be the necessary Makefile rules for string extraction by gettext.\n\n Makefile |   39 +++++++++++++++++++++++++++++++++++++++\n 1 files changed, 39 insertions(+), 0 deletions(-)\n create mode 100644 Makefile\n\ndiff --git a/Makefile b/Makefile\nnew file mode 100644\nindex 0000000..d7b75fb\n--- /dev/null\n+++ b/Makefile\n@@ -0,0 +1,39 @@\n+# Set the installation directories; this section is needed only in\n+# gitk.git but not in git.git.\n+ifndef gitexecdir\n+\tgitexecdir := $(shell git --exec-path)\n+endif\n+ifndef sharedir\n+\tsharedir := $(dir $(gitexecdir))share\n+endif\n+\n+# From here on, all is needed in git.git/Makefile.\n+libdir   ?= $(sharedir)/gitk/lib\n+msgsdir    ?= $(libdir)/msgs\n+msgsdir_SQ  = $(subst ','\\'',$(msgsdir))\n+\n+## Beginning of po-file creation rules\n+XGETTEXT   ?= xgettext\n+PO_TEMPLATE = po/gitk.pot\n+ALL_POFILES = $(wildcard po/*.po)\n+ALL_MSGFILES = $(subst .po,.msg,$(ALL_POFILES))\n+\n+$(PO_TEMPLATE): gitk\n+\t$(XGETTEXT) -kmc -LTcl -o $@ gitk\n+update-po:: $(PO_TEMPLATE)\n+\t$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )\n+$(ALL_MSGFILES): %.msg : %.po\n+\t@echo Generating catalog $@\n+\tmsgfmt --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)\n+\n+all:: $(ALL_MSGFILES)\n+\n+clean::\n+\trm -f $(ALL_PROGRAMS) po/*.msg\n+## End of po-file creation rules\n+\n+# Install rules for po-files\n+install: all\n+\t$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(msgsdir_SQ)' $(INSTALL_D1)\n+\t$(QUIET)$(foreach p,$(ALL_MSGFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true\n+\n-- \n1.5.2\n"}]}