From aa8df798f137a49906a38587f70b7ef753711bd2 Mon Sep 17 00:00:00 2001 From: Andreas Bombe Date: Mon, 4 Mar 2024 14:36:39 +0000 Subject: Use getlocale(LC_MESSAGES) for default interface locale It will use LANG if LC_MESSAGES is not set and return no locale if neither is set. Using getdefaultlocale() will yield possibly undesired locales if other LC_* fields are set. Gbp-Pq: Name default-locale --- aqt/profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/profiles.py b/aqt/profiles.py index f12b311..323a55a 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -373,7 +373,7 @@ please see: d.rejected.connect(lambda: True) # default to the system language try: - (lang, enc) = locale.getdefaultlocale() + (lang, enc) = locale.getlocale(locale.LC_MESSAGES) except: # fails on osx lang = "en" -- cgit v1.2.3