@@ -769,11 +769,11 @@ proc makewindow {} {
769
769
label .tf.lbar.flab2 -text " [ mc " commit" ] " -font uifont
770
770
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
771
771
-side left -fill y
772
- set gdttype " containing:"
772
+ set gdttype [mc " containing:" ]
773
773
set gm [tk_optionMenu .tf.lbar.gdttype gdttype \
774
- " containing:" \
775
- " touching paths:" \
776
- " adding/removing string:" ]
774
+ [mc " containing:" ] \
775
+ [mc " touching paths:" ] \
776
+ [mc " adding/removing string:" ] ]
777
777
trace add variable gdttype write gdttype_change
778
778
$gm conf -font uifont
779
779
.tf.lbar.gdttype conf -font uifont
@@ -784,15 +784,15 @@ proc makewindow {} {
784
784
lappend entries $fstring
785
785
entry $fstring -width 30 -font textfont -textvariable findstring
786
786
trace add variable findstring write find_change
787
- set findtype Exact
787
+ set findtype [mc " Exact" ]
788
788
set findtypemenu [tk_optionMenu .tf.lbar.findtype \
789
- findtype Exact IgnCase Regexp]
789
+ findtype [mc " Exact" ] [mc " IgnCase" ] [mc " Regexp" ] ]
790
790
trace add variable findtype write findcom_change
791
791
.tf.lbar.findtype configure -font uifont
792
792
.tf.lbar.findtype.menu configure -font uifont
793
- set findloc " All fields"
794
- tk_optionMenu .tf.lbar.findloc findloc " All fields" Headline \
795
- Comments Author Committer
793
+ set findloc [mc " All fields" ]
794
+ tk_optionMenu .tf.lbar.findloc findloc [mc " All fields" ] [mc " Headline" ] \
795
+ [mc " Comments" ] [mc " Author" ] [mc " Committer" ]
796
796
trace add variable findloc write find_change
797
797
.tf.lbar.findloc configure -font uifont
798
798
.tf.lbar.findloc.menu configure -font uifont
@@ -1743,12 +1743,12 @@ proc flist_hl {only} {
1743
1743
global flist_menu_file findstring gdttype
1744
1744
1745
1745
set x [shellquote $flist_menu_file ]
1746
- if {$only || $findstring eq {} || $gdttype ne " touching paths:" } {
1746
+ if {$only || $findstring eq {} || $gdttype ne [mc " touching paths:" ] } {
1747
1747
set findstring $x
1748
1748
} else {
1749
1749
append findstring " " $x
1750
1750
}
1751
- set gdttype " touching paths:"
1751
+ set gdttype [mc " touching paths:" ]
1752
1752
}
1753
1753
1754
1754
# Functions for adding and removing shell-type quoting
@@ -1998,7 +1998,7 @@ proc delview {} {
1998
1998
1999
1999
if {$curview == 0} return
2000
2000
if {[info exists hlview] && $hlview == $curview } {
2001
- set selectedhlview None
2001
+ set selectedhlview [mc " None" ]
2002
2002
unset hlview
2003
2003
}
2004
2004
allviewmenus $curview delete
@@ -2084,7 +2084,7 @@ proc showview {n} {
2084
2084
clear_display
2085
2085
if {[info exists hlview] && $hlview == $n } {
2086
2086
unset hlview
2087
- set selectedhlview None
2087
+ set selectedhlview [mc " None" ]
2088
2088
}
2089
2089
catch {unset commitinterest}
2090
2090
@@ -2313,7 +2313,7 @@ proc gdttype_change {name ix op} {
2313
2313
2314
2314
stopfinding
2315
2315
if {$findstring ne {}} {
2316
- if {$gdttype eq " containing:" } {
2316
+ if {$gdttype eq [mc " containing:" ] } {
2317
2317
if {$highlight_files ne {}} {
2318
2318
set highlight_files {}
2319
2319
hfiles_change
@@ -2336,7 +2336,7 @@ proc find_change {name ix op} {
2336
2336
global gdttype findstring highlight_files
2337
2337
2338
2338
stopfinding
2339
- if {$gdttype eq " containing:" } {
2339
+ if {$gdttype eq [mc " containing:" ] } {
2340
2340
findcom_change
2341
2341
} else {
2342
2342
if {$highlight_files ne $findstring } {
@@ -2360,9 +2360,9 @@ proc findcom_change args {
2360
2360
catch {unset nhighlights}
2361
2361
unbolden
2362
2362
unmarkmatches
2363
- if {$gdttype ne " containing:" || $findstring eq {}} {
2363
+ if {$gdttype ne [mc " containing:" ] || $findstring eq {}} {
2364
2364
set findpattern {}
2365
- } elseif {$findtype eq " Regexp" } {
2365
+ } elseif {$findtype eq [mc " Regexp" ] } {
2366
2366
set findpattern $findstring
2367
2367
} else {
2368
2368
set e [string map {" *" " \\ *" " ?" " \\ ?" " \[ " " \\\[ " " \\ " " \\\\ " } \
@@ -2388,12 +2388,12 @@ proc makepatterns {l} {
2388
2388
proc do_file_hl {serial} {
2389
2389
global highlight_files filehighlight highlight_paths gdttype fhl_list
2390
2390
2391
- if {$gdttype eq " touching paths:" } {
2391
+ if {$gdttype eq [mc " touching paths:" ] } {
2392
2392
if {[catch {set paths [shellsplit $highlight_files ]}]} return
2393
2393
set highlight_paths [makepatterns $paths ]
2394
2394
highlight_filelist
2395
2395
set gdtargs [concat -- $paths ]
2396
- } elseif {$gdttype eq " adding/removing string:" } {
2396
+ } elseif {$gdttype eq [mc " adding/removing string:" ] } {
2397
2397
set gdtargs [list " -S$highlight_files " ]
2398
2398
} else {
2399
2399
# must be "containing:", i.e. we're searching commit info
@@ -2469,9 +2469,9 @@ proc readfhighlight {} {
2469
2469
proc doesmatch {f} {
2470
2470
global findtype findpattern
2471
2471
2472
- if {$findtype eq " Regexp" } {
2472
+ if {$findtype eq [mc " Regexp" ] } {
2473
2473
return [regexp $findpattern $f ]
2474
- } elseif {$findtype eq " IgnCase" } {
2474
+ } elseif {$findtype eq [mc " IgnCase" ] } {
2475
2475
return [string match -nocase $findpattern $f ]
2476
2476
} else {
2477
2477
return [string match $findpattern $f ]
@@ -2488,11 +2488,11 @@ proc askfindhighlight {row id} {
2488
2488
}
2489
2489
set info $commitinfo($id)
2490
2490
set isbold 0
2491
- set fldtypes { Headline Author Date Committer CDate Comments}
2491
+ set fldtypes [ list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
2492
2492
foreach f $info ty $fldtypes {
2493
- if {($findloc eq " All fields" || $findloc eq $ty ) &&
2493
+ if {($findloc eq [mc " All fields" ] || $findloc eq $ty ) &&
2494
2494
[doesmatch $f ]} {
2495
- if {$ty eq " Author" } {
2495
+ if {$ty eq [mc " Author" ] } {
2496
2496
set isbold 2
2497
2497
break
2498
2498
}
@@ -2520,14 +2520,14 @@ proc markrowmatches {row id} {
2520
2520
set author [lindex $commitinfo($id) 1]
2521
2521
$canv delete match$row
2522
2522
$canv2 delete match$row
2523
- if {$findloc eq " All fields" || $findloc eq " Headline" } {
2523
+ if {$findloc eq [mc " All fields" ] || $findloc eq [mc " Headline" ] } {
2524
2524
set m [findmatches $headline ]
2525
2525
if {$m ne {}} {
2526
2526
markmatches $canv $row $headline $linehtag($row) $m \
2527
2527
[$canv itemcget $linehtag($row) -font] $row
2528
2528
}
2529
2529
}
2530
- if {$findloc eq " All fields" || $findloc eq " Author" } {
2530
+ if {$findloc eq [mc " All fields" ] || $findloc eq [mc " Author" ] } {
2531
2531
set m [findmatches $author ]
2532
2532
if {$m ne {}} {
2533
2533
markmatches $canv2 $row $author $linentag($row) $m \
@@ -2540,7 +2540,7 @@ proc vrel_change {name ix op} {
2540
2540
global highlight_related
2541
2541
2542
2542
rhighlight_none
2543
- if {$highlight_related ne " None" } {
2543
+ if {$highlight_related ne [mc " None" ] } {
2544
2544
run drawvisible
2545
2545
}
2546
2546
}
@@ -2554,7 +2554,7 @@ proc rhighlight_sel {a} {
2554
2554
set desc_todo [list $a ]
2555
2555
catch {unset ancestor}
2556
2556
set anc_todo [list $a ]
2557
- if {$highlight_related ne " None" } {
2557
+ if {$highlight_related ne [mc " None" ] } {
2558
2558
rhighlight_none
2559
2559
run drawvisible
2560
2560
}
@@ -2637,20 +2637,20 @@ proc askrelhighlight {row id} {
2637
2637
2638
2638
if {![info exists selectedline]} return
2639
2639
set isbold 0
2640
- if {$highlight_related eq " Descendent" ||
2641
- $highlight_related eq " Not descendent" } {
2640
+ if {$highlight_related eq [mc " Descendent" ] ||
2641
+ $highlight_related eq [mc " Not descendent" ] } {
2642
2642
if {![info exists descendent($id )]} {
2643
2643
is_descendent $id
2644
2644
}
2645
- if {$descendent($id) == ($highlight_related eq " Descendent" )} {
2645
+ if {$descendent($id) == ($highlight_related eq [mc " Descendent" ] )} {
2646
2646
set isbold 1
2647
2647
}
2648
- } elseif {$highlight_related eq " Ancestor" ||
2649
- $highlight_related eq " Not ancestor" } {
2648
+ } elseif {$highlight_related eq [mc " Ancestor" ] ||
2649
+ $highlight_related eq [mc " Not ancestor" ] } {
2650
2650
if {![info exists ancestor($id )]} {
2651
2651
is_ancestor $id
2652
2652
}
2653
- if {$ancestor($id) == ($highlight_related eq " Ancestor" )} {
2653
+ if {$ancestor($id) == ($highlight_related eq [mc " Ancestor" ] )} {
2654
2654
set isbold 1
2655
2655
}
2656
2656
}
@@ -3737,7 +3737,7 @@ proc drawcmitrow {row} {
3737
3737
if {$findpattern ne {} && ![info exists nhighlights($row )]} {
3738
3738
askfindhighlight $row $id
3739
3739
}
3740
- if {$highlight_related ne " None" && ![info exists rhighlights($row )]} {
3740
+ if {$highlight_related ne [mc " None" ] && ![info exists rhighlights($row )]} {
3741
3741
askrelhighlight $row $id
3742
3742
}
3743
3743
if {![info exists iddrawn($id )]} {
@@ -4226,11 +4226,11 @@ proc notbusy {what} {
4226
4226
4227
4227
proc findmatches {f} {
4228
4228
global findtype findstring
4229
- if {$findtype == " Regexp" } {
4229
+ if {$findtype == [mc " Regexp" ] } {
4230
4230
set matches [regexp -indices -all -inline $findstring $f ]
4231
4231
} else {
4232
4232
set fs $findstring
4233
- if {$findtype == " IgnCase" } {
4233
+ if {$findtype == [mc " IgnCase" ] } {
4234
4234
set f [string tolower $f ]
4235
4235
set fs [string tolower $fs ]
4236
4236
}
@@ -4261,8 +4261,8 @@ proc dofind {{dirn 1} {wrap 1}} {
4261
4261
set findstartline $selectedline
4262
4262
}
4263
4263
set findcurline $findstartline
4264
- nowbusy finding " Searching"
4265
- if {$gdttype ne " containing:" && ![info exists filehighlight]} {
4264
+ nowbusy finding [mc " Searching" ]
4265
+ if {$gdttype ne [mc " containing:" ] && ![info exists filehighlight]} {
4266
4266
after cancel do_file_hl $fh_serial
4267
4267
do_file_hl $fh_serial
4268
4268
}
@@ -4292,7 +4292,7 @@ proc findmore {} {
4292
4292
if {![info exists find_dirn]} {
4293
4293
return 0
4294
4294
}
4295
- set fldtypes { Headline Author Date Committer CDate Comments}
4295
+ set fldtypes [ list [mc " Headline" ] [mc " Author" ] [mc " Date" ] [mc " Committer" ] [mc " CDate" ] [mc " Comments" ]]
4296
4296
set l $findcurline
4297
4297
set moretodo 0
4298
4298
if {$find_dirn > 0} {
@@ -4325,7 +4325,7 @@ proc findmore {} {
4325
4325
}
4326
4326
set found 0
4327
4327
set domore 1
4328
- if {$gdttype eq " containing:" } {
4328
+ if {$gdttype eq [mc " containing:" ] } {
4329
4329
for {} {$n > 0} {incr n -1; incr l $find_dirn } {
4330
4330
set id [lindex $displayorder $l ]
4331
4331
# shouldn't happen unless git log doesn't give all the commits...
@@ -4336,7 +4336,7 @@ proc findmore {} {
4336
4336
}
4337
4337
set info $commitinfo($id)
4338
4338
foreach f $info ty $fldtypes {
4339
- if {($findloc eq " All fields" || $findloc eq $ty ) &&
4339
+ if {($findloc eq [mc " All fields" ] || $findloc eq $ty ) &&
4340
4340
[doesmatch $f ]} {
4341
4341
set found 1
4342
4342
break
@@ -4392,7 +4392,7 @@ proc findselectline {l} {
4392
4392
set markingmatches 1
4393
4393
set findcurline $l
4394
4394
selectline $l 1
4395
- if {$findloc == " All fields" || $findloc == " Comments" } {
4395
+ if {$findloc == [mc " All fields" ] || $findloc == [mc " Comments" ] } {
4396
4396
# highlight the matches in the comments
4397
4397
set f [$ctext get 1.0 $commentend ]
4398
4398
set matches [findmatches $f ]
@@ -4780,7 +4780,7 @@ proc selectline {l isnew} {
4780
4780
$ctext conf -state disabled
4781
4781
set commentend [$ctext index " end - 1c" ]
4782
4782
4783
- init_flist " Comments"
4783
+ init_flist [mc " Comments" ]
4784
4784
if {$cmitmode eq " tree" } {
4785
4785
gettree $id
4786
4786
} elseif {[llength $olds ] <= 1} {
@@ -8632,8 +8632,8 @@ set firsttabstop 0
8632
8632
set nextviewnum 1
8633
8633
set curview 0
8634
8634
set selectedview 0
8635
- set selectedhlview None
8636
- set highlight_related None
8635
+ set selectedhlview [mc " None" ]
8636
+ set highlight_related [mc " None" ]
8637
8637
set highlight_files {}
8638
8638
set viewfiles(0) {}
8639
8639
set viewperm(0) 0
0 commit comments