Shopify / polaris

Shopify’s design system to help us work together to build a great experience for all of our merchants.
https://polaris.shopify.com
Other
5.78k stars 1.17k forks source link

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

Open East-Apollo opened 6 months ago

East-Apollo commented 6 months ago

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]()

Are you using React components?

None

Polaris version number

No response

Browser

No response

Device

No response

github-actions[bot] commented 1 day ago

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.