mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-01-17 23:50:42 +08:00
fix: i18n type error
This commit is contained in:
parent
e0a0b6d22e
commit
96b5084092
@ -71,7 +71,7 @@ class MIoTI18n:
|
|||||||
) -> None:
|
) -> None:
|
||||||
self._main_loop = loop or asyncio.get_event_loop()
|
self._main_loop = loop or asyncio.get_event_loop()
|
||||||
self._lang = lang
|
self._lang = lang
|
||||||
self._data = None
|
self._data = {}
|
||||||
|
|
||||||
async def init_async(self) -> None:
|
async def init_async(self) -> None:
|
||||||
if self._data:
|
if self._data:
|
||||||
@ -94,7 +94,7 @@ class MIoTI18n:
|
|||||||
self._data = data
|
self._data = data
|
||||||
|
|
||||||
async def deinit_async(self) -> None:
|
async def deinit_async(self) -> None:
|
||||||
self._data = None
|
self._data = {}
|
||||||
|
|
||||||
def translate(
|
def translate(
|
||||||
self, key: str, replace: Optional[dict[str, str]] = None
|
self, key: str, replace: Optional[dict[str, str]] = None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user