git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Enhancement Request: "locale" git option

From
Jeff King <peff@peff.net>
Date
Dec 4, 2014, 09:55 UTC
Message-ID
<20141204095557.GE27455@peff.net>
In-Reply-To
<54801B50.4080500@web.de>
On Thu, Dec 04, 2014 at 09:29:04AM +0100, Torsten Bögershausen wrote:
> How about
> alias git='LANGUAGE=de_DE.UTF-8 git'
> in your ~/.profile ?
> (Of course you need to change de to the language you want )

Besides being awkward in scripts (which will not respect the alias and use a different language!), that variable will also be inherited by programs git spawns. So the editor, for example, may end up in the wrong language.

I think respecting core.locale would make sense (probably the change would go into git_setup_gettext(), but you may have to fight with the setup code over looking at config so early in the process).

However, I think the original question is not one of localizing git, but rather of having it _not_ localized (avoiding the German translations). There is a hack you can do that for that, which is to set GIT_TEXTDOMAINDIR to something nonsensical (like "/"), which will mean git cannot find the .po files, and just uses the builtin messages.

-Peff
Previous: Torsten BögershausenNext: Ævar Arnfjörð Bjarmason
Message 3 of 15 in “Enhancement Request: "locale" git option”
  1. Ulrich WindlDec 4, 2014
  2. Torsten BögershausenDec 4, 2014
  3. Jeff KingDec 4, 2014
  4. Ævar Arnfjörð BjarmasonDec 4, 2014
  5. Michael J GruberDec 4, 2014
  6. Andreas SchwabDec 4, 2014
  7. Ævar Arnfjörð BjarmasonDec 4, 2014
  8. Jeff KingDec 4, 2014
  9. Torsten BögershausenDec 5, 2014
  10. Ralf ThielowDec 6, 2014
  11. Antw: Re: Enhancement Request: "locale" git optionUlrich Windl, Dec 8, 2014
  12. David KastrupDec 8, 2014
  13. Antw: Re: Enhancement Request: "locale" git optionUlrich Windl, Dec 4, 2014
  14. Ralf ThielowDec 4, 2014
  15. Antw: Re: Enhancement Request: "locale" git optionUlrich Windl, Dec 8, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.