Thread (24 messages) flat view 24 messages, 6 authors, 2016-06-15

Re: [PATCH 1/5] Internationalization of git-gui

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:43:23

Christian Stimming [off-list ref] wrote:
Subject: [PATCH] Initialize msgcat (gettext).
...
quoted hunk ↗ jump to hunk
diff --git a/git-gui.sh b/git-gui.sh
index c5ff7c8..0c5ca46 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -108,6 +108,12 @@ if {$idx ne {}} {
 }
 unset -nocomplain oguirel idx fd
 
+## Internationalization (i18n) through msgcat and gettext. See
+## http://www.gnu.org/software/gettext/manual/html_node/Tcl.html
+package require msgcat
+::msgcat::mcload [file join $oguilib msgs]
+namespace import ::msgcat::mc
+
Thanks.  We'll probably also want to modify the lib/class.tcl to
import ::msgcat::mc into the class namespace when it creates it.
I use that class thing throught most of git-gui, especially for
UI code.  About 50% of git-gui has been converted to use class,
the other 50% is just global and is still in git-gui.sh.  ;-)

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help