Commit fb71078e authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: fully specify locales (#3461)

parent 1c7c9319
......@@ -81,7 +81,7 @@ export async function dynamicActivate(locale: SupportedLocale) {
// There are no default messages in production; instead, bundle the default to save a network request:
// see https://github.com/lingui/js-lingui/issues/388#issuecomment-497779030
const catalog =
locale === DEFAULT_LOCALE ? DEFAULT_CATALOG : await import(`${process.env.REACT_APP_LOCALES}/${locale}`)
locale === DEFAULT_LOCALE ? DEFAULT_CATALOG : await import(`${process.env.REACT_APP_LOCALES}/${locale}.js`)
// Bundlers will either export it as default or as a named export named default.
i18n.load(locale, catalog.messages || catalog.default.messages)
i18n.activate(locale)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment