fix: i18n strings not falling back correctly (#4447)
This commit is contained in:
@@ -11,6 +11,8 @@ import { throwError } from "~/helpers/functional/error"
|
||||
import { PersistenceService } from "~/services/persistence"
|
||||
import { getService } from "./dioc"
|
||||
|
||||
import FALLBACK_LANG_MESSAGES from "../../locales/en.json"
|
||||
|
||||
/*
|
||||
In context of this file, we have 2 main kinds of things.
|
||||
1. Locale -> A locale is termed as the i18n entries present in the /locales folder
|
||||
@@ -144,6 +146,12 @@ export default <HoppModule>{
|
||||
|
||||
i18nInstance = i18n
|
||||
|
||||
// Load in fallback lang messages
|
||||
i18nInstance.global.setLocaleMessage(
|
||||
FALLBACK_LANG_CODE,
|
||||
FALLBACK_LANG_MESSAGES
|
||||
)
|
||||
|
||||
// TODO: Global loading state to hide the resolved lang loading
|
||||
const currentLocale = resolveCurrentLocale()
|
||||
changeAppLanguage(currentLocale)
|
||||
|
||||
Reference in New Issue
Block a user