[PATCH] Fix translation of strings in foreach lists.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix translation of strings in foreach lists.

Signed-off-by: Christian Stimming <stimming@xxxxxxx>
---
Quoting Brett Schwarz <brett_schwarz@xxxxxxxxx>:
I not sure if it's worth changing, but you don't necessarily need those [append]'s in there.

Thanks for the info. It is basically up to Shawn to decide which style he likes more.

This patch is already necessary because I accidentally messed up the foreach argument lists. With this patch those will work again and will additionally be translated as well. (Unfortunately, I can't commit to git-gui-i18n ATM due to a http-only-firewall connection. Johannes...? Thanks.)

 lib/database.tcl |   16 ++++++++--------
 lib/option.tcl   |   26 +++++++++++++-------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lib/database.tcl b/lib/database.tcl
index 8dda9af..118b1b2 100644
--- a/lib/database.tcl
+++ b/lib/database.tcl
@@ -40,16 +40,16 @@ proc do_stats {} {

 	frame $w.stat -borderwidth 1 -relief solid
 	foreach s {
-		{count           [mc "Number of loose objects"]}
-		{size            [mc "Disk space used by loose objects"] { KiB}}
-		{in-pack         [mc "Number of packed objects"]}
-		{packs           [mc "Number of packs"]}
-		{size-pack       [mc "Disk space used by packed objects"] { KiB}}
-		{prune-packable  [mc "Packed objects waiting for pruning"]}
-		{garbage         [mc "Garbage files"]}
+		{count           {mc "Number of loose objects"}}
+		{size            {mc "Disk space used by loose objects"} { KiB}}
+		{in-pack         {mc "Number of packed objects"}}
+		{packs           {mc "Number of packs"}}
+		{size-pack       {mc "Disk space used by packed objects"} { KiB}}
+		{prune-packable  {mc "Packed objects waiting for pruning"}}
+		{garbage         {mc "Garbage files"}}
 		} {
 		set name [lindex $s 0]
-		set label [lindex $s 1]
+		set label [eval [lindex $s 1]]
 		if {[catch {set value $stats($name)}]} continue
 		if {[llength $s] > 2} {
 			set value "$value[lindex $s 2]"
diff --git a/lib/option.tcl b/lib/option.tcl
index 6c4d7ae..8d9e09d 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -183,22 +183,22 @@ proc do_options {} {

 	set optid 0
 	foreach option {
-		{t user.name [mc "User Name"]}
-		{t user.email [mc "Email Address"]}
-
-		{b merge.summary [mc "Summarize Merge Commits"]}
-		{i-1..5 merge.verbosity [mc "Merge Verbosity"]}
-		{b merge.diffstat [mc "Show Diffstat After Merge"]}
-
-		{b gui.trustmtime  [mc "Trust File Modification Timestamps"]}
-		{b gui.pruneduringfetch [mc "Prune Tracking Branches During Fetch"]}
-		{b gui.matchtrackingbranch [mc "Match Tracking Branches"]}
-		{i-0..99 gui.diffcontext [mc "Number of Diff Context Lines"]}
-		{t gui.newbranchtemplate [mc "New Branch Name Template"]}
+		{t user.name {mc "User Name"}}
+		{t user.email {mc "Email Address"}}
+
+		{b merge.summary {mc "Summarize Merge Commits"}}
+		{i-1..5 merge.verbosity {mc "Merge Verbosity"}}
+		{b merge.diffstat {mc "Show Diffstat After Merge"}}
+
+		{b gui.trustmtime  {mc "Trust File Modification Timestamps"}}
+		{b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
+		{b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
+		{i-0..99 gui.diffcontext {mc "Number of Diff Context Lines"}}
+		{t gui.newbranchtemplate {mc "New Branch Name Template"}}
 		} {
 		set type [lindex $option 0]
 		set name [lindex $option 1]
-		set text [lindex $option 2]
+		set text [eval [lindex $option 2]]
 		incr optid
 		foreach f {repo global} {
 			switch -glob -- $type {
--
1.5.3.rc2.12.gbc280


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux