summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc703c2)
raw | patch | inline | side by side (parent: fc703c2)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 2 Sep 2007 02:22:42 +0000 (22:22 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 2 Sep 2007 02:22:42 +0000 (22:22 -0400) |
Tcl's msgcat library and corresponding mc procedure can locate a
translated string for any user message, provided that it is first
given a directory where the *.msg files are located containing the
translations.
During installation we will place the translations in lib/msgs/,
so we need to inform msgcat of this location once we determine it
during startup. Our source code tree however will store all of
the translations within the po/ directory, so we need to special
case this variant.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
translated string for any user message, provided that it is first
given a directory where the *.msg files are located containing the
translations.
During installation we will place the translations in lib/msgs/,
so we need to inform msgcat of this location once we determine it
during startup. Our source code tree however will store all of
the translations within the po/ directory, so we need to special
case this variant.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 4ea6e91b01c486e67943f990ea235a1bf8d0ac23..486d36ee19863e9804399f096fd337b452432464 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
if {$oguirel eq {1}} {
set oguilib [file dirname [file dirname [file normalize $argv0]]]
set oguilib [file join $oguilib share git-gui lib]
+ set oguimsg [file join $oguilib msgs]
} elseif {[string match @@* $oguirel]} {
set oguilib [file join [file dirname [file normalize $argv0]] lib]
+ set oguimsg [file join [file dirname [file normalize $argv0]] po]
+} else {
+ set oguimsg [file join $oguilib msgs]
}
unset oguirel
}
}
+######################################################################
+##
+## 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
+::msgcat::mcload $oguimsg
+unset oguimsg
+
######################################################################
##
## read only globals