From ab5ec2bfae0029d30b0fd3dc9566e27c31d62323 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Wed, 12 Nov 2025 16:45:07 +1100 Subject: [PATCH] Remove code we won't reach in strings.py because we always pass a default locale --- bouquin/strings.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bouquin/strings.py b/bouquin/strings.py index 306183a..6a321b8 100644 --- a/bouquin/strings.py +++ b/bouquin/strings.py @@ -8,7 +8,7 @@ strings = {} translations = {} -def load_strings(current_locale: str | None = None) -> None: +def load_strings(current_locale: str) -> None: global strings, translations translations = {} @@ -18,15 +18,6 @@ def load_strings(current_locale: str | None = None) -> None: data = (root / f"{loc}.json").read_text(encoding="utf-8") translations[loc] = json.loads(data) - # Load in the system's locale if not passed in somehow from settings - if not current_locale: - try: - from PySide6.QtCore import QLocale - - current_locale = QLocale.system().name().split("_")[0] - except Exception: - current_locale = _DEFAULT - if current_locale not in translations: current_locale = _DEFAULT