]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
Merge pull request #383 from creideiki/set-language-from-LC_MESSAGES
authorMicah Lee <micah@micahflee.com>
Fri, 18 Jun 2021 22:13:41 +0000 (18:13 -0400)
committerGitHub <noreply@github.com>
Fri, 18 Jun 2021 22:13:41 +0000 (18:13 -0400)
Set language from LC_MESSAGES, not LC_CTYPE

torbrowser_launcher/common.py

index 1a05fb48d80baabaafacb0dd786da2ea00e893d7..94ae39c9ae4db06fdadb06cd8c704d0eb4fcac3b 100644 (file)
@@ -100,7 +100,8 @@ class Common(object):
             "zh-CN",
             "zh-TW",
         ]
-        default_locale = locale.getlocale()[0]
+        locale.setlocale(locale.LC_MESSAGES, '')
+        default_locale = locale.getlocale(locale.LC_MESSAGES)[0]
         if default_locale is None:
             self.language = "en-US"
         else: