Re: [PATCH 1/5] Internationalization of git-gui
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jul 22, 2007, 07:38 UTC
- Message-ID
- <20070722073806.GW32566@spearce.org>
- In-Reply-To
- <200707211433.29318.stimming@tuhh.de>
Christian Stimming <stimming@tuhh.de> wrote:
> Subject: [PATCH] Initialize msgcat (gettext).
...
Show 14 quoted lines
> 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.