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

Re: Accept-language test fails on Mac OS

From
Christian Couder <christian.couder@gmail.com>
Date
Dec 8, 2014, 15:51 UTC
Message-ID
<CAP8UFD0TSqXMRSpisaQG92_xAizswGKvFV-_N6fdjqbAh8vejA@mail.gmail.com>
In-Reply-To
<20141207071827.GA31014@peff.net>
On Sun, Dec 7, 2014 at 8:18 AM, Jeff King <peff@peff.net> wrote:
Show 28 quoted lines
> On Sat, Dec 06, 2014 at 10:04:06PM +0100, Torsten Bögershausen wrote:
>
>> I get this:
>>
>>
>> expecting success:
>>         check_language "ko-KR, *;q=0.1" ko_KR.UTF-8 de_DE.UTF-8 ja_JP.UTF-8 en_US.UTF-8 &&
>>         check_language "de-DE, *;q=0.1" ""          de_DE.UTF-8 ja_JP.UTF-8 en_US.UTF-8 &&
>>         check_language "ja-JP, *;q=0.1" ""          ""          ja_JP.UTF-8 en_US.UTF-8 &&
>>         check_language "en-US, *;q=0.1" ""          ""          ""          en_US.UTF-8
>>
>> --- expect      2014-12-06 21:00:59.000000000 +0000
>> +++ actual      2014-12-06 21:00:59.000000000 +0000
>> @@ -1 +0,0 @@
>> -Accept-Language: de-DE, *;q=0.1
>> not ok 25 - git client sends Accept-Language based on LANGUAGE, LC_ALL, LC_MESSAGES and LANG
>
> I can reproduce the same problem here (Debian unstable). I actually ran
> into three issues (aside from needing to use Junio's SQUASH commit, to
> avoid the "\r" bash-ism):
>
>   1. I couldn't build without including locale.h, for the
>      definition of setlocale() and the LC_MESSAGES constant (both used
>      in get_preferred_languages).
>
>      I'm not sure what portability issues there are with including it
>      unconditionally. Should this possibly be tied into gettext.c, which
>      already uses setlocale?

Yeah, pu build is broken on Ubuntu 14.04 too, because of 7567fad2431eb38291fd74a70f603e5746c6f728 (http: send Accept-Language header if possible).

Thanks, Christian.

Previous: Torsten Bögershausen
Message 11 of 11 in “Accept-language test fails on Mac OS”
  1. Michael BlumeDec 5, 2014
  2. Junio C HamanoDec 5, 2014
  3. Michael BlumeDec 5, 2014
  4. Torsten BögershausenDec 6, 2014
  5. Yi, EungJunDec 6, 2014
  6. Torsten BögershausenDec 6, 2014
  7. Yi, EungJunDec 7, 2014
  8. Torsten BögershausenDec 7, 2014
  9. Jeff KingDec 7, 2014
  10. Torsten BögershausenDec 7, 2014
  11. Christian CouderDec 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.