After upgrading to git 2.19 the messages are in Spanish.
I don't have LANG set, but after setting it to English:
export LANG="en_US.UTF-8"
Then it works again, but before upgrade, it wasn't necessary to set up explicitly the language (what did it change the default recognition?)
UDPATE1:
https://github.com/Homebrew/homebrew-core/pull/32008
https://public-inbox.org/git/CAKd-JgS3omKbN+OzQL2dUun6Seg9CjDNk8KEj9m83xdTZE=7FA@mail.gmail.com/T/
This issue has been seen in other command-line as wget.
All point to be gettext() ?
UPDATE2:
https://github.com/Homebrew/homebrew-core/issues/31980 still researching gettext.
There is a bug report in progress, as seen in this similar case
After update to Git 2.19 Git's output suddenly appeared in Russian.
I can useexport LANG=en_US.UTF-8to switch it to English back, but it's very weird.this appears to be a bug in how
brewchanged its builds of Git, and also affects packages besides git.This problem is not specific to Git.
Ævar asked if the problem also occurs with other command-line programs, and indeed it does.
For instance, I tried with 'wget' installed viabrew, 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 intogettext(?) or if the magic is part of MacOS itself.
Alexey Storozhev (storoj) comments in Homebrew/homebrew-core issue 31980
I totally agree with @moonfruit that removing
--with-gettextoption was a mistake.
But another mistake happened and gettext support became mandatory. It affects badly if your system has one or more languages.
For example, I haveen_RUlocale and mygitoutput became Russian.
That's not an option for me and I can't help with it in a normal way;
- I don't want to use
LC_LANG=en_USin mybash_profilebecause it will affect everything in my system,- I don't want to make an alias like
git="LC_LANG=en_US git"either.Another point to return
--with-gettextback is the waygitsupports i18n.
According toINSTALL, the only way to use English is exactlyNO_GETTEXTflag enabled. Otherwise,po/${lang}.pofiles will be used to determine available languages.
As you see, that directory does not contain "en.po" file. And if you are runninggitwithgettextsupport anden_RUlocale,gettextwill look for following files:share/locale/{en_RU,en,ru_RU,ru}/LC_MESSAGES/git.mo. It finally finds "ru" one and uses Russian language for output which is totally unusable. I don't have any piece of development software localized in Russian.
So... rebuilding Git with NO_GETTEXT=1 flag (disabling translations) seems to be the only workaround for now (Q4 2018).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With