]> git.lizzy.rs Git - torbrowser-launcher.git/commit
Set language from LC_MESSAGES, not LC_CTYPE
authorKarl-Johan Karlsson <creideiki@ferretporn.se>
Mon, 12 Oct 2020 16:17:00 +0000 (18:17 +0200)
committerKarl-Johan Karlsson <creideiki@ferretporn.se>
Mon, 12 Oct 2020 16:17:00 +0000 (18:17 +0200)
commit5206d4614876a83f757155eabb9b18cb00984ad6
tree3a24b9cc171c2c82eac0e783dd0b4662bda601f0
parent7089bab4bf90bb34efbf0df39e952464b8bdb3f0
Set language from LC_MESSAGES, not LC_CTYPE

Calling `locale.getlocale()` checks LC_CTYPE, which is not meant for
UI strings. Change the call to check LC_MESSAGES instead.

Also call `locale.setlocale()` first to import the locale settings
from the environment. This is not needed for LC_CTYPE due to
https://bugs.python.org/issue6203 but is required for LC_MESSAGES.

Closes #361
torbrowser_launcher/common.py