From b17478732c0a69447234017aa231dbdc7b0bb0f7 Mon Sep 17 00:00:00 2001 From: Germey Date: Sun, 24 Mar 2024 00:38:55 +0800 Subject: [PATCH 1/8] add --- package.json | 1 + src/components/common/LocaleSelector.vue | 57 ++++++ src/components/common/Navigator.vue | 9 + src/config.ts | 5 + src/i18n/en/api.json | 57 +++++- src/i18n/en/api/entity.ts | 15 -- src/i18n/en/api/index.ts | 9 - src/i18n/en/api/message.ts | 8 - src/i18n/en/api/unit.ts | 12 -- src/i18n/en/application.json | 85 +++++++-- src/i18n/en/application/button.ts | 7 - src/i18n/en/application/field.ts | 19 -- src/i18n/en/application/index.ts | 11 -- src/i18n/en/application/message.ts | 23 --- src/i18n/en/application/title.ts | 5 - src/i18n/en/chat.json | 78 ++++++++ src/i18n/en/chat/index.ts | 4 - src/i18n/en/chat/message.ts | 31 --- src/i18n/en/chat/title.ts | 9 - src/i18n/en/chatdoc.json | 108 +++++++++++ src/i18n/en/chatdoc/button.ts | 3 - src/i18n/en/chatdoc/field.ts | 13 -- src/i18n/en/chatdoc/index.ts | 7 - src/i18n/en/chatdoc/message.ts | 33 ---- src/i18n/en/chatdoc/nav.ts | 5 - src/i18n/en/chatdoc/title.ts | 5 - src/i18n/en/common.json | 162 ++++++++++++++++ src/i18n/en/common/button.ts | 34 ---- src/i18n/en/common/entity.ts | 20 -- src/i18n/en/common/index.ts | 13 -- src/i18n/en/common/message.ts | 12 -- src/i18n/en/common/nav.ts | 20 -- src/i18n/en/common/title.ts | 13 -- src/i18n/en/console.json | 24 +++ src/i18n/en/console/index.ts | 5 - src/i18n/en/console/menu.ts | 11 -- src/i18n/en/credential.json | 54 ++++++ src/i18n/en/distribution.json | 74 ++++++++ src/i18n/en/distribution/button.ts | 4 - src/i18n/en/distribution/field.ts | 12 -- src/i18n/en/distribution/index.ts | 11 -- src/i18n/en/distribution/message.ts | 13 -- src/i18n/en/distribution/title.ts | 13 -- src/i18n/en/index.ts | 27 --- src/i18n/en/midjourney.json | 228 +++++++++++++++++++++++ src/i18n/en/midjourney/button.ts | 15 -- src/i18n/en/midjourney/description.ts | 52 ------ src/i18n/en/midjourney/field.ts | 7 - src/i18n/en/midjourney/index.ts | 9 - src/i18n/en/midjourney/message.ts | 10 - src/i18n/en/midjourney/model.ts | 4 - src/i18n/en/midjourney/name.ts | 28 --- src/i18n/en/midjourney/placeholder.ts | 5 - src/i18n/en/order.json | 78 ++++++++ src/i18n/en/order/button.ts | 8 - src/i18n/en/order/field.ts | 12 -- src/i18n/en/order/index.ts | 13 -- src/i18n/en/order/message.ts | 9 - src/i18n/en/order/state.ts | 6 - src/i18n/en/order/title.ts | 7 - src/i18n/en/proxy.json | 62 ++++++ src/i18n/en/service.json | 76 ++++++++ src/i18n/en/service/button.ts | 7 - src/i18n/en/service/field.ts | 6 - src/i18n/en/service/index.ts | 13 -- src/i18n/en/service/message.ts | 12 -- src/i18n/en/service/title.ts | 5 - src/i18n/en/service/unit.ts | 12 -- src/i18n/en/setting/field.ts | 4 - src/i18n/en/setting/index.ts | 3 - src/i18n/en/usage.json | 16 ++ src/i18n/en/user.json | 14 ++ src/i18n/en/user/field.ts | 7 - src/i18n/en/user/index.ts | 5 - src/i18n/index.ts | 119 ++++++++++-- src/i18n/zh/api/entity.ts | 15 -- src/i18n/zh/api/index.ts | 9 - src/i18n/zh/api/message.ts | 8 - src/i18n/zh/api/unit.ts | 3 - src/i18n/zh/application/button.ts | 7 - src/i18n/zh/application/field.ts | 19 -- src/i18n/zh/application/index.ts | 11 -- src/i18n/zh/application/message.ts | 23 --- src/i18n/zh/application/title.ts | 5 - src/i18n/zh/chat/index.ts | 4 - src/i18n/zh/chat/message.ts | 31 --- src/i18n/zh/chat/title.ts | 9 - src/i18n/zh/chatdoc/button.ts | 3 - src/i18n/zh/chatdoc/field.ts | 13 -- src/i18n/zh/chatdoc/index.ts | 7 - src/i18n/zh/chatdoc/message.ts | 33 ---- src/i18n/zh/chatdoc/nav.ts | 5 - src/i18n/zh/chatdoc/title.ts | 5 - src/i18n/zh/common/button.ts | 34 ---- src/i18n/zh/common/entity.ts | 20 -- src/i18n/zh/common/index.ts | 13 -- src/i18n/zh/common/message.ts | 12 -- src/i18n/zh/common/nav.ts | 20 -- src/i18n/zh/common/title.ts | 13 -- src/i18n/zh/console/index.ts | 5 - src/i18n/zh/console/menu.ts | 11 -- src/i18n/zh/distribution/button.ts | 4 - src/i18n/zh/distribution/field.ts | 12 -- src/i18n/zh/distribution/index.ts | 11 -- src/i18n/zh/distribution/message.ts | 12 -- src/i18n/zh/distribution/title.ts | 13 -- src/i18n/zh/index.ts | 27 --- src/i18n/zh/midjourney/button.ts | 15 -- src/i18n/zh/midjourney/description.ts | 52 ------ src/i18n/zh/midjourney/field.ts | 7 - src/i18n/zh/midjourney/index.ts | 9 - src/i18n/zh/midjourney/message.ts | 10 - src/i18n/zh/midjourney/model.ts | 4 - src/i18n/zh/midjourney/name.ts | 28 --- src/i18n/zh/midjourney/placeholder.ts | 5 - src/i18n/zh/order/button.ts | 8 - src/i18n/zh/order/field.ts | 12 -- src/i18n/zh/order/index.ts | 13 -- src/i18n/zh/order/message.ts | 9 - src/i18n/zh/order/state.ts | 6 - src/i18n/zh/order/title.ts | 7 - src/i18n/zh/service/button.ts | 7 - src/i18n/zh/service/field.ts | 6 - src/i18n/zh/service/index.ts | 13 -- src/i18n/zh/service/message.ts | 12 -- src/i18n/zh/service/title.ts | 5 - src/i18n/zh/service/unit.ts | 12 -- src/i18n/zh/setting/field.ts | 4 - src/i18n/zh/setting/index.ts | 3 - src/i18n/zh/user/field.ts | 7 - src/i18n/zh/user/index.ts | 5 - src/router/index.ts | 8 + src/store/common/actions.ts | 6 + src/store/common/getters.ts | 5 + src/store/common/models.ts | 1 + src/store/common/mutations.ts | 5 + transmart.config.js | 29 +++ 137 files changed, 1316 insertions(+), 1407 deletions(-) create mode 100644 src/components/common/LocaleSelector.vue delete mode 100644 src/i18n/en/api/entity.ts delete mode 100644 src/i18n/en/api/index.ts delete mode 100644 src/i18n/en/api/message.ts delete mode 100644 src/i18n/en/api/unit.ts delete mode 100644 src/i18n/en/application/button.ts delete mode 100644 src/i18n/en/application/field.ts delete mode 100644 src/i18n/en/application/index.ts delete mode 100644 src/i18n/en/application/message.ts delete mode 100644 src/i18n/en/application/title.ts create mode 100644 src/i18n/en/chat.json delete mode 100644 src/i18n/en/chat/index.ts delete mode 100644 src/i18n/en/chat/message.ts delete mode 100644 src/i18n/en/chat/title.ts create mode 100644 src/i18n/en/chatdoc.json delete mode 100644 src/i18n/en/chatdoc/button.ts delete mode 100644 src/i18n/en/chatdoc/field.ts delete mode 100644 src/i18n/en/chatdoc/index.ts delete mode 100644 src/i18n/en/chatdoc/message.ts delete mode 100644 src/i18n/en/chatdoc/nav.ts delete mode 100644 src/i18n/en/chatdoc/title.ts create mode 100644 src/i18n/en/common.json delete mode 100644 src/i18n/en/common/button.ts delete mode 100644 src/i18n/en/common/entity.ts delete mode 100644 src/i18n/en/common/index.ts delete mode 100644 src/i18n/en/common/message.ts delete mode 100644 src/i18n/en/common/nav.ts delete mode 100644 src/i18n/en/common/title.ts create mode 100644 src/i18n/en/console.json delete mode 100644 src/i18n/en/console/index.ts delete mode 100644 src/i18n/en/console/menu.ts create mode 100644 src/i18n/en/credential.json create mode 100644 src/i18n/en/distribution.json delete mode 100644 src/i18n/en/distribution/button.ts delete mode 100644 src/i18n/en/distribution/field.ts delete mode 100644 src/i18n/en/distribution/index.ts delete mode 100644 src/i18n/en/distribution/message.ts delete mode 100644 src/i18n/en/distribution/title.ts delete mode 100644 src/i18n/en/index.ts create mode 100644 src/i18n/en/midjourney.json delete mode 100644 src/i18n/en/midjourney/button.ts delete mode 100644 src/i18n/en/midjourney/description.ts delete mode 100644 src/i18n/en/midjourney/field.ts delete mode 100644 src/i18n/en/midjourney/index.ts delete mode 100644 src/i18n/en/midjourney/message.ts delete mode 100644 src/i18n/en/midjourney/model.ts delete mode 100644 src/i18n/en/midjourney/name.ts delete mode 100644 src/i18n/en/midjourney/placeholder.ts create mode 100644 src/i18n/en/order.json delete mode 100644 src/i18n/en/order/button.ts delete mode 100644 src/i18n/en/order/field.ts delete mode 100644 src/i18n/en/order/index.ts delete mode 100644 src/i18n/en/order/message.ts delete mode 100644 src/i18n/en/order/state.ts delete mode 100644 src/i18n/en/order/title.ts create mode 100644 src/i18n/en/proxy.json create mode 100644 src/i18n/en/service.json delete mode 100644 src/i18n/en/service/button.ts delete mode 100644 src/i18n/en/service/field.ts delete mode 100644 src/i18n/en/service/index.ts delete mode 100644 src/i18n/en/service/message.ts delete mode 100644 src/i18n/en/service/title.ts delete mode 100644 src/i18n/en/service/unit.ts delete mode 100644 src/i18n/en/setting/field.ts delete mode 100644 src/i18n/en/setting/index.ts create mode 100644 src/i18n/en/usage.json create mode 100644 src/i18n/en/user.json delete mode 100644 src/i18n/en/user/field.ts delete mode 100644 src/i18n/en/user/index.ts delete mode 100644 src/i18n/zh/api/entity.ts delete mode 100644 src/i18n/zh/api/index.ts delete mode 100644 src/i18n/zh/api/message.ts delete mode 100644 src/i18n/zh/api/unit.ts delete mode 100644 src/i18n/zh/application/button.ts delete mode 100644 src/i18n/zh/application/field.ts delete mode 100644 src/i18n/zh/application/index.ts delete mode 100644 src/i18n/zh/application/message.ts delete mode 100644 src/i18n/zh/application/title.ts delete mode 100644 src/i18n/zh/chat/index.ts delete mode 100644 src/i18n/zh/chat/message.ts delete mode 100644 src/i18n/zh/chat/title.ts delete mode 100644 src/i18n/zh/chatdoc/button.ts delete mode 100644 src/i18n/zh/chatdoc/field.ts delete mode 100644 src/i18n/zh/chatdoc/index.ts delete mode 100644 src/i18n/zh/chatdoc/message.ts delete mode 100644 src/i18n/zh/chatdoc/nav.ts delete mode 100644 src/i18n/zh/chatdoc/title.ts delete mode 100644 src/i18n/zh/common/button.ts delete mode 100644 src/i18n/zh/common/entity.ts delete mode 100644 src/i18n/zh/common/index.ts delete mode 100644 src/i18n/zh/common/message.ts delete mode 100644 src/i18n/zh/common/nav.ts delete mode 100644 src/i18n/zh/common/title.ts delete mode 100644 src/i18n/zh/console/index.ts delete mode 100644 src/i18n/zh/console/menu.ts delete mode 100644 src/i18n/zh/distribution/button.ts delete mode 100644 src/i18n/zh/distribution/field.ts delete mode 100644 src/i18n/zh/distribution/index.ts delete mode 100644 src/i18n/zh/distribution/message.ts delete mode 100644 src/i18n/zh/distribution/title.ts delete mode 100644 src/i18n/zh/index.ts delete mode 100644 src/i18n/zh/midjourney/button.ts delete mode 100644 src/i18n/zh/midjourney/description.ts delete mode 100644 src/i18n/zh/midjourney/field.ts delete mode 100644 src/i18n/zh/midjourney/index.ts delete mode 100644 src/i18n/zh/midjourney/message.ts delete mode 100644 src/i18n/zh/midjourney/model.ts delete mode 100644 src/i18n/zh/midjourney/name.ts delete mode 100644 src/i18n/zh/midjourney/placeholder.ts delete mode 100644 src/i18n/zh/order/button.ts delete mode 100644 src/i18n/zh/order/field.ts delete mode 100644 src/i18n/zh/order/index.ts delete mode 100644 src/i18n/zh/order/message.ts delete mode 100644 src/i18n/zh/order/state.ts delete mode 100644 src/i18n/zh/order/title.ts delete mode 100644 src/i18n/zh/service/button.ts delete mode 100644 src/i18n/zh/service/field.ts delete mode 100644 src/i18n/zh/service/index.ts delete mode 100644 src/i18n/zh/service/message.ts delete mode 100644 src/i18n/zh/service/title.ts delete mode 100644 src/i18n/zh/service/unit.ts delete mode 100644 src/i18n/zh/setting/field.ts delete mode 100644 src/i18n/zh/setting/index.ts delete mode 100644 src/i18n/zh/user/field.ts delete mode 100644 src/i18n/zh/user/index.ts create mode 100644 transmart.config.js diff --git a/package.json b/package.json index 5447066a..47a9760b 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ }, "devDependencies": { "@rollup/plugin-replace": "^3.0.0", + "@transmart/cli": "^0.3.1", "@types/lodash": "^4.14.172", "@types/markdown-it": "^12.2.3", "@types/node": "^16.7.4", diff --git a/src/components/common/LocaleSelector.vue b/src/components/common/LocaleSelector.vue new file mode 100644 index 00000000..e6e44e95 --- /dev/null +++ b/src/components/common/LocaleSelector.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/components/common/Navigator.vue b/src/components/common/Navigator.vue index b2d6ed35..4b0a34ed 100644 --- a/src/components/common/Navigator.vue +++ b/src/components/common/Navigator.vue @@ -46,6 +46,13 @@
+