diff --git a/src/mediawiki.d.ts b/src/mediawiki.d.ts index f0ef196f..911f6efa 100644 --- a/src/mediawiki.d.ts +++ b/src/mediawiki.d.ts @@ -9,4 +9,5 @@ declare module 'vue' { declare global { const __non_webpack_require__: (id: string) => T + const __webpack_runtime_id__: string } diff --git a/src/utils/i18n.ts b/src/utils/i18n.ts index 3ca7691e..9831280e 100644 --- a/src/utils/i18n.ts +++ b/src/utils/i18n.ts @@ -35,7 +35,6 @@ function resolveFallback( localMessages: Record>, ): Record { const messages = findMessages(resolvedLanguage, localMessages) as Record - console.log(localMessages) const fallbackChain = isKeyOfObject(resolvedLanguage, FALLBACK_CHAIN) ? FALLBACK_CHAIN[resolvedLanguage] : FALLBACK_CHAIN.default @@ -59,7 +58,9 @@ function findMessages(language: string, localMessages: Record>>(`./locale.json`) + ? __non_webpack_require__>>( + `./mcw-calc-${__webpack_runtime_id__}-locales.json`, + ) : {} return isKeyOfObject(language, json) ? json[language] : {}