Skip to content

Commit 1dc5a10

Browse files
committed
feat: implement plugin-i18next-vue and plugin-vue-i18n
1 parent a84be21 commit 1dc5a10

File tree

94 files changed

+10268
-7437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+10268
-7437
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ tses
1111
public
1212

1313
.vscode
14-
*.md
14+
*.md
15+
*.vue

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
npm-debug.log
1212
e2e/fixtures/scripts
1313
e2e/test-results
14+
__screenshots__
1415
coverage/
1516
run
1617
.DS_Store

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@
55
},
66
"cSpell.words": ["jsoneo", "madhead", "shijistar", "softprops", "tses", "Vuetify"],
77
"i18n-ally.localesPaths": [],
8-
"commentTranslate.hover.enabled": false
8+
"files.exclude": {
9+
"**/.git": true,
10+
"**/.svn": true,
11+
"**/.hg": true,
12+
"**/.DS_Store": true,
13+
"**/Thumbs.db": true,
14+
"**/node_modules": true
15+
},
16+
"typescript.tsdk": "node_modules/typescript/lib"
917
}

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -972,13 +972,14 @@ Enum.install(antdPlugin, {
972972

973973
The following plugins are available. You can choose to install them based on your needs:
974974

975-
- [@enum-plus/plugin-antd](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-antd): Ant Design oriented features, including `enum.toSelect`, `enum.toMenu`, `enum.toFilter`, and `enum.toValueMap`. With these methods, you can directly bind enums to the corresponding Ant Design components, greatly simplifying your code.
976-
- [@enum-plus/plugin-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next): Automatically adapts to [i18next](https://www.i18next.com) to enable internationalization support for enums.
977-
- [@enum-plus/plugin-react-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react-i18next): Automatically adapts to [react-i18next](https://react.i18next.com) to enable internationalization support for enums.
978-
- [@enum-plus/plugin-react](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react): React integration, including support for `Enum.localize` to return React components, and listening for language changes to auto re-render components.
975+
- [@enum-plus/plugin-antd](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-antd) - Ant Design oriented features, including `enum.toSelect`, `enum.toMenu`, `enum.toFilter`, and `enum.toValueMap`. With these methods, you can directly bind enums to the corresponding Ant Design components, greatly simplifying your code.
976+
- [@enum-plus/plugin-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next) - Integrates [i18next](https://www.i18next.com) to enable internationalization of enum labels.
977+
- [@enum-plus/plugin-react-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react-i18next) - Integrates [react-i18next](https://react.i18next.com) to enable internationalization of enum labels.
978+
- [@enum-plus/plugin-react](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react) - React integration, including support for `Enum.localize` to return React components, and listening for language changes to auto update components.
979+
- [@enum-plus/plugin-i18next-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next-vue) - Integrates [i18next-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next-vue) to enable internationalization of enum labels and listen for language changes to auto update components.
980+
- [@enum-plus/plugin-vue-i18n](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-vue-i18n) - Integrates [vue-i18n](https://vue-i18n.intlify.dev) to enable internationalization of enum labels and listen for language changes to auto update components.
979981
- We are working on the following plugins:
980-
- [@enum-plus/plugin-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-vue): Vue integration, including support for `Enum.localize` to return Vue components, and listening for language changes to auto re-render components.
981-
- [@enum-plus/plugin-angular](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-angular): Angular integration, including support for `Enum.localize` to return Angular components, and listening for language changes to auto re-render components. _We need your help to develop this plugin!_
982+
- [@enum-plus/plugin-angular](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-angular): Angular integration, including support for `Enum.localize` to return Angular components, and listening for language changes to auto update components. _We need your help to develop this plugin!_
982983

983984
> If the plugin you are searching for is not available, or if you want to develop your own plugin, please refer to the [Plugin Development Guide](./docs/plugin-development.md). You can develop new plugins in the official enum-plus repository or publish your developed plugins to npm and share your plugin links here. We sincerely need your help to enrich the plugin ecosystem!
984985

README.zh-CN.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -964,12 +964,13 @@ Enum.install(antdPlugin, {
964964

965965
目前我们已经开发并发布了以下插件,你可以根据需要选择安装:
966966

967-
- [@enum-plus/plugin-antd](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-antd): Ant Design 相关功能,包括 `enum.toSelect``enum.toMenu``enum.toFilter``enum.toValueMap`。通过这些方法,可以直接将枚举绑定到对应的 Ant Design 组件上,极大地简化了代码。
968-
- [@enum-plus/plugin-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next): 自动适配 [i18next](https://www.i18next.com) 以让枚举支持国际化。
969-
- [@enum-plus/plugin-react-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react-i18next): 自动适配 [react-i18next](https://react.i18next.com) 以让枚举支持国际化。
970-
- [@enum-plus/plugin-react](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react): React 集成,包括支持 `Enum.localize` 返回 React 组件,以及监听语言变化以自动重新渲染组件。
967+
- [@enum-plus/plugin-antd](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-antd) - Ant Design 相关功能,包括 `enum.toSelect``enum.toMenu``enum.toFilter``enum.toValueMap`。通过这些方法,可以直接将枚举绑定到对应的 Ant Design 组件上,极大地简化了代码。
968+
- [@enum-plus/plugin-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next) - 集成 [i18next](https://www.i18next.com) 并实现枚举标签的国际化。
969+
- [@enum-plus/plugin-react-i18next](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react-i18next) - 自动适配 [react-i18next](https://react.i18next.com) 以让枚举支持国际化。
970+
- [@enum-plus/plugin-react](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-react) - React 集成,包括支持 `Enum.localize` 返回 React 组件,以及监听语言变化以自动重新渲染组件。
971+
- [@enum-plus/plugin-i18next-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next-vue) - 集成 [i18next-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-i18next-vue) 并实现枚举标签的国际化,支持切换语言后自动更新UI。
972+
- [@enum-plus/plugin-vue-i18n](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-vue-i18n) - 集成 [vue-i18n](https://vue-i18n.intlify.dev) 并实现枚举标签的国际化,支持切换语言后自动更新UI。
971973
- 我们正在开发以下插件:
972-
- [@enum-plus/plugin-vue](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-vue): Vue 集成,包括支持 `Enum.localize` 返回 Vue 组件,以及监听语言变化以自动重新渲染组件。
973974
- [@enum-plus/plugin-angular](https://github.com/shijistar/enum-plus/tree/main/packages/plugin-angular): Angular 集成,包括支持 `Enum.localize` 返回 Angular 组件,以及监听语言变化以自动重新渲染组件。_我们需要你的帮助来开发这个插件!_
974975

975976
> 如果你没有找到需要的插件,或者你想开发自己的插件,请参阅 [插件开发指南](./docs/plugin-development.zh-CN.md)。你可以在enum-plus官方仓库中开发新插件,也可以将你开发的插件发布到 npm 上,并把你的插件链接分享在这里。我们真诚地需要你的帮助,来丰富插件生态系统!

0 commit comments

Comments
 (0)