fix: i18n type error

This commit is contained in:
sworld 2024-12-22 22:23:50 +08:00
parent e0a0b6d22e
commit 96b5084092

View File

@ -71,7 +71,7 @@ class MIoTI18n:
) -> None:
self._main_loop = loop or asyncio.get_event_loop()
self._lang = lang
self._data = None
self._data = {}
async def init_async(self) -> None:
if self._data:
@ -94,7 +94,7 @@ class MIoTI18n:
self._data = data
async def deinit_async(self) -> None:
self._data = None
self._data = {}
def translate(
self, key: str, replace: Optional[dict[str, str]] = None