git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 7/9] gitk i18n: More i18n markup: findloc optionmenu.

From
Christian Stimming <stimming@tuhh.de>
Date
Nov 7, 2007, 17:45 UTC
Message-ID
<200711071845.40236.stimming@tuhh.de>
In-Reply-To
<200711071845.06849.stimming@tuhh.de>
---
 gitk |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/gitk b/gitk
index 3e8d934..3acb0be 100755
--- a/gitk
+++ b/gitk
@@ -790,9 +790,9 @@ proc makewindow {} {
     trace add variable findtype write findcom_change
     .tf.lbar.findtype configure -font uifont
     .tf.lbar.findtype.menu configure -font uifont
-    set findloc "All fields"
-    tk_optionMenu .tf.lbar.findloc findloc "All fields" Headline \
-	Comments Author Committer
+    set findloc [mc "All fields"]
+    tk_optionMenu .tf.lbar.findloc findloc [mc "All fields"] [mc "Headline"] \
+	[mc "Comments"] [mc "Author"] [mc "Committer"]
     trace add variable findloc write find_change
     .tf.lbar.findloc configure -font uifont
     .tf.lbar.findloc.menu configure -font uifont
@@ -2488,11 +2488,11 @@ proc askfindhighlight {row id} {
     }
     set info $commitinfo($id)
     set isbold 0
-    set fldtypes {Headline Author Date Committer CDate Comments}
+    set fldtypes [list [mc Headline] [mc Author] [mc Date] [mc Committer] [mc CDate] [mc Comments]]
     foreach f $info ty $fldtypes {
-	if {($findloc eq "All fields" || $findloc eq $ty) &&
+	if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
 	    [doesmatch $f]} {
-	    if {$ty eq "Author"} {
+	    if {$ty eq [mc "Author"]} {
 		set isbold 2
 		break
 	    }
@@ -2520,14 +2520,14 @@ proc markrowmatches {row id} {
     set author [lindex $commitinfo($id) 1]
     $canv delete match$row
     $canv2 delete match$row
-    if {$findloc eq "All fields" || $findloc eq "Headline"} {
+    if {$findloc eq [mc "All fields"] || $findloc eq [mc "Headline"]} {
 	set m [findmatches $headline]
 	if {$m ne {}} {
 	    markmatches $canv $row $headline $linehtag($row) $m \
 		[$canv itemcget $linehtag($row) -font] $row
 	}
     }
-    if {$findloc eq "All fields" || $findloc eq "Author"} {
+    if {$findloc eq [mc "All fields"] || $findloc eq [mc "Author"]} {
 	set m [findmatches $author]
 	if {$m ne {}} {
 	    markmatches $canv2 $row $author $linentag($row) $m \
@@ -4261,8 +4261,8 @@ proc dofind {{dirn 1} {wrap 1}} {
 	set findstartline $selectedline
     }
     set findcurline $findstartline
-    nowbusy finding "Searching"
-    if {$gdttype ne "containing:" && ![info exists filehighlight]} {
+    nowbusy finding [mc "Searching"]
+    if {$gdttype ne [mc "containing:"] && ![info exists filehighlight]} {
 	after cancel do_file_hl $fh_serial
 	do_file_hl $fh_serial
     }
@@ -4292,7 +4292,7 @@ proc findmore {} {
     if {![info exists find_dirn]} {
 	return 0
     }
-    set fldtypes {Headline Author Date Committer CDate Comments}
+    set fldtypes [list [mc "Headline"] [mc "Author"] [mc "Date"] [mc "Committer"] [mc "CDate"] [mc "Comments"]]
     set l $findcurline
     set moretodo 0
     if {$find_dirn > 0} {
@@ -4336,7 +4336,7 @@ proc findmore {} {
 	    }
 	    set info $commitinfo($id)
 	    foreach f $info ty $fldtypes {
-		if {($findloc eq "All fields" || $findloc eq $ty) &&
+		if {($findloc eq [mc "All fields"] || $findloc eq $ty) &&
 		    [doesmatch $f]} {
 		    set found 1
 		    break
@@ -4392,7 +4392,7 @@ proc findselectline {l} {
     set markingmatches 1
     set findcurline $l
     selectline $l 1
-    if {$findloc == "All fields" || $findloc == "Comments"} {
+    if {$findloc == [mc "All fields"] || $findloc == [mc "Comments"]} {
 	# highlight the matches in the comments
 	set f [$ctext get 1.0 $commentend]
 	set matches [findmatches $f]
@@ -4780,7 +4780,7 @@ proc selectline {l isnew} {
     $ctext conf -state disabled
     set commentend [$ctext index "end - 1c"]
 
-    init_flist "Comments"
+    init_flist [mc "Comments"]
     if {$cmitmode eq "tree"} {
 	gettree $id
     } elseif {[llength $olds] <= 1} {
-- 
1.5.3.4.206.g58ba4
Previous: Christian StimmingNext: Christian Stimming
Message 7 of 13 in “gitk i18n implementation: Add Makefile with rules for po file creation and installation.”
  1. 1/9 gitk i18n implementation: Add Makefile with rules for po file creation and installation.Christian Stimming, Nov 7, 2007
  2. 2/9 gitk i18n implementation: Import msgcat for message string translation; load translation catalogs.Christian Stimming, Nov 7, 2007
  3. 3/9 gitk i18n implementation: Markup many strings for translation.Christian Stimming, Nov 7, 2007
  4. 4/9 gitk i18n: Initial German translation.Christian Stimming, Nov 7, 2007
  5. 5/9 gitk i18n: More i18n markup: findtype options menu.Christian Stimming, Nov 7, 2007
  6. 6/9 gitk i18n: More i18n markup: highlight_related and selectedhlview options menu.Christian Stimming, Nov 7, 2007
  7. 7/9 gitk i18n: More i18n markup: findloc optionmenu.Christian Stimming, Nov 7, 2007
  8. 8/9 gitk i18n: More i18n markup: gdttype optionmenu.Christian Stimming, Nov 7, 2007
  9. 9/9 gitk i18n: Recode gitk from latin1 to utf8 so that the (c) copyright character is valid utf8.Christian Stimming, Nov 7, 2007
  10. Paul MackerrasDec 11, 2007
  11. Christian StimmingDec 12, 2007
  12. Junio C HamanoNov 7, 2007
  13. Christian StimmingNov 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.