Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve module specifier '@shopify/polaris/locales/zh-CN.json' #11855

Open
East-Apollo opened this issue Apr 8, 2024 · 0 comments
Open
Labels
Bug Something is broken and not working as intended in the system. untriaged

Comments

@East-Apollo
Copy link

Summary

I encountered an exception while using i18n to dynamically load localized multilingual files

const [i18n] = useI18n({
id: "Polaris",
fallback: translations,
async translations(locale: string) {
console.log("locale", locale);
try {
const dictionary = await import(
/* webpackChunkName: "Polaris-i18n", webpackMode: "lazy-once" */ @shopify/polaris/locales/${locale}.json
);
console.log("dictionary", dictionary);
return dictionary && dictionary.default;
} catch (error) {
console.log("error", error);
return zhCN;
}
},
});

Expected behavior

help

Actual behavior

Wrap animated gifs/videos in a details tag:

Summary of your gif(s) Description of what the gif shows

Steps to reproduce

Link to sandbox
1.
2.
3.

Are you using React components?

None

Polaris version number

No response

Browser

No response

Device

No response

@East-Apollo East-Apollo added Bug Something is broken and not working as intended in the system. untriaged labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system. untriaged
Projects
None yet
Development

No branches or pull requests

1 participant