summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25ec938)
raw | patch | inline | side by side (parent: 25ec938)
author | Christian Stimming <stimming@tuhh.de> | |
Wed, 7 Nov 2007 17:40:59 +0000 (18:40 +0100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Wed, 19 Dec 2007 23:19:07 +0000 (10:19 +1100) |
By setting the environment variable GITK_MSGSDIR, one can manually set
the directory where the .msg files are located. This is quite handy
during development with GITK_MSGSDIR=po.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
the directory where the .msg files are located. This is quite handy
during development with GITK_MSGSDIR=po.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 1da0b0af1d1da6c8596f366d7a36519b4e249c3b..629acfbcc50ef278d573a1b46676d6bedcad7442 100755 (executable)
--- a/gitk
+++ b/gitk
set diffcontext 3
set selectbgcolor gray85
+## For msgcat loading, first locate the installation location.
+if { [info exists ::env(GITK_MSGSDIR)] } {
+ ## Msgsdir was manually set in the environment.
+ set gitk_msgsdir $::env(GITK_MSGSDIR)
+} else {
+ ## Let's guess the prefix from argv0.
+ set gitk_prefix [file dirname [file dirname [file normalize $argv0]]]
+ set gitk_libdir [file join $gitk_prefix share gitk lib]
+ set gitk_msgsdir [file join $gitk_libdir msgs]
+ unset gitk_prefix
+}
+
+## Internationalization (i18n) through msgcat and gettext. See
+## http://www.gnu.org/software/gettext/manual/html_node/Tcl.html
+package require msgcat
+namespace import ::msgcat::mc
+## And eventually load the actual message catalog
+::msgcat::mcload $gitk_msgsdir
+
catch {source ~/.gitk}
font create optionfont -family sans-serif -size -12