Re: [PATCH] t/lib-httpd: pass LANG to Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 05, 2022 at 12:50:53PM -0700, Junio C Hamano wrote:

> René Scharfe <l.s.r@xxxxxx> writes:
> 
> > t5411 starts a web server with no explicit language setting, so it uses
> > the system default.  Ten of its tests expect it to return error messages
> > containing the prefix "fatal: ", emitted by die().  This prefix can be
> > localized since a1fd2cf8cd (i18n: mark message helpers prefix for
> > translation, 2022-06-21), however.  As a result these ten tests break
> > for me on a system with LANG="de_DE.UTF-8" because the web server sends
> > localized messages with "Schwerwiegend: " instead of "fatal: ".
> >
> > Fix these tests by passing LANG to the web server, which is set to "C"
> > by t/test-lib.sh, to get untranslated messages on both sides.
> 
> It is a good thing to do, but we seem to be extra conservative and
> set both LC_ALL=C LANG=C (presumably by following the habit acquired
> back when locale support were being introduced to various systems
> with different degree, which way predates Git itself) and export
> them in the main part of the test framework.
> 
> Shouldn't we be doing the same here?

I think setting both probably is overkill. But if we are going to set
one, the important one is LC_ALL. It overrides specific LC_* variables,
which in turn override LANG. So just setting LANG would get confused if
LC_MESSAGES were set, for example.

That said, there probably is no downside to passing through both, so we
might as well do so.

Other than that, the patch is obviously the right thing to be doing. I'm
surprised it took this long for it to be a problem. ;)

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux