-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat:站点资产国际化 #385
feat:站点资产国际化 #385
Conversation
yangzy0603
commented
Jun 21, 2023
•
edited
Loading
edited
- gi-sdk 增加 IntlProvider ,并在 gi context 中增加资产语言包信息并传递 useIntl hook。
- 一方资产国际化统一使用 context 中传递的 useIntl 提供的能力处理。
- 非一方资产从 context 中获取语言环境,国际化方案不做限制,可自行维护。
- 当前 pr 仅以 gi-assets-basic 的 FilterPanel 为例。
- 资产包中Info 、 registerMeta 等非 React 组件部分的文案均使用 sdk 导出的静态方法 formatMessage 做多语言转换,changeLanguage、getCurrentLanguage 配合使用
你好, @yangzy0603 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复 Hello, @yangzy0603 CI run failed, please click the [Details] button for detailed log information and fix it. |
packages/gi-assets-basic/src/components/FilterPanel/locales/en-US.ts
Outdated
Show resolved
Hide resolved
feat: locale for gi-site
@@ -14,13 +14,14 @@ | |||
"build": "node --experimental-json-modules scripts/pre-build.mjs && NODE_OPTIONS=--max_old_space_size=4096 umi build", | |||
"build:docker": "node scripts/link.mjs && cd ../../ && npm run build:all:umd && cd packages/gi-site/ && BUILD_MODE=docker node scripts/pre-build.mjs && node scripts/copy-assets.mjs && BUILD_MODE=docker NODE_OPTIONS=--max_old_space_size=4096 umi build", | |||
"deploy": "node ./scripts/deploy.js", | |||
"start": "node --experimental-json-modules scripts/link.mjs && node scripts/pre-build.mjs && cross-env NODE_OPTIONS=--max_old_space_size=4096 cross-env PORT=8000 umi dev", | |||
"start": "node --experimental-json-modules scripts/link.mjs && node scripts/pre-build.mjs && cross-env NODE_OPTIONS=--openssl-legacy-provider --max_old_space_size=4096 cross-env PORT=8000 umi dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.