git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
* [Bug report] Git incorrectly selects language in macos
@ 2018-09-14 19:08 Niko Dzhus
  2018-09-14 21:57 ` Ævar Arnfjörð Bjarmason
  2018-09-15  2:20 ` Niko Dzhus
  0 siblings, 2 replies; 5+ messages in thread
From: Niko Dzhus @ 2018-09-14 19:08 UTC (permalink / raw)
  To: git

It doesn't use English when other language is available as a secondary language.

Reproducing:

1. Open "Language & Region" in macos settings
2. In "Preferred languages" box, set English as a primary language.
3. Add another language, that git is translated to, as a secondary
language, for example, French or German.
4. Run any git command - git will use the secondary language, instead
of English.

When the secondary language is removed, then git starts using English again.

I have git 2.19.0, installed from brew, and my OS is macOS 10.13.6 .

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug report] Git incorrectly selects language in macos
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-09-14 21:57 UTC (permalink / raw)
  To: Niko Dzhus; +Cc: git


On Fri, Sep 14 2018, Niko Dzhus wrote:

> It doesn't use English when other language is available as a secondary language.
>
> Reproducing:
>
> 1. Open "Language & Region" in macos settings
> 2. In "Preferred languages" box, set English as a primary language.
> 3. Add another language, that git is translated to, as a secondary
> language, for example, French or German.
> 4. Run any git command - git will use the secondary language, instead
> of English.
>
> When the secondary language is removed, then git starts using English again.
>
> I have git 2.19.0, installed from brew, and my OS is macOS 10.13.6 .

What's the output of these two commands for you:

 1. locale
 2. env | grep -e LC -e LANG

We don't do any such magic ourselves, so whatever this is is down to how
i18n in general works on your system, do you have any other translated
command-line program that works differently?

I suspect there's some DWYM logic here that always treats English as a
secondary language.

Do you also e.g. get the same results if you select say Swedish as a
primary language and German as a secondary? I.e. a Git in German, as
opposed to Swedish?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug report] Git incorrectly selects language in macos
  2018-09-14 21:57 ` Ævar Arnfjörð Bjarmason
@ 2018-09-15  0:51   ` Niko Dzhus
  0 siblings, 0 replies; 5+ messages in thread
From: Niko Dzhus @ 2018-09-15  0:51 UTC (permalink / raw)
  To: avarab; +Cc: git

Tried what you suggested - it seems, it only ignores English. In you
example, with Swedish as primary and German as secondary, git uses
Swedish.

With more that one secondary language, the one with a higher priority
is being used, as expected. I also tried using non-generic English
(English-UK and English-US), but they also get ignored.

Terminal commands return the following:

➜  ~ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
➜  ~ env | grep -e LC -e LANG
LC_CTYPE=UTF-8
➜  ~

It doesn't change with primary/secondary language switching. I don't
have any manual overrides in my .zshrc and .zprofile for those
neither.

On Sat, Sep 15, 2018 at 12:57 AM Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
>
>
> On Fri, Sep 14 2018, Niko Dzhus wrote:
>
> > It doesn't use English when other language is available as a secondary language.
> >
> > Reproducing:
> >
> > 1. Open "Language & Region" in macos settings
> > 2. In "Preferred languages" box, set English as a primary language.
> > 3. Add another language, that git is translated to, as a secondary
> > language, for example, French or German.
> > 4. Run any git command - git will use the secondary language, instead
> > of English.
> >
> > When the secondary language is removed, then git starts using English again.
> >
> > I have git 2.19.0, installed from brew, and my OS is macOS 10.13.6 .
>
> What's the output of these two commands for you:
>
>  1. locale
>  2. env | grep -e LC -e LANG
>
> We don't do any such magic ourselves, so whatever this is is down to how
> i18n in general works on your system, do you have any other translated
> command-line program that works differently?
>
> I suspect there's some DWYM logic here that always treats English as a
> secondary language.
>
> Do you also e.g. get the same results if you select say Swedish as a
> primary language and German as a secondary? I.e. a Git in German, as
> opposed to Swedish?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug report] Git incorrectly selects language in macos
  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  2:20 ` Niko Dzhus
  2018-09-16  7:15   ` Eric Sunshine
  1 sibling, 1 reply; 5+ messages in thread
From: Niko Dzhus @ 2018-09-15  2:20 UTC (permalink / raw)
  To: git

Looks like the issue appeared after updating git from brew.

I tried it on a different mac laptop, git 2.18 still used English, but
after updating to 2.19 it started using secondary language.

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.
Here's the history of formula changes:
https://github.com/Homebrew/homebrew-core/commits/master/Formula/git.rb
Also, I found this thread https://github.com/Homebrew/homebrew-core/issues/31980

Anybody here familiar enough with the build process and dependencies
of git to pinpoint what exactly is causing this and how to fix it?...

On Fri, Sep 14, 2018 at 10:08 PM Niko Dzhus <primenico@gmail.com> wrote:
>
> It doesn't use English when other language is available as a secondary language.
>
> Reproducing:
>
> 1. Open "Language & Region" in macos settings
> 2. In "Preferred languages" box, set English as a primary language.
> 3. Add another language, that git is translated to, as a secondary
> language, for example, French or German.
> 4. Run any git command - git will use the secondary language, instead
> of English.
>
> When the secondary language is removed, then git starts using English again.
>
> I have git 2.19.0, installed from brew, and my OS is macOS 10.13.6 .

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug report] Git incorrectly selects language in macos
  2018-09-15  2:20 ` Niko Dzhus
@ 2018-09-16  7:15   ` Eric Sunshine
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sunshine @ 2018-09-16  7:15 UTC (permalink / raw)
  To: primenico; +Cc: Git List, Ævar Arnfjörð Bjarmason

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.
>
> Anybody here familiar enough with the build process and dependencies
> of git to pinpoint what exactly is causing this and how to fix it?...

This problem is not specific to Git. Earlier in the thread, Ævar
asked[1] if the problem also occurs with other command-line programs,
and indeed it does. For instance, I tried with 'wget' installed via
brew, and it exhibits the same odd behavior. Ævar suggested that there
might be some magic special-casing English, which makes me wonder if
brew builds such magic into gettext(?) or if the magic is part of
MacOS itself.

[1]: https://public-inbox.org/git/87a7ojlp31.fsf@evledraar.gmail.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox