All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Nate Weaver <wevah@derailer.org>
Cc: "Eric Sunshine" <sunshine@sunshineco.com>,
	primenico@gmail.com, "Git List" <git@vger.kernel.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [Bug report] Git incorrectly selects language in macos
Date: Tue, 15 Jan 2019 18:16:58 -0800	[thread overview]
Message-ID: <20190116021658.GB8864@google.com> (raw)
In-Reply-To: <89DD4C7B-7F8B-42C5-81F2-F14D5B2D4CFD@derailer.org>

Nate Weaver wrote:
>>> On Fri, Sep 14, 2018 at 10:20 PM Niko Dzhus <primenico@gmail.com> wrote:

>>>> Looks like the issue appeared after updating git from brew.
[...]
>>>> A quick search revealed that brew changed how it builds git recently.
>>>> I think, it just didn't include i18n by default before, so I never
>>>> noticed this.
[...]
> Upon further digging, this is an issue in gettext's code on macOS:
> The function _nl_language_preferences_default (in langprefs.c) specifically
> breaks early when it sees the literal string "en" in the list (from the
> "AppleLanguages" defaults key), but not when it gets "en-US", etc.
>
> I.e., it doesn't check for a prefix.
>
> This can be fixed (though there might be a better way) simply by replacing
> both instances of
>
> if (strcmp (buf, "en") == 0)
>
> with
>
> if (strncmp (buf, "en", 2) == 0)
>
> in gettext's langprefs.c.

Nice sleuthing.  Do you have a bug tracking this in homebrew's issue
tracker, either for the git formula or the gettext formula?

Thanks,
Jonathan

  parent reply	other threads:[~2019-01-16  2:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 19:08 [Bug report] Git incorrectly selects language in macos Niko Dzhus
2018-09-14 21:57 ` Ævar Arnfjörð Bjarmason
2018-09-15  0:51   ` Niko Dzhus
2018-09-15  2:20 ` Niko Dzhus
2018-09-16  7:15   ` Eric Sunshine
2019-01-15 15:35     ` Nate Weaver
2019-01-15 16:43       ` Nate Weaver
2019-01-15 19:06         ` Nate Weaver
2019-01-15 20:36           ` Eric Sunshine
2019-01-16  2:16         ` Jonathan Nieder [this message]
2019-01-16  2:28         ` Jonathan Nieder

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=20190116021658.GB8864@google.com \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=primenico@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=wevah@derailer.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.