perf: optimize the naming of locale key

This commit is contained in:
vince
2024-07-10 21:55:16 +08:00
parent 25a1e93ab2
commit 4674380266
59 changed files with 664 additions and 1253 deletions

View File

@@ -28,10 +28,11 @@ async function setupI18n(app: App, options: LocaleSetupOptions = {}) {
// 在控制台打印警告
i18n.global.setMissingHandler((locale, key) => {
options.missingWarn &&
if (options.missingWarn && key.includes('.')) {
console.warn(
`[intlify] Not found '${key}' key in '${locale}' locale messages.`,
);
}
});
}