mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
fix(core): fix error message missing (#11166)
This commit is contained in:
@@ -150,6 +150,16 @@ export function createI18nWrapper(getI18nFn: () => i18n) {
|
||||
|
||||
return I18nMethod.t.bind(null, key);
|
||||
},
|
||||
has(self, key: string) {
|
||||
if (key in self) {
|
||||
return true;
|
||||
}
|
||||
const i18n = getI18nFn();
|
||||
if (i18n.exists(key)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
}) as typeof I18nMethod &
|
||||
ReturnType<typeof useAFFiNEI18N> & { [unknownKey: string]: () => string };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user