viewizard / astromenace

Hardcore 3D space scroll-shooter with spaceship upgrade possibilities.
https://viewizard.com
Other
221 stars 30 forks source link

Incorrect locale handling #13

Closed AMDmi3 closed 5 years ago

AMDmi3 commented 5 years ago

My locale settings:

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

This is tuned in a way that applications would handle Russian properly (LC_CTYPE), but interface would stay unlocalized (LC_MESSAGES). Astromenace runs in Russian, so it reads locale settings incorrectly. LC_MESSAGES is the locale entity responsible for the UI language, so taking standard locale selection logic, it should act as follows:

viewizard commented 5 years ago

For now we use LC_ALL > LANG for language detection. Will fix it for LC_ALL > LC_MESSAGES > LANG. Thanks!

viewizard commented 5 years ago

Fixed https://github.com/viewizard/astromenace/commit/baa20d568ad92049e314d7651c70da03258c6bc5

AMDmi3 commented 5 years ago

Confirmed.