Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: How to run git-gui always in English?

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

Steffen Prohaska [off-list ref] wrote:
On Oct 21, 2007, at 8:52 AM, Shawn O. Pearce wrote:
quoted
I think that if you set LANG=en before you start git-gui it will
take on English, and so will all of the standard dialogs that we
"borrow" from wish.
Do we have a chance before we source the real git-gui.tcl?
Maybe we could "set env(LANG)" based on "git config gui.lang"?
Or is it already too late because we needed to restart wish?
Hmm.  Really quick testing here shows that we just need to make sure
env(LANG) is set before we do the msgcat::mcload call in git-gui.sh
line 104.

If we're going to use a `git config gui.lang` thing then we can
probably just make a msgcat::mclocale call on line 103 just before we
load our message file.  Unfortunately this is before we have located
git so technically git-gui doesn't know how to run git-config and
thus cannot get to gui.lang.  :-|

Hmm.  Looking at this further we may be able to insert the mclocale
call at two locations; one at line 864 before we open the repository
wizard, and again at line 1802, just before we start to initialize
our UI.  This does mean that for really serious errors (e.g. "No
git in PATH") we'll be using your native OS language.

-- 
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