Skip to content

Commit 4d43c6a

Browse files
authored
Update the i18n language file init location (#934)
1 parent 407c848 commit 4d43c6a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

backend/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
from backend.common.i18n import i18n
2-
31
__version__ = '1.11.0'
4-
5-
6-
# 初始化 i18n
7-
i18n.load_locales()

backend/common/i18n.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class I18n:
1616
def __init__(self) -> None:
1717
self.locales: dict[str, dict[str, Any]] = {}
1818
self.current_language: str = settings.I18N_DEFAULT_LANGUAGE
19+
self.load_locales()
1920

2021
def load_locales(self) -> None:
2122
"""加载语言文本"""

0 commit comments

Comments
 (0)