From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jeff King" <peff@peff.net>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Enhancement Request: "locale" git option
Date: Thu, 04 Dec 2014 17:12:40 +0100 [thread overview]
Message-ID: <548087F8.1030103@drmicha.warpmail.net> (raw)
In-Reply-To: <CACBZZX4Rin6jj2viTUmdpEqLb9TWnMf+p_vRF8BbLrTWFDcp3A@mail.gmail.com>
Ævar Arnfjörð Bjarmason schrieb am 04.12.2014 um 16:49:
> On Thu, Dec 4, 2014 at 10:55 AM, Jeff King <peff@peff.net> wrote:
>> 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).
>
> I think we should just stick to the standard *nix way of doing this:
> Tell people to set their locale in their environment.
>
> If someone's having this issue it's also happening for all the
> binutils, and any other command-line and GUI program they use, unless
> they override using the standard way of doing so, by setting the
> relevant LC_* environment variables.
>
> If you want Git in English then create an alias to override its locale
> to be C, if you want the editor it spawns to be in some other language
> alias that to something that explicitly sets LC_* for that editor.
>
> Maybe I'm being overzealous about this (especially with the "I
> implemented this" blinders on), but let's not have Git set the
> precedent for other *nix programs that they all should come up with
> some custom way to override locales, that's something to be done at
> the OS locale library level, which we use.
>
>> 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.
>
> You can, but the fact that that works is an internal implementation
> detail we shouldn't document or support.
>
The main issue at hand is really that we have localised git but not its
man pages. Even if you understand English, the man pages don't help you
at all if you can't connect the technical terms used there to their
localised counterparts in git's messages. (NO_GETTEXT=y is my solution.)
That is one of the many reasons why I proposed to have a dictionary of
the main technical terms for each language before we even localise git
in that language. In an ideal word, we would provide a simple solution
for looking these terms up both ways. I don't think we're going to have
localised man pages any time soon, are we?
Michael
next prev parent reply other threads:[~2014-12-04 16:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 7:32 Enhancement Request: "locale" git option Ulrich Windl
2014-12-04 8:29 ` Torsten Bögershausen
2014-12-04 9:55 ` Jeff King
2014-12-04 15:49 ` Ævar Arnfjörð Bjarmason
2014-12-04 16:12 ` Michael J Gruber [this message]
2014-12-04 16:53 ` Andreas Schwab
2014-12-04 17:21 ` Ævar Arnfjörð Bjarmason
2014-12-04 20:55 ` Jeff King
2014-12-05 15:45 ` Torsten Bögershausen
2014-12-06 19:28 ` Ralf Thielow
2014-12-08 7:50 ` Antw: " Ulrich Windl
2014-12-08 9:48 ` David Kastrup
2014-12-04 15:51 ` Ulrich Windl
2014-12-04 19:02 ` Ralf Thielow
2014-12-08 7:20 ` Antw: " Ulrich Windl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548087F8.1030103@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=Ulrich.Windl@rz.uni-regensburg.de \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).