summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-gui.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 4ea6e91b01..486d36ee19 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -51,8 +51,12 @@ set oguirel {@@GITGUI_RELATIVE@@}
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
@@ -76,6 +80,16 @@ if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} {
######################################################################
##
+## 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
set _appname [lindex [file split $argv0] end]