We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ant-design-pro项目中组件用到了国际化,dumi搭建文档引用改组件时,提示 export 'useIntl' (imported as 'useIntl') was not found in 'umi' , 于是在.dumirc.ts 添加了插件 和 添加 locale配置 : plugins: [ '@umijs/plugins/dist/locale', ], locale: { default: 'zh-CN', },
此时页面可以正常打开了,但是由于匹配不到正确的locales国际化配置文件,导致组件显示的 国际化id名称,例如 “publicComponents.table.query”
同时 dumi框架自身相关的文字也变成了 国际化id名称,例如顶部搜索的placeholder显示 “header.search.placeholder”
The text was updated successfully, but these errors were encountered:
这个组合应该是不被支持的,分两点说明下:
如果你的初衷是为了管理应用内的组件,那么目前没有最佳实践,加上 dumi 也不支持依赖 Umi 框架能力的组件研发(即源码里存在 import xxx from 'umi'),所以这个问题是没有解决方案的
import xxx from 'umi'
Sorry, something went wrong.
No branches or pull requests
Question
ant-design-pro项目中组件用到了国际化,dumi搭建文档引用改组件时,提示 export 'useIntl' (imported as 'useIntl') was not found in 'umi' ,
于是在.dumirc.ts 添加了插件 和 添加 locale配置 :
plugins: [
'@umijs/plugins/dist/locale',
],
locale: {
default: 'zh-CN',
},
此时页面可以正常打开了,但是由于匹配不到正确的locales国际化配置文件,导致组件显示的 国际化id名称,例如 “publicComponents.table.query”
同时 dumi框架自身相关的文字也变成了 国际化id名称,例如顶部搜索的placeholder显示 “header.search.placeholder”
Sample Code
The text was updated successfully, but these errors were encountered: