Subject: Re: Has anyone looked at Gettext support for Git itself?

From: Jan Hudec <[email-masked]>
Date: Mon, 17 May 2010 19:59:40 +0200

On Mon, May 17, 2010 at 17:12:22 +0200, Thomas Rast wrote:
> Ævar Arnfjörð Bjarmason wrote:
> > On Mon, May 17, 2010 at 14:32, Thomas Rast <[email-masked]> wrote:
> > > Ævar Arnfjörð Bjarmason wrote:
> > >>
> > >> just prefix the calls to git with LC_ALL=C.
> > >
> > > And how exactly do you expect us to go back in history and prefix all
> > > invocations of git in all scripts with LC_ALL=C?
> > 
> > I don't expect you to. I just don't think it's unreasonable that if
> > Git were to be internationalized that it behave like every other *nix
> > program. If you have a Chinese locale and rely on the output of some
> > program being in English your scripts will break if the OS
> > subsequently upgrades to a new version of the program that has been
> > translated to Chinese.
> 
> I've bumped against these hysterical raisins in the past too, so you
> have my sympathy.  But git's API is the set of its plumbing commands,
> I/O, arguments and all.

The plumbing commands' output, obviously, may not become locale dependent
since it is indeed part of the API. It may sometimes print localized error
messages though where one can't really do anything besides relying them to
the user anyway.

There are cases though, where somebody calls *porcelain* commands in their
scripts and there they occasionally may need this LC_ALL=C thing. I suppose
having a global option to turn off localization might be useful for such
users.

> We do not give a similar promise for porcelain commands, which
> includes most of the frequently used commands that also have a bunch
> of translatable output like status, clone, fetch, branch, etc.  You
> could start by translating the helpful comments in status, commit and
> rebase -i.
> 
> However, I'm just trying to point out that your suggested solution
> 
> > The right way to handle that is to call programs like that with
> > LC_ALL=C.
> 
> will never fly, and that git will, e.g., never be able to consistently
> call a commit a "Version" [de] because for-each-ref must forever fill
> the %(type) field with "commit".

I would personally consider it too obvious that "programs like that" means
porcelain to mention it.

Most error messages may be translated even in plumbing though, just like they
are translated in standard unix commands.

-- 
						 Jan 'Bulb' Hudec <[email-masked]>