From 2496004c934214f74976ec52e417969c19a87d04 Mon Sep 17 00:00:00 2001 From: Flowseal Date: Tue, 4 Aug 2026 15:36:50 +0300 Subject: [PATCH] move locales path to be handled by pyinstaller --- ui/i18n/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/i18n/__init__.py b/ui/i18n/__init__.py index b417658..f5b57ee 100644 --- a/ui/i18n/__init__.py +++ b/ui/i18n/__init__.py @@ -25,10 +25,10 @@ class LocaleEnum(str, Enum): return _DEFAULT_LOCALE -try: - _LOCALES_DIR = Path(__file__).resolve(strict=False).parent -except OSError: - _LOCALES_DIR = Path(os.path.realpath(__file__)).parent +_module_path = Path(__file__) +if not _module_path.is_absolute(): + _module_path = Path.cwd() / _module_path +_LOCALES_DIR = _module_path.parent _DEFAULT_LOCALE = LocaleEnum.english _translations: Dict[str, str] = {}