fix(core): fix error message missing (#11166)

This commit is contained in:
EYHN
2025-03-26 04:16:13 +00:00
parent 7fb52a97bd
commit 96fa1ffe6f
3 changed files with 30 additions and 3 deletions
+10
View File
@@ -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 };
}