@ecar/babel-plugin-auto-i18n
v1.1.0-beta.3
Published
A babel plugin to transform source language to 't' invoke expression
Readme
@ecar/babel-plugin-auto-i18n
function
auto transform chinese string to t invoke expression
usage
in babel config file like .babelrc,
{
"plugins": [["@ecar/babel-plugin-auto-i18n"]]
}TODO
1.0
- [x] 支持jsxText内的文本转换
- [x] 支持stringLiteral内的文本转换
- [x] 支持templateElement内的文本转换
- [ ] 支持templateLiteral的文本,单复数/文本插槽功能
- [x] Avoid unnecessary calls to the
useTranslationfunction. - [x] unnecessary import will be tree-shaking by webpack
optimization: { sideEffects: false, }
- [ ] bench the performance of this plugin
2.0
- [ ] support option source language
