Thread (1 message) 1 message, 1 author, 2016-06-15

Re: git-gui-i18n: Make "Revert changes in these $n files" translatable.

From: Christian Stimming <hidden>
Date: 2016-06-15 22:43:24
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Possibly related (same subject, not in this thread)

Quoting Harri Ilari Tapio Liusvaara [off-list ref]:
quoted
quoted
BTW: Here is list of some missed translations:
quoted
- Font setting names in options window.
You mean the names of the fonts? But those are names. I thought by
definition they cannot be translated.
Nope. The texts are "Main Font:" and "Diff/Console Font:". They are
specified in somewhat bizarre manner (Search for "Main Font") from
git-gui.sh.
Ok, thanks for the pointer. Patch attached (will be push on the weekend).
quoted
quoted
- Buttons in hard reset confirmation (branch->revert or merge->abort,
 and it is yes/no dialog).
I see this in translated form (German Ja/Nein), and also the button
text (translated or not) doesn't appear in the git-gui source code.
Maybe those need to be translated in the tcl/tk system libraries?
I think that they might come from system libraries. But I'd rather
use better labels. AFAIK, HCI guidelines say that yes/no dialogs
are to be avoided, especally for confirming potentially destructive
actions.
True for now. This would concern basically all question dialogs that  
appear in git-gui.

Christian


---
  git-gui.sh     |    4 ++--
  lib/option.tcl |    2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 9f903ba..463ec32 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1652,8 +1652,8 @@ set default_config(gui.newbranchtemplate) {}
  set default_config(gui.fontui) [font configure font_ui]
  set default_config(gui.fontdiff) [font configure font_diff]
  set font_descs {
-	{fontui   font_ui   {Main Font}}
-	{fontdiff font_diff {Diff/Console Font}}
+	{fontui   font_ui   {mc "Main Font"}}
+	{fontdiff font_diff {mc "Diff/Console Font"}}
  }
  load_config 0
  apply_config
diff --git a/lib/option.tcl b/lib/option.tcl
index 20f1e8e..31c7d47 100644
--- a/lib/option.tcl
+++ b/lib/option.tcl
@@ -245,7 +245,7 @@ proc do_options {} {
  	foreach option $font_descs {
  		set name [lindex $option 0]
  		set font [lindex $option 1]
-		set text [lindex $option 2]
+		set text [eval [lindex $option 2]]

  		set global_config_new(gui.$font^^family) \
  			[font configure $font -family]
-- 
1.5.3.rc2.12.gbc280
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help