Why is Mercurial showing help text in German? How can i change this?

I just installed Mercurial 1.6 on my MacBook running Mac OS X 10.5.8

"hg" shows me help text in what seems like a random mix of English and German; "hg -v" shows text in German. Why?

I am essentially in Germany, and my Mac has a German keyboard. I have Germany as a system language, but English as a language.

I speak German, so speaking German to me is not an insurmountable problem. But English is my native language and the language I prefer to work in.

Does anyone know how to reverse this annoying hg behavior?

+7
mercurial
source share
3 answers

You need to set the environment variable, otherwise it will match your user's language.

The variable must be named LANG , and it must be set to en_US to provide you with US English texts.

Results on Windows (I know you are on a Mac, but I don't know how to do this):

 [C:\] :set lang=de_DE [C:\] :hg version Mercurial Distributed SCM (version 1.6.1023) Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> und andere Dies ist freie Software; siehe Quellen fⁿr Kopierbestimmungen. Es besteht KEINE GewΣhrleistung fⁿr das Programm, nicht einmal der Marktreife oder der Verwendbarkeit fⁿr einen bestimmten Zweck. [C:\] :set lang=en_US [C:\] :hg version Mercurial Distributed SCM (version 1.6.1023) Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [C:\] : 
+3
source share

Thanks to Lasse: your answer set me on the right track.

Mac OS X, although I set the language to Sytem Preferences / International in English, still has "LANG = de_DE.UTF-8" in the command line environment. [OS X error?]

I’m not sure if this can damage anything globally, however, so I “fixed” it now with a little script called “hg” in my utils directory, placed in my path to the real thing that redefines LANG before calling real hg:

 LANG="en_EN.UTF-8" REALHG=$(which hg) $REALHG $@ 

... which works on OS X, despite my sub-rudimentary shell skills, but depends on the odd behavior of “which” on OS X. On OS X, “what” really finds the “real” hg. On Linux, otoh, this script finds itself again and goes into infinite recursion.

+1
source share

My solution is to rename the language folder for the language that I would like to remove from HG. In my case, the folder has the following location: / Library / Python / 2.7 / site-packages / mercurial / locale / da

0
source share

All Articles