diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2024-08-24 14:52:24 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2024-08-24 14:52:24 +0200 |
commit | af70ff1fdc69d021071df16c00682d8bcd6990ba (patch) | |
tree | 5a00bfdbc399a0e12808a537d8e26dae8090b2c8 | |
parent | [3635][WebUI] fix language change to system default (diff) | |
download | deluge-af70ff1fdc69d021071df16c00682d8bcd6990ba.tar.xz deluge-af70ff1fdc69d021071df16c00682d8bcd6990ba.zip |
[Util] Refactor reset language env vars
-rw-r--r-- | deluge/i18n/util.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py index f553dc8fb..b79d9b77a 100644 --- a/deluge/i18n/util.py +++ b/deluge/i18n/util.py @@ -66,9 +66,8 @@ def set_language(lang): :type lang: str """ if not lang: - for lang_env_var in ['LANGUAGE', 'LANG']: - if lang_env_var in os.environ: - del os.environ[lang_env_var] + os.environ.pop('LANGUAGE', None) + os.environ.pop('LANG', None) return # Necessary to set these environment variables for GtkBuilder |