1

This is what I'm doing:

LANG=ru_RU.UTF-8 git log -n 1 --pretty=format:%ad '--date=format:%B %e, %Y'

I'm getting:

March 23, 2016

I'm expecting:

Март 23, 2016

What's wrong?

I'm checking my locale, seems to be OK:

$ LANG=ru_RU.UTF-8 locale
LANG="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_CTYPE="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_ALL=

This is what I'm also doing:

$ export LANG=ru_RU
$ date +%c
пятница, 25 марта 2016 г. 16:49:56
$ git log -n 1 --pretty=format:%ad '--date=format:%c'
Wed Mar 23 21:24:18 2016

WTF?

Bernie Noel
  • 304
  • 2
  • 10
  • Works for me when I use `LANG=ru_RU.UTF-8 ` (the name of the various files varies somewhat on different OSes, so check your `/usr/share/locale`, assuming Unix-ish system). – torek Mar 24 '16 at 01:02
  • @torek hm... I do have `/usr/share/locale/ru_RU.UTF-8` file (it's OSX), but still doesn't work for me – Bernie Noel Mar 24 '16 at 04:27
  • When you type "locale", is there any error? (as in http://blog.remibergsma.com/2012/07/10/setting-locales-correctly-on-mac-osx-terminal-application/) – VonC Mar 24 '16 at 07:38
  • @VonC seems to be working.. I've updated my question – Bernie Noel Mar 25 '16 at 19:59
  • Just in case, try `export LANGUAGE=ru_RU.UTF-8` (as in http://askubuntu.com/a/311796/5470) – VonC Mar 25 '16 at 21:02
  • @VonC no go :( any other ideas? – Bernie Noel Mar 25 '16 at 23:03
  • Check if there are any other environment variable or strange folders in the $PATH that might interfer. Also http://stackoverflow.com/a/8161863/6309. Also check if that locale is actually installed: http://apple.stackexchange.com/a/23175 – VonC Mar 25 '16 at 23:08
  • @VonC this one works fine: `LC_ALL=ru_RU date +'%c'`, but in combination with Git I'm still getting English text – Bernie Noel Mar 25 '16 at 23:12
  • Did you uncheck the "Set locale environment variables on startup" as in http://blog.remibergsma.com/2012/07/10/setting-locales-correctly-on-mac-osx-terminal-application/? (and close and relaunch a shell window) – VonC Mar 25 '16 at 23:21
  • @VonC yes, I did. no luck... see my update of the question – Bernie Noel Mar 25 '16 at 23:51
  • Is there an alias for git? (`alias git`) What which `git --version` returns? And `which git`? – VonC Mar 26 '16 at 00:00
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/107381/discussion-between-bernie-noel-and-vonc). – Bernie Noel Mar 26 '16 at 00:24

0 Answers0