mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-08-10 00:03:19 +03:00
move locales path to be handled by pyinstaller
This commit is contained in:
+4
-4
@@ -25,10 +25,10 @@ class LocaleEnum(str, Enum):
|
|||||||
return _DEFAULT_LOCALE
|
return _DEFAULT_LOCALE
|
||||||
|
|
||||||
|
|
||||||
try:
|
_module_path = Path(__file__)
|
||||||
_LOCALES_DIR = Path(__file__).resolve(strict=False).parent
|
if not _module_path.is_absolute():
|
||||||
except OSError:
|
_module_path = Path.cwd() / _module_path
|
||||||
_LOCALES_DIR = Path(os.path.realpath(__file__)).parent
|
_LOCALES_DIR = _module_path.parent
|
||||||
_DEFAULT_LOCALE = LocaleEnum.english
|
_DEFAULT_LOCALE = LocaleEnum.english
|
||||||
|
|
||||||
_translations: Dict[str, str] = {}
|
_translations: Dict[str, str] = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user