From 1a460646cd00137d513b8d010bf275ab5615c5cc Mon Sep 17 00:00:00 2001
From: insistence <3055204202@qq.com>
Date: Fri, 30 Oct 2026 19:55:27 +0800
Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=E6=8E=A5=E5=85=A5=E5=90=8E?=
=?UTF-8?q?=E7=AB=AF=E4=B8=8E=E5=85=AD=E7=AB=AF=E5=9B=BD=E9=99=85=E5=8C=96?=
=?UTF-8?q?=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/ci-backend.yml | 10 +
.github/workflows/ci-frontend.yml | 4 +
.gitignore | 3 +
ruoyi-fastapi-backend/.dockerignore | 2 +
ruoyi-fastapi-backend/.env.dev | 4 +
ruoyi-fastapi-backend/.env.dockermy | 4 +
ruoyi-fastapi-backend/.env.dockerpg | 4 +
ruoyi-fastapi-backend/.env.prod | 4 +
.../.x18n/tooling/package-lock.json | 1417 +++++++++++
.../.x18n/tooling/package.json | 15 +
.../.x18n/tooling/tests/usage.test.mjs | 81 +
ruoyi-fastapi-backend/Dockerfile.my | 2 +
ruoyi-fastapi-backend/Dockerfile.pg | 2 +
.../plugin/scaffold/assets/web/dev.html.tmpl | 1 +
.../plugin/scaffold/assets/web/dev.js.tmpl | 12 +-
.../plugin/scaffold/assets/web/i18n.js.tmpl | 107 +
.../scaffold/assets/web/index.html.tmpl | 10 +-
.../plugin/scaffold/assets/web/main.js.tmpl | 73 +-
.../scaffold/assets/web/package.json.tmpl | 5 +-
.../scaffold/assets/web/x18n.config.mjs.tmpl | 11 +
.../cli/runtime/plugin/scaffold/builder.py | 2 +
.../cli/runtime/plugin/scaffold/frontend.py | 75 +-
.../runtime/plugin/scaffold/frontend_react.py | 58 +-
.../runtime/plugin/scaffold/frontend_vue2.py | 80 +-
.../cli/runtime/plugin/scaffold/locales.py | 199 ++
.../cli/runtime/plugin/scaffold/v2.py | 12 +-
.../common/annotation/cache_annotation.py | 4 +
.../common/aspect/interface_auth.py | 4 +-
ruoyi-fastapi-backend/common/context.py | 63 +-
ruoyi-fastapi-backend/common/vo.py | 4 +
ruoyi-fastapi-backend/config/env.py | 17 +
ruoyi-fastapi-backend/exceptions/exception.py | 66 +-
ruoyi-fastapi-backend/exceptions/handle.py | 54 +-
ruoyi-fastapi-backend/i18n/__init__.py | 3 +
.../i18n/catalogs/en-US/LC_MESSAGES/core.po | 1885 ++++++++++++++
.../i18n/catalogs/zh-CN/LC_MESSAGES/core.po | 1869 ++++++++++++++
ruoyi-fastapi-backend/i18n/locale.py | 77 +
ruoyi-fastapi-backend/i18n/message.py | 29 +
ruoyi-fastapi-backend/i18n/registry.py | 109 +
ruoyi-fastapi-backend/i18n/translation.py | 81 +
ruoyi-fastapi-backend/i18n/translator.py | 130 +
.../middlewares/context_middleware.py | 3 +
.../middlewares/cors_middleware.py | 2 +
.../middlewares/demo_mode_middleware.py | 2 +-
ruoyi-fastapi-backend/middlewares/handle.py | 3 +
.../middlewares/locale_middleware.py | 49 +
.../transport_crypto_middleware.py | 12 +-
.../controller/cache_controller.py | 18 +-
.../controller/config_controller.py | 20 +-
.../controller/dept_controller.py | 16 +-
.../controller/dict_controller.py | 40 +-
.../controller/file_controller.py | 58 +-
.../module_admin/controller/job_controller.py | 51 +-
.../module_admin/controller/log_controller.py | 28 +-
.../controller/login_controller.py | 13 +-
.../controller/menu_controller.py | 16 +-
.../controller/notice_controller.py | 22 +-
.../controller/online_controller.py | 6 +-
.../controller/post_controller.py | 12 +-
.../controller/role_controller.py | 40 +-
.../controller/user_controller.py | 67 +-
.../module_admin/dao/dict_dao.py | 15 +
.../module_admin/dao/menu_dao.py | 7 +
.../module_admin/entity/do/dict_do.py | 4 +-
.../module_admin/entity/do/menu_do.py | 3 +-
.../module_admin/entity/do/user_do.py | 1 +
.../module_admin/entity/vo/config_vo.py | 30 +-
.../module_admin/entity/vo/dept_vo.py | 32 +-
.../module_admin/entity/vo/dict_vo.py | 102 +-
.../module_admin/entity/vo/job_vo.py | 24 +-
.../module_admin/entity/vo/login_vo.py | 3 +-
.../module_admin/entity/vo/menu_vo.py | 59 +-
.../module_admin/entity/vo/notice_vo.py | 17 +-
.../module_admin/entity/vo/post_vo.py | 21 +-
.../module_admin/entity/vo/role_vo.py | 21 +-
.../module_admin/entity/vo/user_vo.py | 78 +-
.../module_admin/service/cache_service.py | 16 +-
.../module_admin/service/common_service.py | 35 +-
.../module_admin/service/config_service.py | 55 +-
.../module_admin/service/dept_service.py | 66 +-
.../module_admin/service/dict_service.py | 123 +-
.../service/file_access_service.py | 40 +-
.../service/file_business_service.py | 70 +-
.../module_admin/service/file_service.py | 176 +-
.../module_admin/service/job_log_service.py | 58 +-
.../module_admin/service/job_service.py | 94 +-
.../module_admin/service/log_service.py | 86 +-
.../module_admin/service/login_service.py | 39 +-
.../module_admin/service/menu_service.py | 81 +-
.../module_admin/service/notice_service.py | 26 +-
.../module_admin/service/online_service.py | 4 +-
.../module_admin/service/post_service.py | 65 +-
.../module_admin/service/role_service.py | 75 +-
.../module_admin/service/server_service.py | 7 +-
.../module_admin/service/user_service.py | 223 +-
.../controller/gen_controller.py | 26 +-
.../module_generator/dao/gen_dao.py | 5 +-
.../module_generator/entity/vo/gen_vo.py | 42 +-
.../module_generator/service/gen_service.py | 177 +-
.../templates/python/service.py.jinja2 | 55 +-
.../templates/python/vo.py.jinja2 | 30 +-
.../templates/vue/index-tree.vue.jinja2 | 134 +-
.../templates/vue/index.vue.jinja2 | 164 +-
.../templates/vue/v3/index-tree.vue.jinja2 | 128 +-
.../templates/vue/v3/index.vue.jinja2 | 158 +-
.../templates/vue/v3/view.vue.jinja2 | 7 +-
.../templates/vue/view.vue.jinja2 | 6 +-
.../controller/oauth_client_controller.py | 12 +-
.../controller/oauth_resource_controller.py | 4 +-
.../controller/oauth_session_controller.py | 10 +-
.../controller/oidc_key_controller.py | 8 +-
.../service/identity_service.py | 54 +-
.../module_identity/service/key_service.py | 2 +-
.../oauth_session_management_service.py | 10 +-
.../controller/plugin_controller.py | 81 +-
.../controller/plugin_metrics_controller.py | 2 +-
.../controller/plugin_release_controller.py | 2 +-
.../ai/controller/ai_chat_controller.py | 21 +-
.../ai/controller/ai_model_controller.py | 16 +-
.../plugins/ai/entity/vo/ai_model_vo.py | 19 +-
ruoyi-fastapi-backend/plugins/ai/plugin.yaml | 19 +
.../plugins/ai/service/ai_chat_service.py | 77 +-
.../plugins/ai/service/ai_model_service.py | 14 +-
.../plugins/core/deployment/catalog.py | 12 +-
.../plugins/core/deployment/enablement.py | 5 +-
.../plugins/core/deployment/service.py | 28 +-
.../plugins/core/lifecycle/precheck.py | 25 +-
.../plugins/core/management/dao/dao.py | 6 +
.../plugins/core/management/service/menus.py | 2 +
.../core/management/service/service.py | 43 +-
.../plugins/core/manifest/schema.py | 39 +
.../plugins/core/runtime/health.py | 13 +-
.../plugins/core/runtime/result.py | 7 +-
.../plugins/core/runtime/route_guard.py | 2 +-
.../plugins/core/runtime/service/batch.py | 23 +-
.../plugins/core/runtime/service/config.py | 11 +-
.../plugins/core/runtime/service/context.py | 9 +-
.../core/runtime/service/dependencies.py | 13 +-
.../core/runtime/service/lifecycle/enable.py | 19 +-
.../core/runtime/service/lifecycle/install.py | 15 +-
.../core/runtime/service/lifecycle/purge.py | 17 +-
.../core/runtime/service/lifecycle/upgrade.py | 11 +-
.../core/runtime/service/lifecycle_lock.py | 11 +-
.../plugins/core/runtime/service/migration.py | 35 +-
.../plugins/core/runtime/service/precheck.py | 10 +-
.../plugins/core/runtime/service/query.py | 42 +-
.../plugins/core/runtime/service/tools.py | 5 +-
.../core/runtime/support/batch_report.py | 18 +-
.../core/runtime/support/payload/audit.py | 8 +-
.../core/runtime/support/payload/base.py | 17 +-
.../core/runtime/support/payload/common.py | 8 +-
.../core/runtime/support/payload/config.py | 5 +-
.../runtime/support/payload/dependencies.py | 7 +-
.../runtime/support/payload/documentation.py | 3 +-
.../core/runtime/support/payload/enable.py | 9 +-
.../core/runtime/support/payload/lifecycle.py | 15 +-
.../core/runtime/support/payload/plan.py | 9 +-
.../core/runtime/support/payload/purge.py | 7 +-
.../core/runtime/support/payload/runtime.py | 23 +-
.../plugins/core/validation/dependencies.py | 17 +-
.../plugins/core/validation/manifest.py | 138 +-
.../plugins/core/validation/menus.py | 19 +-
.../plugins/core/validation/plugin_deps.py | 25 +-
.../plugins/core/validation/structure.py | 31 +-
ruoyi-fastapi-backend/requirements-pg.txt | 1 +
ruoyi-fastapi-backend/requirements-test.txt | 2 +-
ruoyi-fastapi-backend/requirements.txt | 1 +
ruoyi-fastapi-backend/scripts/compile_i18n.py | 35 +
ruoyi-fastapi-backend/scripts/migrate_i18n.py | 170 ++
ruoyi-fastapi-backend/server.py | 2 +
ruoyi-fastapi-backend/sql/i18n-seeds.json | 2204 +++++++++++++++++
.../sql/ruoyi-fastapi-pg.sql | 561 +++--
ruoyi-fastapi-backend/sql/ruoyi-fastapi.sql | 558 +++--
.../runtime/plugin/test_scaffold_locales.py | 59 +
.../tests/config/test_i18n_settings.py | 104 +
.../tests/i18n/test_excel_i18n.py | 121 +
.../tests/i18n/test_locale.py | 294 +++
.../tests/i18n/test_plugin_messages.py | 55 +
.../tests/i18n/test_translation_migration.py | 70 +
.../tests/i18n/test_translations.py | 194 ++
.../controller/test_dept_controller.py | 9 +-
.../controller/test_user_controller.py | 9 +-
.../module_generator/test_generated_i18n.py | 362 +++
.../test_generated_time_contract.py | 8 +-
.../module_generator/test_react_templates.py | 8 +-
.../core/management/test_menu_installer.py | 29 +
.../core/management/test_plugin_state.py | 1 +
.../plugins/sample_plugins/test_ai_i18n.py | 50 +
.../tests/sql/test_plugin_schema.py | 7 +-
.../tests/utils/test_template_util.py | 5 +-
ruoyi-fastapi-backend/utils/excel_util.py | 53 +-
ruoyi-fastapi-backend/utils/exception_util.py | 1 +
ruoyi-fastapi-backend/utils/file_util.py | 6 +-
ruoyi-fastapi-backend/utils/gen_i18n_util.py | 361 +++
ruoyi-fastapi-backend/utils/jwt_util.py | 4 +-
ruoyi-fastapi-backend/utils/response_util.py | 130 +-
ruoyi-fastapi-backend/utils/template_util.py | 18 +-
ruoyi-fastapi-backend/utils/time_util.py | 9 +-
.../utils/user_import_util.py | 83 +
ruoyi-fastapi-backend/x18n.config.yml | 19 +
.../react/mobile/package.json | 7 +-
.../react/mobile/pnpm-lock.yaml | 736 +++++-
.../react/mobile/scripts/check-i18n.mjs | 18 +
.../react/mobile/src/app.jsx | 15 +-
.../react/mobile/src/app.rn.jsx | 25 +-
.../src/components/LanguageSelect/index.jsx | 43 +
.../react/mobile/src/i18n/adapter.js | 10 +
.../react/mobile/src/i18n/error.js | 9 +
.../react/mobile/src/i18n/help.js | 32 +
.../react/mobile/src/i18n/index.js | 32 +
.../react/mobile/src/i18n/locale-meta.json | 24 +
.../mobile/src/i18n/locales/en-US/common.json | 33 +
.../mobile/src/i18n/locales/en-US/mobile.json | 192 ++
.../mobile/src/i18n/locales/zh-CN/common.json | 33 +
.../mobile/src/i18n/locales/zh-CN/mobile.json | 192 ++
.../react/mobile/src/i18n/navigation.js | 45 +
.../react/mobile/src/i18n/preference.js | 17 +
.../react/mobile/src/i18n/registry.js | 11 +
.../react/mobile/src/i18n/runtime.mjs | 216 ++
.../src/pages/common/agreement/index.jsx | 44 +-
.../mobile/src/pages/common/privacy/index.jsx | 63 +-
.../src/pages/common/textview/index.jsx | 19 +-
.../mobile/src/pages/common/webview/index.jsx | 6 +-
.../react/mobile/src/pages/index.jsx | 46 +-
.../react/mobile/src/pages/login.jsx | 49 +-
.../mobile/src/pages/mine/about/index.jsx | 14 +-
.../mobile/src/pages/mine/avatar/index.jsx | 25 +-
.../mobile/src/pages/mine/help/index.jsx | 50 +-
.../react/mobile/src/pages/mine/index.jsx | 24 +-
.../react/mobile/src/pages/mine/info/edit.jsx | 43 +-
.../mobile/src/pages/mine/info/index.jsx | 28 +-
.../react/mobile/src/pages/mine/pwd/index.jsx | 31 +-
.../mobile/src/pages/mine/setting/index.jsx | 26 +-
.../src/pages/mine/setting/timezone.jsx | 54 +-
.../react/mobile/src/pages/register.jsx | 57 +-
.../react/mobile/src/pages/work/index.jsx | 40 +-
.../react/mobile/src/plugins/modal.js | 9 +-
.../react/mobile/src/store/modules/user.js | 3 +
.../react/mobile/src/utils/common.js | 7 +-
.../react/mobile/src/utils/errorCode.js | 20 +-
.../react/mobile/src/utils/request.js | 22 +-
.../react/mobile/src/utils/transportCrypto.js | 3 +
.../react/mobile/src/utils/upload.js | 10 +-
.../react/mobile/tests/i18n/runtime.test.mjs | 138 ++
.../react/mobile/tests/i18n/x18n.test.mjs | 70 +
.../react/mobile/x18n.config.mjs | 29 +
ruoyi-fastapi-frontend/react/web/package.json | 8 +-
.../react/web/plugins/ai/locales/en-US.json | 97 +
.../react/web/plugins/ai/locales/zh-CN.json | 97 +
.../ai/views/chat/components/AiMessage.jsx | 10 +-
.../react/web/plugins/ai/views/chat/index.jsx | 130 +-
.../react/web/plugins/ai/views/chat/stream.js | 5 +-
.../web/plugins/ai/views/model/index.jsx | 106 +-
.../react/web/pnpm-lock.yaml | 872 ++++++-
.../react/web/scripts/check-i18n.mjs | 21 +
.../react/web/scripts/x18n-project.mjs | 26 +
ruoyi-fastapi-frontend/react/web/src/App.jsx | 6 +-
.../web/src/components/Breadcrumb/index.jsx | 19 +-
.../BusinessDateTimePicker/index.jsx | 24 +-
.../components/BusinessFileUpload/index.jsx | 30 +-
.../components/BusinessFileUpload/model.js | 13 +-
.../react/web/src/components/Crontab/day.jsx | 6 +-
.../web/src/components/Crontab/field.jsx | 138 +-
.../react/web/src/components/Crontab/hour.jsx | 6 +-
.../web/src/components/Crontab/index.jsx | 40 +-
.../react/web/src/components/Crontab/min.jsx | 6 +-
.../web/src/components/Crontab/month.jsx | 6 +-
.../web/src/components/Crontab/result.jsx | 19 +-
.../web/src/components/Crontab/second.jsx | 6 +-
.../react/web/src/components/Crontab/week.jsx | 6 +-
.../react/web/src/components/Crontab/year.jsx | 6 +-
.../web/src/components/DetailPanel/index.jsx | 16 +-
.../react/web/src/components/EChart/index.jsx | 6 +-
.../react/web/src/components/Editor/index.jsx | 14 +-
.../components/ExcelImportDialog/index.jsx | 22 +-
.../web/src/components/FileUpload/index.jsx | 30 +-
.../web/src/components/FormLabel/index.jsx | 6 +-
.../components/GeneratorControls/index.jsx | 26 +-
.../web/src/components/Hamburger/index.jsx | 6 +-
.../web/src/components/HeaderSearch/index.jsx | 37 +-
.../web/src/components/IconSelect/index.jsx | 16 +-
.../web/src/components/JsonEditor/index.jsx | 35 +-
.../src/components/JsonEditor/validation.js | 6 +-
.../src/components/LanguageSelect/index.jsx | 38 +
.../src/components/LoadingProgress/index.jsx | 8 +-
.../components/OAuthWorkspace/AccessMap.jsx | 30 +-
.../components/OAuthWorkspace/EntityCell.jsx | 6 +-
.../components/OAuthWorkspace/FieldLabel.jsx | 6 +-
.../components/OAuthWorkspace/PageFrame.jsx | 8 +-
.../OAuthWorkspace/StringListInput.jsx | 8 +-
.../web/src/components/Pagination/index.jsx | 18 +-
.../web/src/components/PluginFrame/index.jsx | 40 +-
.../web/src/components/RightToolbar/index.jsx | 22 +-
.../web/src/components/RuoYi/Doc/index.jsx | 8 +-
.../web/src/components/RuoYi/Git/index.jsx | 8 +-
.../web/src/components/Screenfull/index.jsx | 10 +-
.../web/src/components/SizeSelect/index.jsx | 12 +-
.../src/components/SystemLoading/index.jsx | 8 +-
.../react/web/src/components/Table/index.jsx | 6 +-
.../components/TranslationFields/index.jsx | 28 +
.../web/src/components/TreePanel/index.jsx | 24 +-
.../react/web/src/components/iFrame/index.jsx | 6 +-
.../web/src/directive/common/copyText.js | 3 +-
.../react/web/src/i18n/adapter.js | 10 +
.../react/web/src/i18n/entities.mjs | 18 +
.../react/web/src/i18n/form.js | 23 +
.../react/web/src/i18n/generated.mjs | 9 +
.../react/web/src/i18n/index.js | 49 +
.../react/web/src/i18n/locale-meta.json | 24 +
.../web/src/i18n/locales/en-US/auth.json | 46 +
.../src/i18n/locales/en-US/authCenter.json | 151 ++
.../web/src/i18n/locales/en-US/common.json | 452 ++++
.../web/src/i18n/locales/en-US/file.json | 77 +
.../web/src/i18n/locales/en-US/layout.json | 114 +
.../web/src/i18n/locales/en-US/monitor.json | 437 ++++
.../src/i18n/locales/en-US/pluginAdmin.json | 123 +
.../web/src/i18n/locales/en-US/system.json | 1177 +++++++++
.../web/src/i18n/locales/en-US/tool.json | 318 +++
.../web/src/i18n/locales/zh-CN/auth.json | 46 +
.../src/i18n/locales/zh-CN/authCenter.json | 149 ++
.../web/src/i18n/locales/zh-CN/common.json | 452 ++++
.../web/src/i18n/locales/zh-CN/file.json | 77 +
.../web/src/i18n/locales/zh-CN/layout.json | 114 +
.../web/src/i18n/locales/zh-CN/monitor.json | 437 ++++
.../src/i18n/locales/zh-CN/pluginAdmin.json | 122 +
.../web/src/i18n/locales/zh-CN/system.json | 1177 +++++++++
.../web/src/i18n/locales/zh-CN/tool.json | 318 +++
.../react/web/src/i18n/message.mjs | 10 +
.../react/web/src/i18n/preference.js | 17 +
.../react/web/src/i18n/registry.js | 49 +
.../react/web/src/i18n/runtime.mjs | 216 ++
.../components/HeaderNotice/DetailView.jsx | 22 +-
.../layout/components/HeaderNotice/index.jsx | 18 +-
.../src/layout/components/InnerLink/index.jsx | 7 +-
.../web/src/layout/components/Navbar.jsx | 24 +-
.../src/layout/components/Settings/index.jsx | 70 +-
.../layout/components/Sidebar/Scrollbar.jsx | 6 +-
.../src/layout/components/Sidebar/index.jsx | 15 +-
.../src/layout/components/TagsView/index.jsx | 71 +-
.../src/layout/components/TopNav/index.jsx | 16 +-
.../react/web/src/layout/index.jsx | 28 +-
ruoyi-fastapi-frontend/react/web/src/main.jsx | 15 +-
.../react/web/src/plugins/download.js | 67 +-
.../react/web/src/plugins/modal.jsx | 15 +-
.../react/web/src/plugins/tab.js | 4 +-
.../react/web/src/router/index.jsx | 22 +-
.../react/web/src/store/modules/tagsView.js | 40 +-
.../react/web/src/store/modules/user.js | 7 +-
.../react/web/src/utils/dict.js | 13 +-
.../react/web/src/utils/errorCode.js | 21 +-
.../react/web/src/utils/generator/config.js | 173 +-
.../react/web/src/utils/generator/controls.js | 5 +-
.../react/web/src/utils/generator/js.js | 32 +-
.../react/web/src/utils/generator/model.js | 8 +-
.../react/web/src/utils/generator/render.jsx | 10 +-
.../react/web/src/utils/index.js | 28 +-
.../react/web/src/utils/job.js | 91 +-
.../react/web/src/utils/locale.js | 8 +-
.../react/web/src/utils/oauthUri.js | 23 +-
.../react/web/src/utils/passwordRule.js | 44 +-
.../react/web/src/utils/pluginBridge.d.ts | 5 +
.../react/web/src/utils/pluginBridge.js | 335 ++-
.../web/src/utils/pluginPlanFormatter.js | 38 +-
.../web/src/utils/pluginReleaseFormatter.js | 76 +-
.../react/web/src/utils/pluginSse.js | 30 +-
.../react/web/src/utils/request.js | 34 +-
.../react/web/src/utils/time.js | 58 +-
.../react/web/src/utils/transportCrypto.js | 66 +-
.../src/views/auth-center/AuthCenterShell.jsx | 40 +-
.../src/views/auth-center/changePassword.jsx | 75 +-
.../web/src/views/auth-center/consent.jsx | 79 +-
.../react/web/src/views/auth-center/error.jsx | 36 +-
.../react/web/src/views/auth-center/login.jsx | 62 +-
.../src/views/auth-center/useInteraction.js | 13 +-
.../react/web/src/views/dashboard/data.js | 157 +-
.../views/dashboard/editable-link-group.jsx | 22 +-
.../react/web/src/views/dashboard/index.jsx | 54 +-
.../react/web/src/views/error/401.jsx | 16 +-
.../react/web/src/views/error/404.jsx | 14 +-
.../react/web/src/views/lock.jsx | 37 +-
.../react/web/src/views/login.jsx | 34 +-
.../web/src/views/monitor/cache/index.jsx | 49 +-
.../web/src/views/monitor/cache/list.jsx | 50 +-
.../web/src/views/monitor/druid/index.jsx | 6 +-
.../web/src/views/monitor/job/detail.jsx | 155 +-
.../react/web/src/views/monitor/job/index.jsx | 165 +-
.../react/web/src/views/monitor/job/log.jsx | 62 +-
.../web/src/views/monitor/job/runtime.jsx | 104 +-
.../src/views/monitor/logininfor/index.jsx | 64 +-
.../src/views/monitor/oauthAudit/formatter.js | 313 ++-
.../src/views/monitor/oauthAudit/index.jsx | 132 +-
.../web/src/views/monitor/online/index.jsx | 46 +-
.../web/src/views/monitor/operlog/detail.jsx | 45 +-
.../web/src/views/monitor/operlog/index.jsx | 70 +-
.../web/src/views/monitor/server/index.jsx | 68 +-
.../views/monitor/transportCrypto/index.jsx | 209 +-
.../react/web/src/views/register.jsx | 47 +-
.../web/src/views/system/config/index.jsx | 92 +-
.../react/web/src/views/system/dept/index.jsx | 84 +-
.../react/web/src/views/system/dict/data.jsx | 146 +-
.../web/src/views/system/dict/detail.jsx | 30 +-
.../react/web/src/views/system/dict/index.jsx | 105 +-
.../system/file/components/FileAclDrawer.jsx | 107 +-
.../file/components/FileAuditDrawer.jsx | 154 +-
.../file/components/FileDetailDialog.jsx | 68 +-
.../file/components/FileReconcileDrawer.jsx | 147 +-
.../file/components/FileReferenceDrawer.jsx | 31 +-
.../components/FileRetentionPolicyDrawer.jsx | 72 +-
.../FileRetentionReminderDrawer.jsx | 127 +-
.../system/file/components/FileSearchForm.jsx | 60 +-
.../system/file/components/FileStatistics.jsx | 49 +-
.../system/file/components/FileTable.jsx | 78 +-
.../file/components/FileTransferDialog.jsx | 45 +-
.../system/file/components/fileFormatters.js | 125 +-
.../file/components/reconcileFormatters.js | 153 +-
.../react/web/src/views/system/file/index.jsx | 43 +-
.../react/web/src/views/system/menu/index.jsx | 180 +-
.../web/src/views/system/notice/ReadUsers.jsx | 43 +-
.../web/src/views/system/notice/index.jsx | 68 +-
.../web/src/views/system/oauth/client/form.js | 15 +-
.../src/views/system/oauth/client/index.jsx | 269 +-
.../src/views/system/oauth/client/secret.jsx | 26 +-
.../system/oauth/grant/AccessPolicyDrawer.jsx | 110 +-
.../src/views/system/oauth/grant/index.jsx | 224 +-
.../src/views/system/oauth/key/formatter.js | 53 +-
.../web/src/views/system/oauth/key/index.jsx | 173 +-
.../src/views/system/oauth/resource/index.jsx | 170 +-
.../src/views/system/oauth/scope/index.jsx | 187 +-
.../src/views/system/oauth/session/index.jsx | 151 +-
.../plugin/components/PluginActionDialog.jsx | 101 +-
.../plugin/components/PluginConfigDialog.jsx | 54 +-
.../plugin/components/PluginConfigStatus.jsx | 78 +-
.../components/PluginDependencyDialog.jsx | 127 +-
.../plugin/components/PluginDetailDialog.jsx | 317 ++-
.../components/PluginDiagnosticDialog.jsx | 82 +-
.../components/PluginOperationLogDrawer.jsx | 235 +-
.../plugin/components/PluginPlanDialog.jsx | 126 +-
.../components/PluginRuntimeMetrics.jsx | 82 +-
.../web/src/views/system/plugin/formatter.js | 138 +-
.../web/src/views/system/plugin/index.jsx | 172 +-
.../react/web/src/views/system/post/index.jsx | 78 +-
.../web/src/views/system/role/authUser.jsx | 46 +-
.../react/web/src/views/system/role/index.jsx | 153 +-
.../web/src/views/system/role/selectUser.jsx | 36 +-
.../web/src/views/system/user/authRole.jsx | 28 +-
.../react/web/src/views/system/user/index.jsx | 144 +-
.../src/views/system/user/profile/index.jsx | 26 +-
.../views/system/user/profile/resetPwd.jsx | 33 +-
.../system/user/profile/timezoneSettings.jsx | 42 +-
.../views/system/user/profile/userAvatar.jsx | 33 +-
.../views/system/user/profile/userInfo.jsx | 34 +-
.../react/web/src/views/system/user/view.jsx | 48 +-
.../src/views/tool/build/CodeTypeDialog.jsx | 24 +-
.../src/views/tool/build/DraggableItem.jsx | 16 +-
.../web/src/views/tool/build/IconsDialog.jsx | 8 +-
.../web/src/views/tool/build/RightPanel.jsx | 317 +--
.../src/views/tool/build/TreeNodeDialog.jsx | 30 +-
.../react/web/src/views/tool/build/index.jsx | 67 +-
.../web/src/views/tool/gen/CodePreview.jsx | 12 +-
.../web/src/views/tool/gen/basicInfoForm.jsx | 18 +-
.../web/src/views/tool/gen/createTable.jsx | 24 +-
.../web/src/views/tool/gen/editTable.jsx | 76 +-
.../web/src/views/tool/gen/genInfoForm.jsx | 140 +-
.../web/src/views/tool/gen/importTable.jsx | 36 +-
.../react/web/src/views/tool/gen/index.jsx | 75 +-
.../web/src/views/tool/swagger/index.jsx | 6 +-
.../react/web/tests/i18n/entities.test.mjs | 83 +
.../web/tests/i18n/project-tooling.test.mjs | 77 +
.../react/web/tests/i18n/runtime.test.mjs | 138 ++
.../react/web/tests/i18n/x18n.test.mjs | 70 +
.../react/web/tests/plugins/pluginSse.test.js | 32 +
.../react/web/tests/react/i18n.test.jsx | 178 ++
.../react/web/x18n.config.mjs | 44 +
.../vue2/mobile/package.json | 6 +-
.../vue2/mobile/pnpm-lock.yaml | 586 +++++
.../vue2/mobile/scripts/check-i18n.mjs | 18 +
.../vue2/mobile/src/App.vue | 2 +
.../src/components/LanguageSelect/index.vue | 53 +
.../vue2/mobile/src/i18n/adapter.js | 21 +
.../vue2/mobile/src/i18n/index.js | 28 +
.../vue2/mobile/src/i18n/locale-meta.json | 24 +
.../mobile/src/i18n/locales/en-US/auth.json | 26 +
.../mobile/src/i18n/locales/en-US/common.json | 45 +
.../mobile/src/i18n/locales/en-US/file.json | 6 +
.../mobile/src/i18n/locales/en-US/mobile.json | 154 ++
.../src/i18n/locales/en-US/monitor.json | 5 +
.../mobile/src/i18n/locales/en-US/system.json | 38 +
.../mobile/src/i18n/locales/zh-CN/auth.json | 26 +
.../mobile/src/i18n/locales/zh-CN/common.json | 45 +
.../mobile/src/i18n/locales/zh-CN/file.json | 6 +
.../mobile/src/i18n/locales/zh-CN/mobile.json | 154 ++
.../src/i18n/locales/zh-CN/monitor.json | 5 +
.../mobile/src/i18n/locales/zh-CN/system.json | 38 +
.../vue2/mobile/src/i18n/navigation.js | 43 +
.../vue2/mobile/src/i18n/preference.js | 17 +
.../vue2/mobile/src/i18n/registry.js | 11 +
.../vue2/mobile/src/i18n/runtime.mjs | 216 ++
.../vue2/mobile/src/main.ts | 9 +
.../src/pages/common/agreement/index.vue | 52 +-
.../mobile/src/pages/common/privacy/index.vue | 73 +-
.../vue2/mobile/src/pages/index.vue | 71 +-
.../vue2/mobile/src/pages/login.vue | 34 +-
.../mobile/src/pages/mine/about/index.vue | 10 +-
.../mobile/src/pages/mine/avatar/index.vue | 10 +-
.../vue2/mobile/src/pages/mine/help/index.vue | 42 +-
.../vue2/mobile/src/pages/mine/index.vue | 26 +-
.../vue2/mobile/src/pages/mine/info/edit.vue | 52 +-
.../vue2/mobile/src/pages/mine/info/index.vue | 20 +-
.../vue2/mobile/src/pages/mine/pwd/index.vue | 34 +-
.../mobile/src/pages/mine/setting/index.vue | 19 +-
.../src/pages/mine/setting/timezone.vue | 46 +-
.../vue2/mobile/src/pages/register.vue | 36 +-
.../vue2/mobile/src/pages/work/index.vue | 46 +-
.../vue2/mobile/src/plugins/modal.js | 10 +-
.../vue2/mobile/src/store/modules/user.js | 3 +
.../vue2/mobile/src/utils/common.js | 7 +-
.../vue2/mobile/src/utils/errorCode.js | 17 +-
.../vue2/mobile/src/utils/request.js | 9 +-
.../vue2/mobile/src/utils/session.js | 3 +-
.../vue2/mobile/src/utils/transportCrypto.js | 3 +
.../vue2/mobile/src/utils/upload.js | 16 +-
.../mobile/tests/i18n/navigation.test.mjs | 57 +
.../vue2/mobile/tests/i18n/runtime.test.mjs | 138 ++
.../vue2/mobile/tests/i18n/x18n.test.mjs | 70 +
.../vue2/mobile/x18n.config.mjs | 29 +
ruoyi-fastapi-frontend/vue2/web/package.json | 7 +-
.../vue2/web/plugins/ai/locales/en-US.json | 121 +
.../vue2/web/plugins/ai/locales/zh-CN.json | 121 +
.../ai/views/chat/components/AiMessage.vue | 4 +-
.../vue2/web/plugins/ai/views/chat/index.vue | 115 +-
.../vue2/web/plugins/ai/views/model/index.vue | 132 +-
.../vue2/web/pnpm-lock.yaml | 622 +++++
.../vue2/web/scripts/check-i18n.mjs | 18 +
.../vue2/web/scripts/x18n-project.mjs | 26 +
ruoyi-fastapi-frontend/vue2/web/src/App.vue | 24 +-
.../vue2/web/src/api/system/dict/data.js | 5 +-
.../vue2/web/src/api/system/dict/type.js | 5 +-
.../vue2/web/src/api/system/menu.js | 5 +-
.../web/src/components/Breadcrumb/index.vue | 13 +-
.../BusinessDateTimePicker/index.vue | 12 +-
.../components/BusinessFileUpload/index.vue | 47 +-
.../vue2/web/src/components/Crontab/day.vue | 29 +-
.../vue2/web/src/components/Crontab/hour.vue | 21 +-
.../vue2/web/src/components/Crontab/index.vue | 37 +-
.../vue2/web/src/components/Crontab/min.vue | 21 +-
.../vue2/web/src/components/Crontab/month.vue | 21 +-
.../web/src/components/Crontab/result.vue | 11 +-
.../web/src/components/Crontab/second.vue | 21 +-
.../vue2/web/src/components/Crontab/week.vue | 50 +-
.../vue2/web/src/components/Crontab/year.vue | 21 +-
.../vue2/web/src/components/DictData/index.js | 5 +-
.../vue2/web/src/components/Editor/index.vue | 86 +-
.../components/ExcelImportDialog/index.vue | 37 +-
.../web/src/components/FileUpload/index.vue | 45 +-
.../web/src/components/HeaderSearch/index.vue | 60 +-
.../web/src/components/IconSelect/index.vue | 2 +-
.../web/src/components/ImageUpload/index.vue | 45 +-
.../web/src/components/JsonEditor/index.vue | 43 +-
.../src/components/LanguageSelect/index.vue | 57 +
.../src/components/LocaleTextFields/index.vue | 55 +
.../components/OAuthWorkspace/AccessMap.vue | 34 +-
.../components/OAuthWorkspace/FieldLabel.vue | 2 +-
.../components/OAuthWorkspace/PageFrame.vue | 12 +-
.../OAuthWorkspace/StringListInput.vue | 8 +-
.../web/src/components/PluginFrame/index.vue | 69 +-
.../web/src/components/RightToolbar/index.vue | 18 +-
.../web/src/components/Screenfull/index.vue | 7 +-
.../web/src/components/SizeSelect/index.vue | 2 +-
.../web/src/components/TreePanel/index.vue | 18 +-
.../vue2/web/src/i18n/adapter.js | 31 +
.../vue2/web/src/i18n/components.js | 9 +
.../vue2/web/src/i18n/forms.js | 18 +
.../vue2/web/src/i18n/index.js | 45 +
.../vue2/web/src/i18n/locale-meta.json | 24 +
.../vue2/web/src/i18n/locales/en-US/auth.json | 107 +
.../src/i18n/locales/en-US/authCenter.json | 504 ++++
.../web/src/i18n/locales/en-US/common.json | 222 ++
.../src/i18n/locales/en-US/components.json | 6 +
.../vue2/web/src/i18n/locales/en-US/file.json | 366 +++
.../web/src/i18n/locales/en-US/layout.json | 191 ++
.../web/src/i18n/locales/en-US/monitor.json | 451 ++++
.../src/i18n/locales/en-US/pluginAdmin.json | 421 ++++
.../web/src/i18n/locales/en-US/system.json | 324 +++
.../vue2/web/src/i18n/locales/en-US/tool.json | 391 +++
.../vue2/web/src/i18n/locales/zh-CN/auth.json | 107 +
.../src/i18n/locales/zh-CN/authCenter.json | 504 ++++
.../web/src/i18n/locales/zh-CN/common.json | 222 ++
.../src/i18n/locales/zh-CN/components.json | 6 +
.../vue2/web/src/i18n/locales/zh-CN/file.json | 366 +++
.../web/src/i18n/locales/zh-CN/layout.json | 190 ++
.../web/src/i18n/locales/zh-CN/monitor.json | 451 ++++
.../src/i18n/locales/zh-CN/pluginAdmin.json | 421 ++++
.../web/src/i18n/locales/zh-CN/system.json | 324 +++
.../vue2/web/src/i18n/locales/zh-CN/tool.json | 391 +++
.../vue2/web/src/i18n/preference.js | 17 +
.../vue2/web/src/i18n/registry.js | 19 +
.../vue2/web/src/i18n/runtime.mjs | 216 ++
.../components/HeaderNotice/DetailView.vue | 16 +-
.../layout/components/HeaderNotice/index.vue | 14 +-
.../vue2/web/src/layout/components/Navbar.vue | 25 +-
.../src/layout/components/Settings/index.vue | 46 +-
.../layout/components/Sidebar/SidebarItem.vue | 4 +-
.../src/layout/components/TagsView/index.vue | 49 +-
.../src/layout/components/TopBar/index.vue | 2 +-
.../src/layout/components/TopNav/index.vue | 6 +-
ruoyi-fastapi-frontend/vue2/web/src/main.js | 21 +
.../vue2/web/src/permission.js | 1 -
.../vue2/web/src/plugins/download.js | 15 +-
.../vue2/web/src/plugins/modal.js | 21 +-
.../vue2/web/src/plugins/tab.js | 7 +-
.../vue2/web/src/router/index.js | 32 +-
.../vue2/web/src/store/modules/dict.js | 2 +
.../vue2/web/src/store/modules/tagsView.js | 19 +-
.../vue2/web/src/store/modules/user.js | 32 +-
.../vue2/web/src/utils/dict/DictData.js | 8 +-
.../vue2/web/src/utils/dict/index.js | 8 +
.../vue2/web/src/utils/errorCode.js | 17 +-
.../vue2/web/src/utils/generator/config.js | 169 +-
.../vue2/web/src/utils/index.js | 11 +-
.../vue2/web/src/utils/job.js | 12 +-
.../vue2/web/src/utils/jobDisplay.js | 106 +
.../vue2/web/src/utils/localePayload.mjs | 12 +
.../vue2/web/src/utils/oauthUri.js | 23 +-
.../vue2/web/src/utils/passwordRule.js | 57 +-
.../vue2/web/src/utils/pluginBridge.d.ts | 1 +
.../vue2/web/src/utils/pluginBridge.js | 30 +-
.../vue2/web/src/utils/pluginPlanFormatter.js | 38 +-
.../web/src/utils/pluginReleaseDisplay.js | 47 +
.../vue2/web/src/utils/request.js | 39 +-
.../vue2/web/src/utils/tagsView.js | 44 +
.../vue2/web/src/utils/time.js | 22 +-
.../src/views/auth-center/AuthCenterShell.vue | 59 +-
.../src/views/auth-center/changePassword.vue | 92 +-
.../web/src/views/auth-center/consent.vue | 83 +-
.../vue2/web/src/views/auth-center/error.vue | 47 +-
.../vue2/web/src/views/auth-center/login.vue | 71 +-
.../src/views/auth-center/useInteraction.js | 7 +-
.../vue2/web/src/views/dashboard/BarChart.vue | 25 +-
.../web/src/views/dashboard/LineChart.vue | 19 +-
.../web/src/views/dashboard/PanelGroup.vue | 8 +-
.../vue2/web/src/views/dashboard/PieChart.vue | 29 +-
.../vue2/web/src/views/dashboard/Radar.vue | 6 +-
.../web/src/views/dashboard/RaddarChart.vue | 33 +-
.../vue2/web/src/views/dashboard/index.vue | 228 +-
.../vue2/web/src/views/error/401.vue | 12 +-
.../vue2/web/src/views/error/404.vue | 10 +-
.../vue2/web/src/views/index.vue | 66 +-
.../vue2/web/src/views/lock.vue | 17 +-
.../vue2/web/src/views/login.vue | 47 +-
.../web/src/views/monitor/cache/index.vue | 77 +-
.../vue2/web/src/views/monitor/cache/list.vue | 47 +-
.../web/src/views/monitor/druid/index.vue | 2 +-
.../vue2/web/src/views/monitor/job/detail.vue | 166 +-
.../vue2/web/src/views/monitor/job/index.vue | 225 +-
.../vue2/web/src/views/monitor/job/log.vue | 69 +-
.../web/src/views/monitor/job/runtime.vue | 102 +-
.../src/views/monitor/logininfor/index.vue | 65 +-
.../src/views/monitor/oauthAudit/index.vue | 496 ++--
.../web/src/views/monitor/online/index.vue | 41 +-
.../web/src/views/monitor/operlog/detail.vue | 76 +-
.../web/src/views/monitor/operlog/index.vue | 73 +-
.../web/src/views/monitor/server/index.vue | 127 +-
.../views/monitor/transportCrypto/index.vue | 217 +-
.../vue2/web/src/views/register.vue | 45 +-
.../web/src/views/system/config/index.vue | 110 +-
.../vue2/web/src/views/system/dept/index.vue | 106 +-
.../vue2/web/src/views/system/dict/data.vue | 141 +-
.../vue2/web/src/views/system/dict/detail.vue | 20 +-
.../vue2/web/src/views/system/dict/index.vue | 117 +-
.../system/file/components/FileAclDrawer.vue | 102 +-
.../file/components/FileAuditDrawer.vue | 101 +-
.../file/components/FileDetailDialog.vue | 64 +-
.../file/components/FileReconcileDrawer.vue | 345 ++-
.../file/components/FileReferenceDrawer.vue | 28 +-
.../components/FileRetentionPolicyDrawer.vue | 77 +-
.../FileRetentionReminderDrawer.vue | 133 +-
.../system/file/components/FileSearchForm.vue | 57 +-
.../system/file/components/FileStatistics.vue | 44 +-
.../system/file/components/FileTable.vue | 74 +-
.../file/components/FileTransferDialog.vue | 61 +-
.../system/file/components/fileFormatters.js | 127 +-
.../vue2/web/src/views/system/file/index.vue | 52 +-
.../vue2/web/src/views/system/menu/index.vue | 177 +-
.../web/src/views/system/notice/ReadUsers.vue | 23 +-
.../web/src/views/system/notice/index.vue | 94 +-
.../src/views/system/oauth/client/index.vue | 409 ++-
.../src/views/system/oauth/client/secret.vue | 31 +-
.../system/oauth/grant/AccessPolicyDrawer.vue | 123 +-
.../src/views/system/oauth/grant/index.vue | 224 +-
.../web/src/views/system/oauth/key/index.vue | 290 ++-
.../src/views/system/oauth/resource/index.vue | 259 +-
.../src/views/system/oauth/scope/index.vue | 281 ++-
.../src/views/system/oauth/session/index.vue | 145 +-
.../plugin/components/PluginConfigDialog.vue | 53 +-
.../plugin/components/PluginConfigStatus.vue | 86 +-
.../components/PluginDependencyDialog.vue | 108 +-
.../plugin/components/PluginDetailDialog.vue | 289 ++-
.../components/PluginDiagnosticDialog.vue | 76 +-
.../plugin/components/PluginPlanDialog.vue | 91 +-
.../plugin/components/PluginReleaseStatus.vue | 2 +-
.../components/PluginRuntimeMetrics.vue | 85 +-
.../web/src/views/system/plugin/index.vue | 719 +++---
.../vue2/web/src/views/system/post/index.vue | 94 +-
.../web/src/views/system/role/authUser.vue | 45 +-
.../vue2/web/src/views/system/role/index.vue | 181 +-
.../web/src/views/system/role/selectUser.vue | 35 +-
.../web/src/views/system/user/authRole.vue | 32 +-
.../vue2/web/src/views/system/user/index.vue | 226 +-
.../src/views/system/user/profile/index.vue | 22 +-
.../views/system/user/profile/resetPwd.vue | 29 +-
.../system/user/profile/timezoneSettings.vue | 37 +-
.../views/system/user/profile/userAvatar.vue | 16 +-
.../views/system/user/profile/userInfo.vue | 33 +-
.../vue2/web/src/views/system/user/view.vue | 50 +-
.../src/views/tool/build/CodeTypeDialog.vue | 24 +-
.../src/views/tool/build/DraggableItem.vue | 5 +-
.../web/src/views/tool/build/IconsDialog.vue | 4 +-
.../web/src/views/tool/build/RightPanel.vue | 403 +--
.../src/views/tool/build/TreeNodeDialog.vue | 26 +-
.../vue2/web/src/views/tool/build/index.vue | 42 +-
.../web/src/views/tool/gen/basicInfoForm.vue | 45 +-
.../web/src/views/tool/gen/createTable.vue | 25 +-
.../vue2/web/src/views/tool/gen/editTable.vue | 73 +-
.../web/src/views/tool/gen/genInfoForm.vue | 137 +-
.../web/src/views/tool/gen/importTable.vue | 37 +-
.../vue2/web/src/views/tool/gen/index.vue | 87 +-
.../vue2/web/tests/i18n/charts.test.mjs | 58 +
.../vue2/web/tests/i18n/navigation.test.mjs | 151 ++
.../web/tests/i18n/project-tooling.test.mjs | 77 +
.../vue2/web/tests/i18n/runtime.test.mjs | 138 ++
.../vue2/web/tests/i18n/test-runtime.cjs | 40 +
.../vue2/web/tests/i18n/uploads.test.mjs | 54 +
.../vue2/web/tests/i18n/x18n.test.mjs | 70 +
.../web/tests/job/vue2-components.test.cjs | 2 +
.../tests/plugins/pluginConfigStatus.test.mjs | 3 +
.../web/tests/plugins/pluginFrame.test.mjs | 3 +
.../plugins/pluginHostIntegration.test.cjs | 4 +
.../plugins/pluginRuntimeMetrics.test.mjs | 3 +
.../vue2/web/tests/support/load-module.cjs | 2 +
.../vue2/web/x18n.config.mjs | 37 +
.../vue3/mobile/package.json | 6 +-
.../vue3/mobile/pnpm-lock.yaml | 630 ++++-
.../vue3/mobile/scripts/check-i18n.mjs | 18 +
.../vue3/mobile/src/App.vue | 2 +
.../src/components/LanguageSelect/index.vue | 53 +
.../vue3/mobile/src/i18n/adapter.js | 32 +
.../vue3/mobile/src/i18n/index.js | 28 +
.../vue3/mobile/src/i18n/locale-meta.json | 24 +
.../mobile/src/i18n/locales/en-US/common.json | 33 +
.../mobile/src/i18n/locales/en-US/mobile.json | 251 ++
.../src/i18n/locales/en-US/utility.json | 37 +
.../mobile/src/i18n/locales/zh-CN/common.json | 33 +
.../mobile/src/i18n/locales/zh-CN/mobile.json | 251 ++
.../src/i18n/locales/zh-CN/utility.json | 37 +
.../vue3/mobile/src/i18n/message.mjs | 10 +
.../vue3/mobile/src/i18n/names.mjs | 15 +
.../vue3/mobile/src/i18n/navigation.js | 35 +
.../vue3/mobile/src/i18n/preference.js | 17 +
.../vue3/mobile/src/i18n/registry.js | 15 +
.../vue3/mobile/src/i18n/runtime.mjs | 216 ++
.../vue3/mobile/src/main.ts | 10 +
.../src/pages/common/agreement/index.vue | 52 +-
.../mobile/src/pages/common/privacy/index.vue | 73 +-
.../src/pages/common/textview/index.vue | 4 +-
.../vue3/mobile/src/pages/index.vue | 55 +-
.../vue3/mobile/src/pages/login.vue | 34 +-
.../mobile/src/pages/mine/about/index.vue | 10 +-
.../mobile/src/pages/mine/avatar/index.vue | 9 +-
.../vue3/mobile/src/pages/mine/help/index.vue | 37 +-
.../vue3/mobile/src/pages/mine/index.vue | 29 +-
.../vue3/mobile/src/pages/mine/info/edit.vue | 47 +-
.../vue3/mobile/src/pages/mine/info/index.vue | 24 +-
.../vue3/mobile/src/pages/mine/pwd/index.vue | 33 +-
.../mobile/src/pages/mine/setting/index.vue | 18 +-
.../src/pages/mine/setting/timezone.vue | 45 +-
.../vue3/mobile/src/pages/register.vue | 37 +-
.../vue3/mobile/src/pages/work/index.vue | 47 +-
.../vue3/mobile/src/plugins/modal.js | 10 +-
.../vue3/mobile/src/store/modules/user.js | 3 +
.../vue3/mobile/src/utils/common.js | 7 +-
.../vue3/mobile/src/utils/dict.js | 57 +-
.../vue3/mobile/src/utils/errorCode.js | 17 +-
.../vue3/mobile/src/utils/request.js | 11 +-
.../vue3/mobile/src/utils/session.js | 3 +-
.../vue3/mobile/src/utils/time.js | 56 +-
.../vue3/mobile/src/utils/transportCrypto.js | 68 +-
.../vue3/mobile/src/utils/transportForge.js | 8 +-
.../vue3/mobile/src/utils/upload.js | 17 +-
.../vue3/mobile/tests/i18n/names.test.mjs | 49 +
.../vue3/mobile/tests/i18n/runtime.test.mjs | 138 ++
.../vue3/mobile/tests/i18n/x18n.test.mjs | 70 +
.../vue3/mobile/x18n.config.mjs | 33 +
ruoyi-fastapi-frontend/vue3/web/package.json | 7 +-
.../vue3/web/plugins/ai/locales/en-US.json | 83 +
.../vue3/web/plugins/ai/locales/zh-CN.json | 83 +
.../ai/views/chat/components/AiMessage.vue | 4 +-
.../vue3/web/plugins/ai/views/chat/index.vue | 105 +-
.../vue3/web/plugins/ai/views/model/index.vue | 134 +-
.../vue3/web/pnpm-lock.yaml | 681 ++++-
.../vue3/web/scripts/check-i18n.mjs | 23 +
.../vue3/web/scripts/x18n-project.mjs | 26 +
ruoyi-fastapi-frontend/vue3/web/src/App.vue | 19 +-
.../web/src/components/Breadcrumb/index.vue | 24 +-
.../BusinessDateTimePicker/index.vue | 7 +-
.../components/BusinessFileUpload/index.vue | 54 +-
.../vue3/web/src/components/Crontab/day.vue | 79 +-
.../vue3/web/src/components/Crontab/hour.vue | 63 +-
.../vue3/web/src/components/Crontab/index.vue | 35 +-
.../vue3/web/src/components/Crontab/min.vue | 63 +-
.../vue3/web/src/components/Crontab/month.vue | 150 +-
.../web/src/components/Crontab/result.vue | 9 +-
.../web/src/components/Crontab/second.vue | 63 +-
.../vue3/web/src/components/Crontab/week.vue | 82 +-
.../vue3/web/src/components/Crontab/year.vue | 66 +-
.../vue3/web/src/components/Editor/index.vue | 15 +-
.../components/ExcelImportDialog/index.vue | 23 +-
.../web/src/components/FileUpload/index.vue | 35 +-
.../web/src/components/HeaderSearch/index.vue | 70 +-
.../web/src/components/IconSelect/index.vue | 2 +-
.../web/src/components/ImageUpload/index.vue | 33 +-
.../web/src/components/JsonEditor/index.vue | 28 +-
.../src/components/LanguageSelect/index.vue | 58 +
.../src/components/LocaleNameInput/index.vue | 47 +
.../src/components/LocalizedMessage/index.vue | 31 +
.../components/OAuthWorkspace/AccessMap.vue | 33 +-
.../components/OAuthWorkspace/FieldLabel.vue | 2 +-
.../components/OAuthWorkspace/PageFrame.vue | 9 +-
.../OAuthWorkspace/StringListInput.vue | 5 +-
.../web/src/components/PluginFrame/index.vue | 30 +-
.../web/src/components/RightToolbar/index.vue | 15 +-
.../web/src/components/SizeSelect/index.vue | 11 +-
.../web/src/components/TreePanel/index.vue | 11 +-
.../vue3/web/src/composables/useLocaleForm.js | 18 +
.../vue3/web/src/i18n/adapter.js | 36 +
.../vue3/web/src/i18n/components.js | 9 +
.../vue3/web/src/i18n/generated.mjs | 10 +
.../vue3/web/src/i18n/index.js | 45 +
.../vue3/web/src/i18n/locale-meta.json | 24 +
.../vue3/web/src/i18n/locales/en-US/auth.json | 36 +
.../src/i18n/locales/en-US/authCenter.json | 111 +
.../web/src/i18n/locales/en-US/common.json | 33 +
.../src/i18n/locales/en-US/components.json | 230 ++
.../web/src/i18n/locales/en-US/dashboard.json | 35 +
.../web/src/i18n/locales/en-US/files.json | 308 +++
.../web/src/i18n/locales/en-US/layout.json | 108 +
.../web/src/i18n/locales/en-US/monitor.json | 462 ++++
.../web/src/i18n/locales/en-US/oauth.json | 415 ++++
.../web/src/i18n/locales/en-US/plugins.json | 392 +++
.../web/src/i18n/locales/en-US/system.json | 324 +++
.../web/src/i18n/locales/en-US/tools.json | 329 +++
.../web/src/i18n/locales/en-US/utility.json | 70 +
.../vue3/web/src/i18n/locales/zh-CN/auth.json | 36 +
.../src/i18n/locales/zh-CN/authCenter.json | 109 +
.../web/src/i18n/locales/zh-CN/common.json | 33 +
.../src/i18n/locales/zh-CN/components.json | 229 ++
.../web/src/i18n/locales/zh-CN/dashboard.json | 35 +
.../web/src/i18n/locales/zh-CN/files.json | 308 +++
.../web/src/i18n/locales/zh-CN/layout.json | 107 +
.../web/src/i18n/locales/zh-CN/monitor.json | 462 ++++
.../web/src/i18n/locales/zh-CN/oauth.json | 413 +++
.../web/src/i18n/locales/zh-CN/plugins.json | 392 +++
.../web/src/i18n/locales/zh-CN/system.json | 324 +++
.../web/src/i18n/locales/zh-CN/tools.json | 329 +++
.../web/src/i18n/locales/zh-CN/utility.json | 67 +
.../vue3/web/src/i18n/message.mjs | 10 +
.../vue3/web/src/i18n/names.mjs | 15 +
.../vue3/web/src/i18n/preference.js | 17 +
.../vue3/web/src/i18n/registry.js | 76 +
.../vue3/web/src/i18n/runtime.mjs | 216 ++
.../components/HeaderNotice/DetailView.vue | 16 +-
.../layout/components/HeaderNotice/index.vue | 16 +-
.../src/layout/components/InnerLink/index.vue | 2 +-
.../vue3/web/src/layout/components/Navbar.vue | 30 +-
.../src/layout/components/Settings/index.vue | 66 +-
.../layout/components/Sidebar/SidebarItem.vue | 9 +-
.../src/layout/components/TagsView/index.vue | 73 +-
.../src/layout/components/TopBar/index.vue | 2 +-
.../src/layout/components/TopNav/index.vue | 7 +-
ruoyi-fastapi-frontend/vue3/web/src/main.js | 22 +-
.../vue3/web/src/permission.js | 2 -
.../vue3/web/src/plugins/download.js | 15 +-
.../vue3/web/src/plugins/modal.js | 21 +-
.../vue3/web/src/plugins/tab.js | 6 +-
.../vue3/web/src/router/index.js | 37 +-
.../vue3/web/src/store/modules/tagsView.js | 25 +-
.../vue3/web/src/store/modules/user.js | 31 +-
.../vue3/web/src/utils/dict.js | 56 +-
.../vue3/web/src/utils/dynamicTitle.js | 2 +-
.../vue3/web/src/utils/errorCode.js | 15 +-
.../vue3/web/src/utils/generator/config.js | 174 +-
.../web/src/utils/generator/drawingDefault.js | 8 +-
.../vue3/web/src/utils/generator/html.js | 11 +-
.../vue3/web/src/utils/generator/js.js | 20 +-
.../vue3/web/src/utils/index.js | 18 +-
.../vue3/web/src/utils/job.js | 56 +-
.../vue3/web/src/utils/oauthUri.js | 26 +-
.../vue3/web/src/utils/passwordRule.js | 48 +-
.../vue3/web/src/utils/pluginBridge.d.ts | 5 +
.../vue3/web/src/utils/pluginBridge.js | 260 +-
.../vue3/web/src/utils/pluginPlanFormatter.js | 58 +-
.../web/src/utils/pluginReleaseFormatter.js | 97 +-
.../vue3/web/src/utils/pluginSse.js | 28 +-
.../vue3/web/src/utils/request.js | 36 +-
.../vue3/web/src/utils/tagsView.js | 44 +
.../vue3/web/src/utils/time.js | 78 +-
.../vue3/web/src/utils/transportCrypto.js | 55 +-
.../src/views/auth-center/AuthCenterShell.vue | 61 +-
.../src/views/auth-center/changePassword.vue | 95 +-
.../web/src/views/auth-center/consent.vue | 73 +-
.../vue3/web/src/views/auth-center/error.vue | 41 +-
.../vue3/web/src/views/auth-center/login.vue | 78 +-
.../src/views/auth-center/useInteraction.js | 7 +-
.../views/dashboard/editable-link-group.vue | 28 +-
.../vue3/web/src/views/dashboard/index.vue | 254 +-
.../vue3/web/src/views/error/401.vue | 10 +-
.../vue3/web/src/views/error/404.vue | 14 +-
.../vue3/web/src/views/lock.vue | 37 +-
.../vue3/web/src/views/login.vue | 54 +-
.../web/src/views/monitor/cache/index.vue | 180 +-
.../vue3/web/src/views/monitor/cache/list.vue | 39 +-
.../web/src/views/monitor/druid/index.vue | 2 +-
.../vue3/web/src/views/monitor/job/detail.vue | 168 +-
.../vue3/web/src/views/monitor/job/index.vue | 247 +-
.../vue3/web/src/views/monitor/job/log.vue | 69 +-
.../web/src/views/monitor/job/runtime.vue | 96 +-
.../src/views/monitor/logininfor/index.vue | 63 +-
.../src/views/monitor/oauthAudit/index.vue | 548 ++--
.../web/src/views/monitor/online/index.vue | 39 +-
.../web/src/views/monitor/operlog/detail.vue | 69 +-
.../web/src/views/monitor/operlog/index.vue | 69 +-
.../web/src/views/monitor/server/index.vue | 125 +-
.../views/monitor/transportCrypto/index.vue | 229 +-
.../vue3/web/src/views/register.vue | 57 +-
.../web/src/views/system/config/index.vue | 130 +-
.../vue3/web/src/views/system/dept/index.vue | 134 +-
.../vue3/web/src/views/system/dict/data.vue | 182 +-
.../vue3/web/src/views/system/dict/detail.vue | 25 +-
.../vue3/web/src/views/system/dict/index.vue | 135 +-
.../system/file/components/FileAclDrawer.vue | 101 +-
.../file/components/FileAuditDrawer.vue | 102 +-
.../file/components/FileDetailDialog.vue | 65 +-
.../file/components/FileReconcileDrawer.vue | 373 ++-
.../file/components/FileReferenceDrawer.vue | 28 +-
.../components/FileRetentionPolicyDrawer.vue | 86 +-
.../FileRetentionReminderDrawer.vue | 145 +-
.../system/file/components/FileSearchForm.vue | 56 +-
.../system/file/components/FileStatistics.vue | 34 +-
.../system/file/components/FileTable.vue | 79 +-
.../file/components/FileTransferDialog.vue | 70 +-
.../system/file/components/fileFormatters.js | 125 +-
.../vue3/web/src/views/system/file/index.vue | 59 +-
.../vue3/web/src/views/system/menu/index.vue | 237 +-
.../web/src/views/system/notice/ReadUsers.vue | 24 +-
.../web/src/views/system/notice/index.vue | 98 +-
.../src/views/system/oauth/client/index.vue | 317 ++-
.../src/views/system/oauth/client/secret.vue | 21 +-
.../system/oauth/grant/AccessPolicyDrawer.vue | 113 +-
.../src/views/system/oauth/grant/index.vue | 194 +-
.../web/src/views/system/oauth/key/index.vue | 296 ++-
.../src/views/system/oauth/resource/index.vue | 222 +-
.../src/views/system/oauth/scope/index.vue | 246 +-
.../src/views/system/oauth/session/index.vue | 151 +-
.../plugin/components/PluginConfigDialog.vue | 45 +-
.../plugin/components/PluginConfigStatus.vue | 70 +-
.../components/PluginDependencyDialog.vue | 93 +-
.../plugin/components/PluginDetailDialog.vue | 281 ++-
.../components/PluginDiagnosticDialog.vue | 71 +-
.../plugin/components/PluginPlanDialog.vue | 88 +-
.../components/PluginRuntimeMetrics.vue | 119 +-
.../web/src/views/system/plugin/index.vue | 573 +++--
.../vue3/web/src/views/system/post/index.vue | 112 +-
.../web/src/views/system/role/authUser.vue | 43 +-
.../vue3/web/src/views/system/role/index.vue | 222 +-
.../web/src/views/system/role/selectUser.vue | 33 +-
.../web/src/views/system/user/authRole.vue | 25 +-
.../vue3/web/src/views/system/user/index.vue | 227 +-
.../src/views/system/user/profile/index.vue | 22 +-
.../views/system/user/profile/resetPwd.vue | 42 +-
.../system/user/profile/timezoneSettings.vue | 35 +-
.../views/system/user/profile/userAvatar.vue | 14 +-
.../views/system/user/profile/userInfo.vue | 64 +-
.../vue3/web/src/views/system/user/view.vue | 46 +-
.../src/views/tool/build/CodeTypeDialog.vue | 29 +-
.../src/views/tool/build/DraggableItem.vue | 4 +-
.../web/src/views/tool/build/IconsDialog.vue | 9 +-
.../web/src/views/tool/build/RightPanel.vue | 398 +--
.../src/views/tool/build/TreeNodeDialog.vue | 31 +-
.../vue3/web/src/views/tool/build/index.vue | 58 +-
.../web/src/views/tool/gen/basicInfoForm.vue | 59 +-
.../web/src/views/tool/gen/createTable.vue | 19 +-
.../vue3/web/src/views/tool/gen/editTable.vue | 67 +-
.../web/src/views/tool/gen/genInfoForm.vue | 186 +-
.../web/src/views/tool/gen/importTable.vue | 35 +-
.../vue3/web/src/views/tool/gen/index.vue | 87 +-
.../vue3/web/tests/i18n/generated.test.mjs | 38 +
.../vue3/web/tests/i18n/generator.test.mjs | 54 +
.../vue3/web/tests/i18n/localeFixture.mjs | 25 +
.../web/tests/i18n/localizedMessage.test.mjs | 54 +
.../vue3/web/tests/i18n/names.test.mjs | 49 +
.../vue3/web/tests/i18n/navigation.test.mjs | 221 ++
.../vue3/web/tests/i18n/pluginSdk.test.mjs | 22 +
.../web/tests/i18n/project-tooling.test.mjs | 77 +
.../vue3/web/tests/i18n/runtime.test.mjs | 143 ++
.../vue3/web/tests/i18n/x18n.test.mjs | 94 +
.../tests/plugins/pluginConfigStatus.test.js | 3 +
.../web/tests/plugins/pluginFrame.test.js | 3 +
.../plugins/pluginRuntimeMetrics.test.js | 3 +
.../vue3/web/x18n.config.mjs | 41 +
.../frontend/logout-behavior.mjs | 204 +-
.../frontend/mobile-harness.mjs | 4 +
1010 files changed, 68341 insertions(+), 15975 deletions(-)
create mode 100644 ruoyi-fastapi-backend/.x18n/tooling/package-lock.json
create mode 100644 ruoyi-fastapi-backend/.x18n/tooling/package.json
create mode 100644 ruoyi-fastapi-backend/.x18n/tooling/tests/usage.test.mjs
create mode 100644 ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/i18n.js.tmpl
create mode 100644 ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/x18n.config.mjs.tmpl
create mode 100644 ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/locales.py
create mode 100644 ruoyi-fastapi-backend/i18n/__init__.py
create mode 100644 ruoyi-fastapi-backend/i18n/catalogs/en-US/LC_MESSAGES/core.po
create mode 100644 ruoyi-fastapi-backend/i18n/catalogs/zh-CN/LC_MESSAGES/core.po
create mode 100644 ruoyi-fastapi-backend/i18n/locale.py
create mode 100644 ruoyi-fastapi-backend/i18n/message.py
create mode 100644 ruoyi-fastapi-backend/i18n/registry.py
create mode 100644 ruoyi-fastapi-backend/i18n/translation.py
create mode 100644 ruoyi-fastapi-backend/i18n/translator.py
create mode 100644 ruoyi-fastapi-backend/middlewares/locale_middleware.py
create mode 100644 ruoyi-fastapi-backend/scripts/compile_i18n.py
create mode 100644 ruoyi-fastapi-backend/scripts/migrate_i18n.py
create mode 100644 ruoyi-fastapi-backend/sql/i18n-seeds.json
create mode 100644 ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_scaffold_locales.py
create mode 100644 ruoyi-fastapi-backend/tests/config/test_i18n_settings.py
create mode 100644 ruoyi-fastapi-backend/tests/i18n/test_excel_i18n.py
create mode 100644 ruoyi-fastapi-backend/tests/i18n/test_locale.py
create mode 100644 ruoyi-fastapi-backend/tests/i18n/test_plugin_messages.py
create mode 100644 ruoyi-fastapi-backend/tests/i18n/test_translation_migration.py
create mode 100644 ruoyi-fastapi-backend/tests/i18n/test_translations.py
create mode 100644 ruoyi-fastapi-backend/tests/module_generator/test_generated_i18n.py
create mode 100644 ruoyi-fastapi-backend/tests/plugins/sample_plugins/test_ai_i18n.py
create mode 100644 ruoyi-fastapi-backend/utils/gen_i18n_util.py
create mode 100644 ruoyi-fastapi-backend/utils/user_import_util.py
create mode 100644 ruoyi-fastapi-backend/x18n.config.yml
create mode 100644 ruoyi-fastapi-frontend/react/mobile/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/components/LanguageSelect/index.jsx
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/error.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/help.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/locales/en-US/mobile.json
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/locales/zh-CN/mobile.json
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/navigation.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/react/mobile/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/mobile/x18n.config.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/plugins/ai/locales/en-US.json
create mode 100644 ruoyi-fastapi-frontend/react/web/plugins/ai/locales/zh-CN.json
create mode 100644 ruoyi-fastapi-frontend/react/web/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/scripts/x18n-project.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/src/components/LanguageSelect/index.jsx
create mode 100644 ruoyi-fastapi-frontend/react/web/src/components/TranslationFields/index.jsx
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/entities.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/form.js
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/generated.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/auth.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/file.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/layout.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/monitor.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/pluginAdmin.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/system.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/en-US/tool.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/auth.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/file.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/layout.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/monitor.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/pluginAdmin.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/system.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/locales/zh-CN/tool.json
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/message.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/react/web/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/entities.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.jsx
create mode 100644 ruoyi-fastapi-frontend/react/web/x18n.config.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/components/LanguageSelect/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/file.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/mobile.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/en-US/system.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/file.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/mobile.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/locales/zh-CN/system.json
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/navigation.js
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/x18n.config.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/plugins/ai/locales/en-US.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/plugins/ai/locales/zh-CN.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/scripts/x18n-project.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/components/LanguageSelect/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/components/LocaleTextFields/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/components.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/forms.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/components.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/file.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/layout.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/pluginAdmin.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/system.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/en-US/tool.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/components.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/file.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/layout.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/pluginAdmin.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/system.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/locales/zh-CN/tool.json
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/utils/jobDisplay.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/utils/localePayload.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/utils/pluginReleaseDisplay.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/src/utils/tagsView.js
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.cjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue2/web/x18n.config.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/components/LanguageSelect/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/mobile.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/utility.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/mobile.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/utility.json
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/message.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/navigation.js
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/x18n.config.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/en-US.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/zh-CN.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/scripts/check-i18n.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/scripts/x18n-project.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/components/LanguageSelect/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/components/LocalizedMessage/index.vue
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/composables/useLocaleForm.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/adapter.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/components.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/generated.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/index.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locale-meta.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/common.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/components.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/dashboard.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/files.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/layout.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/oauth.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/plugins.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/system.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/tools.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/utility.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/auth.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/authCenter.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/common.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/components.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/dashboard.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/files.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/layout.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/monitor.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/oauth.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/plugins.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/system.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/tools.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/utility.json
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/message.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/names.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/preference.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/registry.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/i18n/runtime.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/src/utils/tagsView.js
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.mjs
create mode 100644 ruoyi-fastapi-frontend/vue3/web/x18n.config.mjs
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index df6a0085e..af2b74903 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -33,6 +33,16 @@ jobs:
ruoyi-fastapi-backend/plugins/ai/plugin.yaml
- name: Install MySQL, PostgreSQL and test dependencies
run: python -m pip install -r requirements.txt -r requirements-pg.txt -r requirements-test.txt
+ - name: Compile and validate gettext catalogs
+ run: python scripts/compile_i18n.py
+ - uses: actions/setup-node@v6
+ with:
+ node-version: '22'
+ - name: Install locked backend translation tooling and run read-only checks
+ run: |
+ npm ci --prefix .x18n/tooling --ignore-scripts
+ node .x18n/tooling/node_modules/@x18n/cli/bin.mjs --root . check --json
+ npm test --prefix .x18n/tooling
- name: Install AI plugin dependencies from its manifest
run: python ../.github/scripts/install_ai_test_dependencies.py
- name: Check dependency consistency
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml
index 5457108b3..0b1b02237 100644
--- a/.github/workflows/ci-frontend.yml
+++ b/.github/workflows/ci-frontend.yml
@@ -56,6 +56,10 @@ jobs:
if ! pnpm list --depth Infinity --json > test-results/dependency-tree.json; then
echo "Dependency tree includes peer diagnostics; inspect dependency-tree.json." >&2
fi
+ - name: Verify independent locale resources and runtime contracts
+ run: |
+ pnpm run i18n:check > test-results/i18n.json.log
+ pnpm run test:i18n
- name: Run unit and component behavior tests
run: pnpm run test:unit
- name: Verify time contracts in three host timezones
diff --git a/.gitignore b/.gitignore
index f13d541cb..51a077062 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,3 +153,6 @@ cython_debug/
.opencode/
.qoder/
.trae/
+
+# Backend development-only translation tool dependencies
+/ruoyi-fastapi-backend/.x18n/tooling/node_modules/
diff --git a/ruoyi-fastapi-backend/.dockerignore b/ruoyi-fastapi-backend/.dockerignore
index 9ed186256..2c0e9d07d 100644
--- a/ruoyi-fastapi-backend/.dockerignore
+++ b/ruoyi-fastapi-backend/.dockerignore
@@ -10,3 +10,5 @@ target
logs
*.log
*.egg-info
+
+.x18n
diff --git a/ruoyi-fastapi-backend/.env.dev b/ruoyi-fastapi-backend/.env.dev
index e11547f4e..5cefef25d 100644
--- a/ruoyi-fastapi-backend/.env.dev
+++ b/ruoyi-fastapi-backend/.env.dev
@@ -40,6 +40,10 @@ APP_DEFAULT_ENABLED_PLUGINS = 'ai'
# 应用业务时区,使用IANA时区名称(如Asia/Shanghai),用于时间展示、日期范围查询和定时任务默认时区
APP_TIMEZONE = 'Asia/Shanghai'
+# -------- 国际化配置 --------
+# 默认响应语言,必须使用后端语言注册表中已启用的语言标识
+I18N_DEFAULT_LOCALE = 'zh-CN'
+
# -------- Jwt配置 --------
# Jwt秘钥,留空时自动生成,开发环境下不要留空;也可使用 openssl rand -hex 32 手动生成
JWT_SECRET_KEY = 'b01c66dc2c58dc6a0aabfe2144256be36226de378bf87f72c0c795dda67f4d55'
diff --git a/ruoyi-fastapi-backend/.env.dockermy b/ruoyi-fastapi-backend/.env.dockermy
index ddce0fa84..02dafd946 100644
--- a/ruoyi-fastapi-backend/.env.dockermy
+++ b/ruoyi-fastapi-backend/.env.dockermy
@@ -40,6 +40,10 @@ APP_DEFAULT_ENABLED_PLUGINS = 'ai'
# 应用业务时区,使用IANA时区名称(如Asia/Shanghai),用于时间展示、日期范围查询和定时任务默认时区
APP_TIMEZONE = 'Asia/Shanghai'
+# -------- 国际化配置 --------
+# 默认响应语言,必须使用后端语言注册表中已启用的语言标识
+I18N_DEFAULT_LOCALE = 'zh-CN'
+
# -------- Jwt配置 --------
# Jwt秘钥,留空时自动生成;也可使用 openssl rand -hex 32 手动生成
JWT_SECRET_KEY = ''
diff --git a/ruoyi-fastapi-backend/.env.dockerpg b/ruoyi-fastapi-backend/.env.dockerpg
index c81575a86..2e9dd5ef3 100644
--- a/ruoyi-fastapi-backend/.env.dockerpg
+++ b/ruoyi-fastapi-backend/.env.dockerpg
@@ -40,6 +40,10 @@ APP_DEFAULT_ENABLED_PLUGINS = 'ai'
# 应用业务时区,使用IANA时区名称(如Asia/Shanghai),用于时间展示、日期范围查询和定时任务默认时区
APP_TIMEZONE = 'Asia/Shanghai'
+# -------- 国际化配置 --------
+# 默认响应语言,必须使用后端语言注册表中已启用的语言标识
+I18N_DEFAULT_LOCALE = 'zh-CN'
+
# -------- Jwt配置 --------
# Jwt秘钥,留空时自动生成;也可使用 openssl rand -hex 32 手动生成
JWT_SECRET_KEY = ''
diff --git a/ruoyi-fastapi-backend/.env.prod b/ruoyi-fastapi-backend/.env.prod
index 1b11e6f6d..aa3f77c29 100644
--- a/ruoyi-fastapi-backend/.env.prod
+++ b/ruoyi-fastapi-backend/.env.prod
@@ -40,6 +40,10 @@ APP_DEFAULT_ENABLED_PLUGINS = 'ai'
# 应用业务时区,使用IANA时区名称(如Asia/Shanghai),用于时间展示、日期范围查询和定时任务默认时区
APP_TIMEZONE = 'Asia/Shanghai'
+# -------- 国际化配置 --------
+# 默认响应语言,必须使用后端语言注册表中已启用的语言标识
+I18N_DEFAULT_LOCALE = 'zh-CN'
+
# -------- Jwt配置 --------
# Jwt秘钥,留空时自动生成;也可使用 openssl rand -hex 32 手动生成
JWT_SECRET_KEY = ''
diff --git a/ruoyi-fastapi-backend/.x18n/tooling/package-lock.json b/ruoyi-fastapi-backend/.x18n/tooling/package-lock.json
new file mode 100644
index 000000000..0b5caaa5f
--- /dev/null
+++ b/ruoyi-fastapi-backend/.x18n/tooling/package-lock.json
@@ -0,0 +1,1417 @@
+{
+ "name": "ruoyi-backend-i18n-tools",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "ruoyi-backend-i18n-tools",
+ "version": "1.0.0",
+ "devDependencies": {
+ "@x18n/cli": "0.1.3"
+ },
+ "engines": {
+ "node": ">=22"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.29.11",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.29.11.tgz",
+ "integrity": "sha512-snZbO7MEDOof+hvNa97EjEY7qD7h2kwvQr5AJC3ZhQudKW5dnej6k3kP9NQV88hJwaS8vDqRLFo9rivLEhle2g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.29.7",
+ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.29.12",
+ "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.29.12.tgz",
+ "integrity": "sha512-WJ7JBp/Q4+z/ImydtI7jS6NVco5++632ExBemSX+Ysb+G1lCwQ5BVo3SY+jGGOcZXI4ZccbZSUSJLNBW6eEpJg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/types": "^7.29.11"
+ },
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.29.11",
+ "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.29.11.tgz",
+ "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.29.11",
+ "@babel/helper-validator-identifier": "^7.29.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@devframes/agentic": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmmirror.com/@devframes/agentic/-/agentic-1.2.5.tgz",
+ "integrity": "sha512-2bVZFxGD7C+U1y0vkesUnLWHtrU3qD/Gq/Ri+aWkpXhDe/0EQ64ODA9gxCqFunUvJZ5z1rFvP1XLRLfUiSpvGg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@modelcontextprotocol/client": "^2.3.1",
+ "@modelcontextprotocol/server": "^2.3.1",
+ "h3": "^2.0.1",
+ "pathe": "^2.0.3"
+ },
+ "peerDependencies": {
+ "devframe": "1.2.5"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.13",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.31",
+ "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@modelcontextprotocol/client": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmmirror.com/@modelcontextprotocol/client/-/client-2.4.0.tgz",
+ "integrity": "sha512-LgrD2OphHuG12vfKFKz6SOnq7bKHQmhGJIAYdD+MZBn2npHEyry6uD8zvktodtl5CQM85MO0anUyD9JwmUmxww==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@modelcontextprotocol/core": "2.4.0",
+ "cross-spawn": "^7.0.5",
+ "eventsource": "^3.0.2",
+ "eventsource-parser": "^3.0.8",
+ "jose": "^6.1.3",
+ "pkce-challenge": "^5.0.0",
+ "zod": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@modelcontextprotocol/core": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmmirror.com/@modelcontextprotocol/core/-/core-2.4.0.tgz",
+ "integrity": "sha512-z8QBKqdfXLPzkLQuG4xp8hrVEMm1PZ1IgxMN2sMbJiFiAKOWXnAzogXn2W4aqIBlP1ea6U5yiqVquvUNM1Cj6Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "zod": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@modelcontextprotocol/server": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmmirror.com/@modelcontextprotocol/server/-/server-2.4.0.tgz",
+ "integrity": "sha512-rgR9yxSaAJ+bcsi/XroT/S2AfPiIWloXAnrdfYSCms9ivVju0ishu/wW0J21Ho6+ZOR1r7RyeRbjiRuF87ix5Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@modelcontextprotocol/core": "2.4.0",
+ "zod": "^4.2.0"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+ },
+ "node_modules/@oxc-parser/binding-android-arm-eabi": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.155.0.tgz",
+ "integrity": "sha512-A6xv7hDtnTm+xlZ7utn6rRQpRMJHRhVr3gjRGqlx0RUX84mNk0pAsy6YN/wWhuOTkaZhRrrzaLxf0NfbH77j2w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-android-arm64": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.155.0.tgz",
+ "integrity": "sha512-T1wWwH9/JI5g7Z4kEQwDOwhToxdDhRyOTklH+uuNpJ16m3MZFmGl+l2rKc0NHQdbVRG2LTOBsNjpW3h1BWytPA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-darwin-arm64": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.155.0.tgz",
+ "integrity": "sha512-ZoRB3qJxJ8DWA41jHja+YeB0lLfjBy4T+Kr15vnN1k65X3zbJt3rPZftEwN4Ju4tmA4K/T9dWWD7Z8ewQLnrVA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-darwin-x64": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.155.0.tgz",
+ "integrity": "sha512-vxtL86BtM+IgrpejA86nbTk5j0HKTIMeuaJ1fQciw6p9RfavPtIPjI7gN34owap0yG9txXBaAWpGdxokNwdqIw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-freebsd-x64": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.155.0.tgz",
+ "integrity": "sha512-tN6Ru5e0UVnWaIuiH8jEwnvxuxg7FvhWwSd3oe5oDhOD4ObsSr9/N6WfHLjilUWlPPj65ptwrSDH0Y7lzwTzmw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.155.0.tgz",
+ "integrity": "sha512-h4ozA5n6L6lwolsz9iwunEhKWnIVbmFRots5QxEix0H6nJ5ICpuDa7PuShuhfpIDFe3+Qvyscioyiv+9g+4Syg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-arm-musleabihf": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.155.0.tgz",
+ "integrity": "sha512-058/+LardpfuUlsKIvBGk/CYoakEVcMgqYx8GgyUZeOxFWTojYLlCc1Gb60/y21v3esDhHidgiY/Zbq9LpBhaQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-arm64-gnu": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.155.0.tgz",
+ "integrity": "sha512-nrOt2Y3xIAzu+lSPzH0864ieO+iCCXgoo9qFlGANE8Xh0cQ+RP8Wstfp+/wXN2YCyb98cAGzX0VruKYw7it/jw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-arm64-musl": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.155.0.tgz",
+ "integrity": "sha512-KYAayyN5hQbJPtGKtRxlyc8XYmyntOplyXSQzTDrmbz7l/GCrzQbSswvyJFBTH1LGtsZrbXOAfN52i/Kz6kLKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-ppc64-gnu": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.155.0.tgz",
+ "integrity": "sha512-CSuSY5hfjtsBnHXydOj8jiNfS1qHbdPZuPz1YL1cSgK7VmNYP+QlZIbG0BBYYBgX/vYEgZwbG9mBdW4YairZ5w==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-riscv64-gnu": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.155.0.tgz",
+ "integrity": "sha512-7KCfOQm+Nz2N8trAXbQkal4TQ5756WVEmhm35y816YHvyFnEfVsICsiV5k0pEszNf/fRm4cm2i6i18SJ6/iCWg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-riscv64-musl": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.155.0.tgz",
+ "integrity": "sha512-JSlhgoK+/g1TGJI5NuADx2+6syhxnQNLCWLXyO5QLFyetomcr/vIxSdiNlmyAv963YXUzCuwAwRG6npZ5xyJ1A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-s390x-gnu": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.155.0.tgz",
+ "integrity": "sha512-WFIX+dPokWp64mi434Md3U3lJaTwNxAphvGjpltoyQjGUsdXavOIRrnp9dOS34Hd75HOAwDxAI+YwWOwqmJbtg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-x64-gnu": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.155.0.tgz",
+ "integrity": "sha512-g6xSDC/JpbnVOz5uafMGyK3txBVRFMQTx8opv/yHXGxqV3ZMVl3bf7W8XrSnF68dmy3gM4dgReNryuE53+WkeQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-linux-x64-musl": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.155.0.tgz",
+ "integrity": "sha512-6/4xlxKlZJWrQ0uwDFPc0H9+xLu7068CKhX3vIDW3SbvP/lVgnVuT5v6dyugeWskWpuxqF/WJ4WKwhxjU3pG2w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-openharmony-arm64": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.155.0.tgz",
+ "integrity": "sha512-tltklL0J0XjDxIRTBXWOBhvc2mitcmES45pIxhwDWfxRyqz7Vkeu0NekTZEIxGE4f/lXgq3vZcjjffteQOVorg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-win32-arm64-msvc": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.155.0.tgz",
+ "integrity": "sha512-alAb9TzjatUEsOeoncAziUnfdTDxfyswhalFZ9sC6plUgATIUx2NIZ0+bMn6aJ28AduS1OpG/OAisr/YISn4Ig==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-win32-ia32-msvc": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.155.0.tgz",
+ "integrity": "sha512-yc5cbSfcGmRv/KpxDFuyk8adEBaWd/9HilWvBbQ4bFbus1V2PUh2mGB2Cfq9rqZTqLeiMT8x0skV+LKp9hOMgQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-parser/binding-win32-x64-msvc": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.155.0.tgz",
+ "integrity": "sha512-8heq6jGq+rfpTDRDjoQiBHw0maQZf3IXkS99pdHQZPoTL5kyF5qyPS0RidUlSdnWDIqxXb5nux7GBD9cT+imUw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ }
+ },
+ "node_modules/@oxc-project/types": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/@oxc-project/types/-/types-0.155.0.tgz",
+ "integrity": "sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/oxc-project"
+ }
+ },
+ "node_modules/@sveltejs/acorn-typescript": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmmirror.com/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.13.tgz",
+ "integrity": "sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "acorn": "^8.9.0"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.10.tgz",
+ "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@valibot/to-json-schema": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmmirror.com/@valibot/to-json-schema/-/to-json-schema-1.8.0.tgz",
+ "integrity": "sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "valibot": "^1.5.0"
+ }
+ },
+ "node_modules/@vue/compiler-core": {
+ "version": "3.5.44",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.44.tgz",
+ "integrity": "sha512-k34nCytbK8PQ1gR2mGROYOw6Pnv/mumqIdrZ3x2tbyXZDWm7ViKGLTfdB+DRrWqEQsLgGJvn0WN9jBif5zCTLQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.9",
+ "@vue/shared": "3.5.44",
+ "entities": "^7.0.1",
+ "estree-walker": "^2.0.2",
+ "source-map-js": "^1.2.2"
+ }
+ },
+ "node_modules/@vue/compiler-dom": {
+ "version": "3.5.44",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.44.tgz",
+ "integrity": "sha512-W5AoBFWdw1lQAKiHowkfgFKFab82oSRT6sGsPfw/q1GRjsy/ZJFLHGhJyBRIFN9APLTUduDH9U2JAiPOIyKuYg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vue/compiler-core": "3.5.44",
+ "@vue/shared": "3.5.44"
+ }
+ },
+ "node_modules/@vue/compiler-sfc": {
+ "version": "3.5.44",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.44.tgz",
+ "integrity": "sha512-dzHmQ4jXTpdr5FjIQUeykVakN/uzqFbUo9/C5ikBFg3a3PeM6uRxeczx1ZbXBML0/zJstEh3ygYipzR5Z7b2Pw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@babel/parser": "^7.29.9",
+ "@vue/compiler-core": "3.5.44",
+ "@vue/compiler-dom": "3.5.44",
+ "@vue/compiler-ssr": "3.5.44",
+ "@vue/shared": "3.5.44",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.21",
+ "postcss": "^8.5.29",
+ "source-map-js": "^1.2.2"
+ }
+ },
+ "node_modules/@vue/compiler-ssr": {
+ "version": "3.5.44",
+ "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.44.tgz",
+ "integrity": "sha512-xr5gb1JVHlfXJwSlRz1FeP6uxoazdzHuMTVLE7up+4Vrqxk219CvxLPxD9NXBt47yvZW7+p4DXfyp4O1fkByIA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vue/compiler-dom": "3.5.44",
+ "@vue/shared": "3.5.44"
+ }
+ },
+ "node_modules/@vue/shared": {
+ "version": "3.5.44",
+ "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.44.tgz",
+ "integrity": "sha512-H82XLH0DjmSOdbEwO15x3QTo1f5PWEtv237eLpYKc0mqLu+B8hnq16lFWmuBmNurkeiG3wr+oM1FhOll/YVFRg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@x18n/builtins": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/@x18n/builtins/-/builtins-0.1.3.tgz",
+ "integrity": "sha512-/T2q1xQ513oZ19VjGLmXVZjxAdzDahDZ4Ssh0IbAVlcOpSSfgZkRgo5uh8JAdQSPxtWBTKHslOYxSptWJq9j7w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@vue/compiler-sfc": "^3.5.44",
+ "@x18n/core": "0.1.3",
+ "json5": "^2.2.3",
+ "jsonc-parser": "^3.3.1",
+ "oxc-parser": "^0.155.0",
+ "svelte": "^5.57.2",
+ "yaml": "^2.9.1"
+ }
+ },
+ "node_modules/@x18n/cli": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/@x18n/cli/-/cli-0.1.3.tgz",
+ "integrity": "sha512-aOG1FJ1tJsnnjU3O13CktETY1GLW6FRmsw9KC5Mv35vEhah54O2+JAs0HBrqcmwADZAe7xwm6ZNY4DcaaV+BAQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@x18n/builtins": "0.1.3",
+ "@x18n/core": "0.1.3",
+ "@x18n/node": "0.1.3",
+ "@x18n/ui": "0.1.3",
+ "cac": "^7.1.0",
+ "devframe": "^1.2.6",
+ "nostics": "^1.3.0",
+ "yaml": "^2.9.1"
+ },
+ "bin": {
+ "x18n": "bin.mjs"
+ },
+ "engines": {
+ "node": ">=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/@x18n/cli/node_modules/@devframes/agentic": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmmirror.com/@devframes/agentic/-/agentic-1.2.6.tgz",
+ "integrity": "sha512-MNUuFdkWBYsLv8/GToerFYUEjBloNVm8jyNKH7Sm0PNyU/vtiYgIgh1vv4CBIFDsdwaj5aTbmIu92S1UhPddXA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "peer": true,
+ "dependencies": {
+ "@modelcontextprotocol/client": "^2.3.1",
+ "@modelcontextprotocol/server": "^2.3.1",
+ "h3": "^2.0.1",
+ "pathe": "^2.0.3"
+ },
+ "peerDependencies": {
+ "devframe": "1.2.6"
+ }
+ },
+ "node_modules/@x18n/cli/node_modules/devframe": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmmirror.com/devframe/-/devframe-1.2.6.tgz",
+ "integrity": "sha512-mHzcm6ADzXgRMWdoSX+5PjwhmwAuC3SpDPi3+URznlpzxJF6tXwy5h1xr82zPKju38EVtdnYRnnP4hZwLK01vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "crossws": "^0.4.12",
+ "h3": "^2.0.1",
+ "nostics": "^1.3.0",
+ "pathe": "^2.0.3"
+ },
+ "bin": {
+ "devframe": "bin/devframe.mjs"
+ },
+ "peerDependencies": {
+ "@devframes/agentic": "1.2.6",
+ "cac": "^7.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@devframes/agentic": {
+ "optional": true
+ },
+ "cac": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@x18n/core": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/@x18n/core/-/core-0.1.3.tgz",
+ "integrity": "sha512-u4lYzCPwuEctDenT6ZlvElj3LJvR23PJ+XCgWfqhNfgDSrPmippljekba9Hfcl2jBhaWx0SiE63A/wWVVoY4wQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "nostics": "^1.3.0",
+ "valibot": "^1.5.0"
+ }
+ },
+ "node_modules/@x18n/node": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/@x18n/node/-/node-0.1.3.tgz",
+ "integrity": "sha512-ALZVZ8jMblM552yC/ERZXLcmXxNjha1l4OqYUhkcZXibRhKwNqw5k2PvgdN1hcHVoC9DnS02zhyc7Cqbtm/O3w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@x18n/builtins": "0.1.3",
+ "@x18n/core": "0.1.3",
+ "chokidar": "^6.0.0",
+ "ignore": "^7.0.13",
+ "jiti": "^2.7.0",
+ "jsonc-parser": "^3.3.1",
+ "tinyglobby": "^0.2.17",
+ "yaml": "^2.9.1"
+ },
+ "engines": {
+ "node": ">=22"
+ }
+ },
+ "node_modules/@x18n/ui": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmmirror.com/@x18n/ui/-/ui-0.1.3.tgz",
+ "integrity": "sha512-X7c1MZd9Q5p0hflDYTkvEpZsD9twjvzBfauEDEF8kiz2qcig2uM8jEiieMboEA/yd5ikNc4uS9b2Q7MGcFyaGg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@devframes/agentic": "1.2.5",
+ "@valibot/to-json-schema": "^1.8.0",
+ "@x18n/builtins": "0.1.3",
+ "@x18n/core": "0.1.3",
+ "devframe": "^1.2.6",
+ "valibot": "^1.5.0"
+ },
+ "engines": {
+ "node": ">=22"
+ }
+ },
+ "node_modules/@x18n/ui/node_modules/devframe": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmmirror.com/devframe/-/devframe-1.2.6.tgz",
+ "integrity": "sha512-mHzcm6ADzXgRMWdoSX+5PjwhmwAuC3SpDPi3+URznlpzxJF6tXwy5h1xr82zPKju38EVtdnYRnnP4hZwLK01vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "crossws": "^0.4.12",
+ "h3": "^2.0.1",
+ "nostics": "^1.3.0",
+ "pathe": "^2.0.3"
+ },
+ "bin": {
+ "devframe": "bin/devframe.mjs"
+ },
+ "peerDependencies": {
+ "@devframes/agentic": "1.2.6",
+ "cac": "^7.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@devframes/agentic": {
+ "optional": true
+ },
+ "cac": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.19.0",
+ "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.19.0.tgz",
+ "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/aria-query": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmmirror.com/aria-query/-/aria-query-5.3.1.tgz",
+ "integrity": "sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/axobject-query": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmmirror.com/axobject-query/-/axobject-query-4.1.0.tgz",
+ "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/cac": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmmirror.com/cac/-/cac-7.1.0.tgz",
+ "integrity": "sha512-LMDU/U2yA4IPIY8KT0NsNPWEYZvAMkbgyspxJ6btJaYV+WMDOHAZCmB0lsTObiHaRS1V/ztKAl7+TSkTqXyeoA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.19.0"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-6.0.0.tgz",
+ "integrity": "sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "readdirp": "^5.1.1"
+ },
+ "engines": {
+ "node": ">= 22.22"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/clsx": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/clsx/-/clsx-2.1.1.tgz",
+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/crossws": {
+ "version": "0.4.17",
+ "resolved": "https://registry.npmmirror.com/crossws/-/crossws-0.4.17.tgz",
+ "integrity": "sha512-YG2kyfafNXKmu7e6k64yrj6whrw7m5sBIsOSXOlJ/72X3TQWRQuw8DhvXFDcBk8HF77PnTSygnm7xpYCTnFpow==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "srvx": ">=0.11.5"
+ },
+ "peerDependenciesMeta": {
+ "srvx": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/devalue": {
+ "version": "5.9.4",
+ "resolved": "https://registry.npmmirror.com/devalue/-/devalue-5.9.4.tgz",
+ "integrity": "sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/devframe": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmmirror.com/devframe/-/devframe-1.2.5.tgz",
+ "integrity": "sha512-7txhfBgFafXHN/KIyP/M6F1W5WF1VPypoB4mZtZEa4KM8n1Y57EtnVm281Y3cg7SHti/PtfCtmmmtDh/k/CS3g==",
+ "dev": true,
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "crossws": "^0.4.12",
+ "h3": "^2.0.1",
+ "nostics": "^1.3.0",
+ "pathe": "^2.0.3"
+ },
+ "bin": {
+ "devframe": "bin/devframe.mjs"
+ },
+ "peerDependencies": {
+ "@devframes/agentic": "1.2.5",
+ "cac": "^7.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@devframes/agentic": {
+ "optional": true
+ },
+ "cac": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/entities": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz",
+ "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==",
+ "dev": true,
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=0.12"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/esm-env": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmmirror.com/esm-env/-/esm-env-1.2.2.tgz",
+ "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/esrap": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmmirror.com/esrap/-/esrap-2.4.0.tgz",
+ "integrity": "sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.15"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/types": "^8.2.0"
+ },
+ "peerDependenciesMeta": {
+ "@typescript-eslint/types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/eventsource": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmmirror.com/eventsource/-/eventsource-3.0.7.tgz",
+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "eventsource-parser": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/eventsource-parser/-/eventsource-parser-3.1.1.tgz",
+ "integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/h3": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmmirror.com/h3/-/h3-2.0.8.tgz",
+ "integrity": "sha512-ENuKlF9kC6E6PrvY1PUyE0qkrnnPTIt2/v48uyEEfTVfgoiqBCE0uwwf++2XrWwT1gxjQBDLQ8PAsmZVniKvTw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "rou3": "^1.0.0",
+ "srvx": "^1.0.6"
+ },
+ "bin": {
+ "h3": "bin/h3.mjs"
+ },
+ "engines": {
+ "node": ">=20.19.0"
+ },
+ "peerDependencies": {
+ "crossws": "^0.4.12",
+ "ocache": ">=0.3.0"
+ },
+ "peerDependenciesMeta": {
+ "crossws": {
+ "optional": true
+ },
+ "ocache": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ignore": {
+ "version": "7.0.14",
+ "resolved": "https://registry.npmmirror.com/ignore/-/ignore-7.0.14.tgz",
+ "integrity": "sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/is-reference": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmmirror.com/is-reference/-/is-reference-3.0.3.tgz",
+ "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/estree": "^1.0.6"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/jiti": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.7.0.tgz",
+ "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "jiti": "lib/jiti-cli.mjs"
+ }
+ },
+ "node_modules/jose": {
+ "version": "6.2.14",
+ "resolved": "https://registry.npmmirror.com/jose/-/jose-6.2.14.tgz",
+ "integrity": "sha512-3JasLuki1NRLQvY4wCoC37KZk4qxoBx2k2aFqLxT84IezqW0bkJKnNtxnZj/Fu1xsQivoc/lytxaRHJoGLjJ1A==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonc-parser": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmmirror.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz",
+ "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/locate-character": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/locate-character/-/locate-character-3.0.0.tgz",
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.21",
+ "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz",
+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.5.5"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.20",
+ "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.20.tgz",
+ "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/nostics": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmmirror.com/nostics/-/nostics-1.3.0.tgz",
+ "integrity": "sha512-wzRsrJwNlFbqIRQt8aCeL2WE8USip/uuvGSOZV1D02CxX8ABTMbw8IywKjH7yWHETMXbWJI4OBpihg9rmz2Vyg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/oxc-parser": {
+ "version": "0.155.0",
+ "resolved": "https://registry.npmmirror.com/oxc-parser/-/oxc-parser-0.155.0.tgz",
+ "integrity": "sha512-C/ReSf1JUFukK/zvk6jhcNibSssvas5+ktIzK7fbKVd3CedWe59C3QwHEOrEZj/4Rt9+xg0Jeis/Jv1F/KM1mw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@oxc-project/types": "^0.155.0"
+ },
+ "engines": {
+ "node": "^20.19.0 || >=22.12.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/oxc-project"
+ },
+ "optionalDependencies": {
+ "@oxc-parser/binding-android-arm-eabi": "0.155.0",
+ "@oxc-parser/binding-android-arm64": "0.155.0",
+ "@oxc-parser/binding-darwin-arm64": "0.155.0",
+ "@oxc-parser/binding-darwin-x64": "0.155.0",
+ "@oxc-parser/binding-freebsd-x64": "0.155.0",
+ "@oxc-parser/binding-linux-arm-gnueabihf": "0.155.0",
+ "@oxc-parser/binding-linux-arm-musleabihf": "0.155.0",
+ "@oxc-parser/binding-linux-arm64-gnu": "0.155.0",
+ "@oxc-parser/binding-linux-arm64-musl": "0.155.0",
+ "@oxc-parser/binding-linux-ppc64-gnu": "0.155.0",
+ "@oxc-parser/binding-linux-riscv64-gnu": "0.155.0",
+ "@oxc-parser/binding-linux-riscv64-musl": "0.155.0",
+ "@oxc-parser/binding-linux-s390x-gnu": "0.155.0",
+ "@oxc-parser/binding-linux-x64-gnu": "0.155.0",
+ "@oxc-parser/binding-linux-x64-musl": "0.155.0",
+ "@oxc-parser/binding-openharmony-arm64": "0.155.0",
+ "@oxc-parser/binding-win32-arm64-msvc": "0.155.0",
+ "@oxc-parser/binding-win32-ia32-msvc": "0.155.0",
+ "@oxc-parser/binding-win32-x64-msvc": "0.155.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmmirror.com/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picocolors": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
+ "dev": true,
+ "license": "ISC"
+ },
+ "node_modules/picomatch": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.7.tgz",
+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkce-challenge": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.5.32",
+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.32.tgz",
+ "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "nanoid": "^3.3.20",
+ "picocolors": "^1.1.1",
+ "source-map-js": "^1.2.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-5.1.1.tgz",
+ "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20.19.0"
+ },
+ "funding": {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/rou3": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/rou3/-/rou3-1.0.0.tgz",
+ "integrity": "sha512-ySeaQkSrua+ut9g+65I7FHqOFBaY8tV0FmccXItoq0q21se32Q3u4YiW7/RqXSosWgYJaaKwRHXy3BST9PeCNQ==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=20.19.0"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.2.tgz",
+ "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/srvx": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmmirror.com/srvx/-/srvx-1.0.8.tgz",
+ "integrity": "sha512-ngFS/J6St4PJfHRHGjr78xkPPtbyXtdMOLNE4x/XZunEK3OhV7aGUWMHf9WTUEy6wm1U0W4okkd82ZFFWRVQTw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "srvx": "bin/srvx.mjs"
+ },
+ "engines": {
+ "node": ">=20.16.0"
+ }
+ },
+ "node_modules/svelte": {
+ "version": "5.57.3",
+ "resolved": "https://registry.npmmirror.com/svelte/-/svelte-5.57.3.tgz",
+ "integrity": "sha512-5mAftM3SoDV9X0zdF386F9p2pv8iKOwi/KfBS1XnBAkVCKFzVOLHUoa8iGWAt4buoicLmyWVRpuuD5wplXOQsg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/remapping": "^2.3.5",
+ "@jridgewell/sourcemap-codec": "^1.6.0",
+ "@sveltejs/acorn-typescript": "^1.0.13",
+ "@types/estree": "^1.0.9",
+ "acorn": "^8.18.0",
+ "aria-query": "5.3.1",
+ "axobject-query": "^4.1.0",
+ "clsx": "^2.1.1",
+ "devalue": "^5.9.2",
+ "esm-env": "^1.2.1",
+ "esrap": "^2.3.6",
+ "is-reference": "^3.0.3",
+ "locate-character": "^3.0.0",
+ "magic-string": "^0.30.11",
+ "zimmerframe": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/tinyglobby": {
+ "version": "0.2.17",
+ "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.17.tgz",
+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ }
+ },
+ "node_modules/valibot": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmmirror.com/valibot/-/valibot-1.5.0.tgz",
+ "integrity": "sha512-nil6AkP2TChWL43Z5uJ6GTxX01CUA+g8LWUM+N/rB9NBbkUMaUsi9PUNzlUPgoKASgmx9f7eGOYpJ04/fSa6FQ==",
+ "dev": true,
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/yaml": {
+ "version": "2.9.1",
+ "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.9.1.tgz",
+ "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "yaml": "bin.mjs"
+ },
+ "engines": {
+ "node": ">= 14.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/eemeli"
+ }
+ },
+ "node_modules/zimmerframe": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmmirror.com/zimmerframe/-/zimmerframe-1.1.5.tgz",
+ "integrity": "sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/zod": {
+ "version": "4.6.7",
+ "resolved": "https://registry.npmmirror.com/zod/-/zod-4.6.7.tgz",
+ "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/ruoyi-fastapi-backend/.x18n/tooling/package.json b/ruoyi-fastapi-backend/.x18n/tooling/package.json
new file mode 100644
index 000000000..121de129b
--- /dev/null
+++ b/ruoyi-fastapi-backend/.x18n/tooling/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "ruoyi-backend-i18n-tools",
+ "private": true,
+ "version": "1.0.0",
+ "engines": {
+ "node": ">=22"
+ },
+ "devDependencies": {
+ "@x18n/cli": "0.1.3"
+ },
+ "scripts": {
+ "i18n:check": "x18n --root ../.. check --json",
+ "test": "node --test tests/*.test.mjs"
+ }
+}
diff --git a/ruoyi-fastapi-backend/.x18n/tooling/tests/usage.test.mjs b/ruoyi-fastapi-backend/.x18n/tooling/tests/usage.test.mjs
new file mode 100644
index 000000000..eb0a3758b
--- /dev/null
+++ b/ruoyi-fastapi-backend/.x18n/tooling/tests/usage.test.mjs
@@ -0,0 +1,81 @@
+import assert from 'node:assert/strict'
+import { spawnSync } from 'node:child_process'
+import { cp, mkdtemp, rm, writeFile } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+import { test } from 'node:test'
+import { fileURLToPath } from 'node:url'
+
+const backend = new URL('../../../', import.meta.url)
+const cli = fileURLToPath(new URL('../node_modules/@x18n/cli/bin.mjs', import.meta.url))
+
+test('Python translation entry points are scanned with the project config', async () => {
+ const root = await mkdtemp(join(tmpdir(), 'ruoyi-python-x18n-'))
+ function check() {
+ const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], {
+ encoding: 'utf8',
+ })
+ assert.ifError(result.error)
+ assert.ok(result.stdout, result.stderr)
+ return { status: result.status, report: JSON.parse(result.stdout) }
+ }
+
+ try {
+ await cp(new URL('x18n.config.yml', backend), join(root, 'x18n.config.yml'))
+ await cp(new URL('i18n/catalogs/', backend), join(root, 'i18n/catalogs'), { recursive: true })
+ await writeFile(
+ join(root, 'messages.py'),
+ `from i18n import t
+from i18n.translator import I18nUtil
+
+t('common.success')
+t("common.failure", locale='en-US')
+I18nUtil.translate('common.error')
+I18nUtil.translate("common.forbidden")
+t(
+ 'common.unavailable',
+ locale='en-US',
+)
+ResponseUtil.success(msg_key='profile.localeSaved')
+my_t('missing.otherFunction')
+item.t('missing.otherObject')
+OtherI18nUtil.translate('missing.otherClass')
+t('missing.' + suffix)
+t(f'missing.{suffix}')
+`
+ )
+ let result = check()
+ assert.equal(result.status, 0, JSON.stringify(result.report))
+ assert.ok(result.report.data.projects[0].coverage.every((item) => item.total > 0))
+ const unused = new Set(
+ result.report.diagnostics.filter((item) => item.code === 'unused-key').map((item) => item.key)
+ )
+ for (const key of [
+ 'common.success',
+ 'common.failure',
+ 'common.error',
+ 'common.forbidden',
+ 'common.unavailable',
+ 'profile.localeSaved',
+ ]) {
+ assert.ok(!unused.has(key), `Usage was not found: ${key}`)
+ }
+
+ await writeFile(
+ join(root, 'missing.py'),
+ `t('missing.shortEntry')\nI18nUtil.translate("missing.classEntry")\n`
+ )
+ result = check()
+ assert.equal(result.status, 1)
+ assert.deepEqual(
+ new Set(
+ result.report.diagnostics
+ .filter((item) => item.code === 'missing-key')
+ .map((item) => item.key)
+ ),
+ new Set(['missing.shortEntry', 'missing.classEntry'])
+ )
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+})
diff --git a/ruoyi-fastapi-backend/Dockerfile.my b/ruoyi-fastapi-backend/Dockerfile.my
index f872739dc..62973ce19 100644
--- a/ruoyi-fastapi-backend/Dockerfile.my
+++ b/ruoyi-fastapi-backend/Dockerfile.my
@@ -10,6 +10,8 @@ COPY . .
# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt -i ${PIP_INDEX_URL}
+RUN python scripts/compile_i18n.py
+
# 暴露端口
EXPOSE 9099
diff --git a/ruoyi-fastapi-backend/Dockerfile.pg b/ruoyi-fastapi-backend/Dockerfile.pg
index 28ddb35bd..daa2907d9 100644
--- a/ruoyi-fastapi-backend/Dockerfile.pg
+++ b/ruoyi-fastapi-backend/Dockerfile.pg
@@ -10,6 +10,8 @@ COPY . .
# 安装依赖
RUN pip install --no-cache-dir -r requirements-pg.txt -i ${PIP_INDEX_URL}
+RUN python scripts/compile_i18n.py
+
# 暴露端口
EXPOSE 9099
diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/dev.html.tmpl b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/dev.html.tmpl
index d895436db..3d21dc786 100644
--- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/dev.html.tmpl
+++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/assets/web/dev.html.tmpl
@@ -63,6 +63,7 @@
__PLUGIN_ID__ · 模拟宿主
仅使用本地模拟响应,不连接真实后端。此页面不进入生产构建。
+
-
访客
+
{{ $t('layout:dashboard.visitors') }}
-
消息
+
{{ $t('layout:notices.message') }}
-
金额
+
{{ $t('layout:dashboard.amount') }}
-
订单
+
{{ $t('layout:dashboard.orders') }}
{
this.initChart()
@@ -46,7 +51,9 @@ export default {
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
-
+ this.setOptions()
+ },
+ setOptions() {
this.chart.setOption({
tooltip: {
trigger: 'item',
@@ -55,21 +62,27 @@ export default {
legend: {
left: 'center',
bottom: '10',
- data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts'],
+ data: [
+ this.$t('layout:dashboard.industries'),
+ this.$t('layout:dashboard.technology'),
+ this.$t('layout:dashboard.forex'),
+ this.$t('layout:dashboard.gold'),
+ this.$t('layout:dashboard.forecasts'),
+ ],
},
series: [
{
- name: 'WEEKLY WRITE ARTICLES',
+ name: this.$t('layout:dashboard.weeklyArticles'),
type: 'pie',
roseType: 'radius',
radius: [15, 95],
center: ['50%', '38%'],
data: [
- { value: 320, name: 'Industries' },
- { value: 240, name: 'Technology' },
- { value: 149, name: 'Forex' },
- { value: 100, name: 'Gold' },
- { value: 59, name: 'Forecasts' },
+ { value: 320, name: this.$t('layout:dashboard.industries') },
+ { value: 240, name: this.$t('layout:dashboard.technology') },
+ { value: 149, name: this.$t('layout:dashboard.forex') },
+ { value: 100, name: this.$t('layout:dashboard.gold') },
+ { value: 59, name: this.$t('layout:dashboard.forecasts') },
],
animationEasing: 'cubicInOut',
animationDuration: 2600,
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/dashboard/Radar.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/dashboard/Radar.vue
index 97252161f..3979ab300 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/dashboard/Radar.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/dashboard/Radar.vue
@@ -43,6 +43,8 @@
@@ -381,46 +410,192 @@ const detailOpen = ref(false)
const eventGroups = [
{
- label: '登录与授权',
+ get label() {
+ return t('monitor:messages.signInAndAuthorization')
+ },
options: [
- { label: '收到登录授权请求', value: 'authorize_requested' },
- { label: '登录授权已完成', value: 'authorize_succeeded' },
- { label: '登录授权被拒绝', value: 'authorize_denied' },
- { label: '用户登录成功', value: 'login_succeeded' },
- { label: '用户登录失败', value: 'login_failed' },
- { label: '用户同意授权', value: 'consent_granted' },
- { label: '用户撤销授权', value: 'consent_revoked' },
+ {
+ get label() {
+ return t('monitor:messages.signInAuthorizationRequested')
+ },
+ value: 'authorize_requested',
+ },
+ {
+ get label() {
+ return t('monitor:messages.signInAuthorizationCompleted')
+ },
+ value: 'authorize_succeeded',
+ },
+ {
+ get label() {
+ return t('monitor:messages.signInAuthorizationDeclined')
+ },
+ value: 'authorize_denied',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userSignedIn')
+ },
+ value: 'login_succeeded',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userSignInFailed')
+ },
+ value: 'login_failed',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userGrantedAuthorization')
+ },
+ value: 'consent_granted',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userWithdrewAuthorization')
+ },
+ value: 'consent_revoked',
+ },
],
},
{
- label: '凭据与会话',
+ get label() {
+ return t('monitor:messages.credentialsAndSessions')
+ },
options: [
- { label: '访问凭据已签发', value: 'token_issued' },
- { label: '访问凭据处理失败', value: 'token_failed' },
- { label: '刷新凭据已更新', value: 'refresh_rotated' },
- { label: '发现刷新凭据被重复使用', value: 'refresh_reuse_detected' },
- { label: '访问凭据已撤销', value: 'token_revoked' },
- { label: '登录会话已下线', value: 'session_revoked' },
- { label: '用户授权已撤销', value: 'grant_revoked' },
- { label: '用户应用访问已禁止', value: 'client_access_blocked' },
- { label: '用户应用访问已允许', value: 'client_access_allowed' },
- { label: '应用退出通知成功', value: 'backchannel_logout_succeeded' },
- { label: '应用退出通知失败', value: 'backchannel_logout_failed' },
+ {
+ get label() {
+ return t('monitor:messages.accessTokenIssued')
+ },
+ value: 'token_issued',
+ },
+ {
+ get label() {
+ return t('monitor:messages.accessTokenProcessingFailed')
+ },
+ value: 'token_failed',
+ },
+ {
+ get label() {
+ return t('monitor:messages.refreshTokenRenewed')
+ },
+ value: 'refresh_rotated',
+ },
+ {
+ get label() {
+ return t('monitor:messages.refreshTokenReuseDetected')
+ },
+ value: 'refresh_reuse_detected',
+ },
+ {
+ get label() {
+ return t('monitor:messages.accessTokenRevoked')
+ },
+ value: 'token_revoked',
+ },
+ {
+ get label() {
+ return t('monitor:messages.sessionEnded')
+ },
+ value: 'session_revoked',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userAuthorizationRevoked')
+ },
+ value: 'grant_revoked',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userAccessToAppBlocked')
+ },
+ value: 'client_access_blocked',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userAccessToAppAllowed')
+ },
+ value: 'client_access_allowed',
+ },
+ {
+ get label() {
+ return t('monitor:messages.appSignOutNotificationDelivered')
+ },
+ value: 'backchannel_logout_succeeded',
+ },
+ {
+ get label() {
+ return t('monitor:messages.appSignOutNotificationFailed')
+ },
+ value: 'backchannel_logout_failed',
+ },
],
},
{
- label: '配置与安全',
+ get label() {
+ return t('monitor:messages.configurationAndSecurity')
+ },
options: [
- { label: '应用已注册', value: 'client_created' },
- { label: '应用已停用', value: 'client_disabled' },
- { label: '应用密钥已更新', value: 'client_secret_rotated' },
- { label: '签名密钥已轮换', value: 'signing_key_rotated' },
- { label: '服务访问策略已变更', value: 'resource_policy_changed' },
- { label: '权限策略已变更', value: 'scope_policy_changed' },
- { label: '发现授权码被重复使用', value: 'authorization_code_reused' },
- { label: '应用身份验证失败', value: 'invalid_client' },
- { label: '用户身份标识缺失', value: 'identity_subject_missing' },
- { label: '账户安全版本已变更', value: 'security_version_changed' },
+ {
+ get label() {
+ return t('monitor:messages.appRegistered')
+ },
+ value: 'client_created',
+ },
+ {
+ get label() {
+ return t('monitor:messages.appDisabled')
+ },
+ value: 'client_disabled',
+ },
+ {
+ get label() {
+ return t('monitor:messages.appSecretUpdated')
+ },
+ value: 'client_secret_rotated',
+ },
+ {
+ get label() {
+ return t('monitor:messages.signingKeyRotated')
+ },
+ value: 'signing_key_rotated',
+ },
+ {
+ get label() {
+ return t('monitor:messages.serviceAccessPolicyChanged')
+ },
+ value: 'resource_policy_changed',
+ },
+ {
+ get label() {
+ return t('monitor:messages.permissionPolicyChanged')
+ },
+ value: 'scope_policy_changed',
+ },
+ {
+ get label() {
+ return t('monitor:messages.authorizationCodeReuseDetected')
+ },
+ value: 'authorization_code_reused',
+ },
+ {
+ get label() {
+ return t('monitor:messages.appAuthenticationFailed')
+ },
+ value: 'invalid_client',
+ },
+ {
+ get label() {
+ return t('monitor:messages.userIdentityMissing')
+ },
+ value: 'identity_subject_missing',
+ },
+ {
+ get label() {
+ return t('monitor:messages.accountSecurityVersionChanged')
+ },
+ value: 'security_version_changed',
+ },
],
},
]
@@ -440,42 +615,63 @@ const queryParams = reactive({
/** 获取安全事件名称 */
function eventLabel(value) {
- return eventLabels[value] || value || '未知安全操作'
+ return eventLabels[value] || value || t('monitor:messages.unknownSecurityOperation')
}
/** 获取安全事件的业务说明 */
function eventSummary(row = {}) {
const labels = {
- authorize_requested: '应用发起了用户登录或权限授权请求',
- authorize_succeeded: '用户身份确认和应用授权流程已经完成',
- authorize_denied: '登录或权限授权请求没有继续执行',
- login_succeeded: '用户已经通过身份验证',
- login_failed: '用户身份验证没有通过',
- consent_granted: '用户允许应用访问所请求的信息',
- consent_revoked: '用户取消了应用的持续访问权限',
- token_issued: '系统为应用签发了新的短期访问凭据',
- token_failed: '系统没有为应用签发访问凭据',
- refresh_rotated: '应用用于续期的凭据已经安全更新',
- refresh_reuse_detected: '同一份旧续期凭据被再次使用,可能存在泄露',
- token_revoked: '一份访问凭据已经作废',
- session_revoked: '一个外部登录会话已经被强制结束',
- grant_revoked: '一项用户对应用的访问授权已经撤销',
- client_access_blocked: '管理员已禁止用户访问指定应用,并撤销现有授权',
- client_access_allowed: '管理员已解除用户对指定应用的访问禁止,仍需重新授权',
- backchannel_logout_succeeded: '系统已经通知关联应用结束本地登录会话',
- backchannel_logout_failed: '关联应用没有成功接收退出通知',
- client_created: '一个新应用已接入统一认证',
- client_disabled: '一个应用已被禁止继续使用统一认证',
- client_secret_rotated: '应用用于证明身份的密钥已经更新',
- signing_key_rotated: '系统用于签署身份凭据的密钥已经更新',
- resource_policy_changed: '一个服务允许访问的凭据或用户信息配置已变更',
- scope_policy_changed: '一个权限的适用范围或用户确认要求已变更',
- authorization_code_reused: '一次性登录授权码被再次使用,可能存在攻击',
- invalid_client: '应用无法证明自己的身份',
- identity_subject_missing: '用户缺少统一认证所需的稳定身份标识',
- security_version_changed: '账户安全信息变更,旧登录状态将逐步失效',
+ authorize_requested: t('monitor:messages.anAppRequestedUserSignInOrPermissionAuthorization'),
+ authorize_succeeded: t('monitor:messages.identityVerificationAndAppAuthorizationCompleted'),
+ authorize_denied: t('monitor:messages.theSignInOrAuthorizationRequestWasNotContinued'),
+ login_succeeded: t('monitor:messages.theUserPassedAuthentication'),
+ login_failed: t('monitor:messages.theUserDidNotPassAuthentication'),
+ consent_granted: t('monitor:messages.theUserAllowedTheAppToAccessTheRequestedInformation'),
+ consent_revoked: t('monitor:messages.theUserWithdrewTheAppSOngoingAccess'),
+ token_issued: t('monitor:messages.theSystemIssuedANewShortLivedAccessTokenToTheApp'),
+ token_failed: t('monitor:messages.theSystemDidNotIssueAnAccessTokenToTheApp'),
+ refresh_rotated: t('monitor:messages.theAppSRefreshTokenWasSecurelyRenewed'),
+ refresh_reuse_detected: t(
+ 'monitor:messages.anOldRefreshTokenWasReusedAndMayHaveBeenCompromised'
+ ),
+ token_revoked: t('monitor:messages.anAccessTokenWasInvalidated'),
+ session_revoked: t('monitor:messages.anExternalSignInSessionWasForciblyEnded'),
+ grant_revoked: t('monitor:messages.aUserSAuthorizationForAnAppWasRevoked'),
+ client_access_blocked: t(
+ 'monitor:messages.anAdministratorBlockedTheUserSAccessToTheAppAndRevoked'
+ ),
+ client_access_allowed: t(
+ 'monitor:messages.anAdministratorUnblockedTheUserSAccessToTheAppNewAuthorization'
+ ),
+ backchannel_logout_succeeded: t(
+ 'monitor:messages.theSystemNotifiedRelatedAppsToEndTheirLocalSessions'
+ ),
+ backchannel_logout_failed: t('monitor:messages.aRelatedAppDidNotReceiveTheSignOutNotification'),
+ client_created: t('monitor:messages.aNewAppRegisteredWithTheAuthenticationService'),
+ client_disabled: t('monitor:messages.anAppWasBlockedFromUsingTheAuthenticationService'),
+ client_secret_rotated: t('monitor:messages.theSecretUsedToAuthenticateTheAppWasUpdated'),
+ signing_key_rotated: t('monitor:messages.theKeyUsedToSignIdentityCredentialsWasUpdated'),
+ resource_policy_changed: t(
+ 'monitor:messages.aServiceSAllowedCredentialsOrUserInformationSettingsChanged'
+ ),
+ scope_policy_changed: t(
+ 'monitor:messages.aPermissionSScopeOrUserConfirmationRequirementsChanged'
+ ),
+ authorization_code_reused: t(
+ 'monitor:messages.aOneTimeAuthorizationCodeWasReusedIndicatingAPossibleAttack'
+ ),
+ invalid_client: t('monitor:messages.theAppCouldNotAuthenticateItself'),
+ identity_subject_missing: t(
+ 'monitor:messages.theUserLacksTheStableIdentityRequiredForAuthentication'
+ ),
+ security_version_changed: t(
+ 'monitor:messages.accountSecurityInformationChangedExistingSessionsWillGraduallyExpire'
+ ),
}
- return labels[row.eventType] || '系统记录了一次认证安全操作'
+ return (
+ labels[row.eventType] ||
+ t('monitor:messages.theSystemRecordedAnAuthenticationSecurityOperation')
+ )
}
/** 根据处理结果和风险等级显示事件颜色 */
@@ -494,33 +690,47 @@ function sourceText(row = {}) {
if (row.userAgent) {
return row.userAgent.length > 26 ? `${row.userAgent.slice(0, 26)}…` : row.userAgent
}
- return row.ipAddress ? '外部请求' : '后台操作'
+ return row.ipAddress
+ ? t('monitor:messages.externalRequest')
+ : t('monitor:messages.administrativeAction')
}
/** 将协议失败代码转换为处理说明 */
function failureText(code, result) {
if (result !== 'failure' && !code) {
- return '无需处理'
+ return t('monitor:messages.noActionRequired')
}
const labels = {
- invalid_request: '请求信息不完整或格式不正确',
- invalid_client: '应用身份验证失败,请检查应用凭据',
- invalid_grant: '登录或授权凭据已经失效',
- unauthorized_client: '应用未获准使用当前登录方式',
- unsupported_grant_type: '系统不支持当前登录方式',
- invalid_scope: '应用请求了尚未开放的权限',
- access_denied: '用户或安全策略拒绝了本次操作',
- login_required: '用户需要重新登录',
- consent_required: '需要用户确认应用所需权限',
- server_error: '认证服务暂时无法完成请求',
- temporarily_unavailable: '认证服务暂时不可用',
+ invalid_request: t('monitor:messages.theRequestIsIncompleteOrIncorrectlyFormatted'),
+ invalid_client: t('monitor:messages.appAuthenticationFailedCheckTheAppCredentials'),
+ invalid_grant: t('monitor:messages.theSignInOrAuthorizationCredentialsHaveExpired'),
+ unauthorized_client: t('monitor:messages.theAppIsNotAllowedToUseThisSignInMethod'),
+ unsupported_grant_type: t('monitor:messages.thisSignInMethodIsNotSupported'),
+ invalid_scope: t('monitor:messages.theAppRequestedAPermissionThatIsNotAvailable'),
+ access_denied: t('monitor:messages.theUserOrASecurityPolicyDeniedThisOperation'),
+ login_required: t('monitor:messages.theUserNeedsToSignInAgain'),
+ consent_required: t('monitor:messages.theUserMustConfirmTheAppSRequestedPermissions'),
+ server_error: t('monitor:messages.theAuthenticationServiceCannotCompleteTheRequestRightNow'),
+ temporarily_unavailable: t('monitor:messages.theAuthenticationServiceIsTemporarilyUnavailable'),
}
- return labels[code] || (code ? `操作未完成(${code})` : '操作未完成,详情中暂无具体原因')
+ return (
+ labels[code] ||
+ (code
+ ? t('monitor:messages.operationIncomplete', { code })
+ : t('monitor:messages.theOperationDidNotCompleteNoSpecificReasonIsAvailable'))
+ )
}
/** 获取风险等级名称 */
function riskText(value) {
- return { normal: '常规', medium: '需关注', high: '高风险', critical: '严重' }[value] || '常规'
+ return (
+ {
+ normal: t('monitor:oauthAudit.general'),
+ medium: t('monitor:messages.needsAttention'),
+ high: t('monitor:messages.highRisk'),
+ critical: t('monitor:oauthAudit.critical'),
+ }[value] || t('monitor:oauthAudit.general')
+ )
}
/** 获取风险等级标签类型 */
function riskType(value) {
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/monitor/online/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/monitor/online/index.vue
index 06f80b073..7954687e5 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/monitor/online/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/monitor/online/index.vue
@@ -1,6 +1,7 @@
@@ -35,13 +36,13 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
- >搜索{{ $t('common:search') }}
重置{{ $t('common:reset') }}
@@ -51,7 +52,7 @@
style="width: 100%"
>
@@ -60,46 +61,46 @@
@@ -120,7 +121,7 @@
icon="el-icon-delete"
@click="handleForceLogout(scope.row)"
v-hasPermi="['monitor:online:forceLogout']"
- >强退{{ $t('monitor:messages.forceSignOut') }}
@@ -136,6 +137,8 @@
@@ -716,14 +841,28 @@ const selectedScopeOptions = computed(() => {
return form.scopeCodes.map((code) => known.get(code) || { scopeCode: code, scopeName: code })
})
const rules = {
- clientName: [{ required: true, message: '请输入应用名称', trigger: 'blur' }],
- clientType: [{ required: true, message: '请选择应用类型', trigger: 'change' }],
+ clientName: [
+ {
+ required: true,
+ message: () => t('authCenter:messages.enterAnApplicationName'),
+ trigger: 'blur',
+ },
+ ],
+ clientType: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.selectAnApplicationType')
+ },
+ trigger: 'change',
+ },
+ ],
grantTypes: [
{
required: true,
type: 'array',
min: 1,
- message: '至少选择一种登录或调用方式',
+ message: () => t('authCenter:messages.selectAtLeastOneSignInOrServiceAccessMethod'),
trigger: 'change',
},
],
@@ -732,7 +871,7 @@ const rules = {
required: true,
type: 'array',
min: 1,
- message: '至少添加一项可申请权限',
+ message: () => t('authCenter:messages.addAtLeastOneAvailablePermission'),
trigger: 'change',
},
],
@@ -913,11 +1052,13 @@ async function handleUpdate(row) {
/** 获取授权类型名称 */
function grantTypeText(types = []) {
const labels = {
- authorization_code: '用户登录',
- refresh_token: '保持登录',
- client_credentials: '服务间调用',
+ authorization_code: t('authCenter:messages.userSignIn'),
+ refresh_token: t('authCenter:messages.staySignedIn'),
+ client_credentials: t('authCenter:messages.serviceToServiceCalls'),
}
- return types.map((item) => labels[item] || item).join(' · ') || '尚未配置'
+ return (
+ types.map((item) => labels[item] || item).join(' · ') || t('authCenter:messages.notConfigured')
+ )
}
/** 处理客户端行操作 */
@@ -956,7 +1097,7 @@ async function submit() {
try {
const action = form.clientId ? updateOAuthClient : addOAuthClient
await action(payload())
- proxy.$modal.msgSuccess('应用配置已保存')
+ proxy.$modal.msgSuccess(t('authCenter:messages.applicationSettingsSaved'))
editorOpen.value = false
await getList()
} finally {
@@ -966,11 +1107,13 @@ async function submit() {
/** 修改客户端状态 */
async function changeStatus(row, status) {
- const verb = status === '0' ? '启用' : '停用'
+ const verb = status === '0' ? t('system:oauth.enable') : t('system:oauth.disabled')
try {
- await proxy.$modal.confirm(`${verb}应用“${row.clientName}”?`)
+ await proxy.$modal.confirm(
+ t('auth:interface.valueApplicationValue', { value0: verb, value1: row.clientName })
+ )
await changeOAuthClientStatus({ clientId: row.clientId, status })
- proxy.$modal.msgSuccess(`${verb}成功`)
+ proxy.$modal.msgSuccess(t('auth:interface.valueSucceeded', { value0: verb }))
await getList()
} catch {
// 用户取消或请求失败时刷新事实状态,避免保留乐观 UI
@@ -980,15 +1123,23 @@ async function changeStatus(row, status) {
/** 删除按钮操作 */
async function handleDelete(row) {
- await proxy.$modal.confirm(`停用“${row.clientName}”将同时撤销该应用的授权与刷新凭据,是否继续?`)
+ await proxy.$modal.confirm(
+ t('auth:interface.disablingValueAlsoRevokesItsGrantsAndRefreshCredentialsContinue', {
+ value0: row.clientName,
+ })
+ )
await deleteOAuthClients(row.clientId)
- proxy.$modal.msgSuccess('应用已停用')
+ proxy.$modal.msgSuccess(t('monitor:messages.appDisabled'))
await getList()
}
/** 轮换客户端密钥并显示一次性明文 */
async function rotateSecret(row) {
- await proxy.$modal.confirm(`为“${row.clientName}”生成新密钥?旧密钥将进入有界退役窗口。`)
+ await proxy.$modal.confirm(
+ t('auth:interface.generateANewSecretForValueTheOldSecretWillEnterALimitedRetirement', {
+ value0: row.clientName,
+ })
+ )
const response = await rotateOAuthClientSecret(row.clientId)
secret.value = response.data
secretOpen.value = true
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/client/secret.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/client/secret.vue
index acf62817b..11042b813 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/client/secret.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/client/secret.vue
@@ -2,20 +2,25 @@
复制{{ $t('common:copy') }}
- 我已将密钥保存到安全位置
+ {{
+ $t('authCenter:messages.iHaveStoredTheSecretSecurely')
+ }}
完成{{ $t('common:finish') }}
@@ -284,12 +315,26 @@ const accessRules = {
{
required: true,
pattern: /^[1-9]\d{0,18}$/,
- message: '请输入有效的用户编号',
+ message: () => t('authCenter:messages.enterAValidUserID'),
+ trigger: 'blur',
+ },
+ ],
+ clientId: [
+ {
+ required: true,
+ whitespace: true,
+ message: () => t('authCenter:messages.enterAClientID'),
+ trigger: 'blur',
+ },
+ ],
+ reason: [
+ {
+ required: true,
+ whitespace: true,
+ message: () => t('authCenter:messages.enterAReasonForThisOperation'),
trigger: 'blur',
},
],
- clientId: [{ required: true, whitespace: true, message: '请输入 Client ID', trigger: 'blur' }],
- reason: [{ required: true, whitespace: true, message: '请填写操作原因', trigger: 'blur' }],
}
/** 查询已配置的独立访问策略 */
@@ -340,7 +385,11 @@ async function saveAccess() {
blocked: accessBlocked.value,
reason: accessForm.reason.trim(),
})
- proxy.$modal.msgSuccess(accessBlocked.value ? '已禁止用户访问应用' : '已解除访问禁止')
+ proxy.$modal.msgSuccess(
+ accessBlocked.value
+ ? t('authCenter:messages.theUserHasBeenBlockedFromThisApplication')
+ : t('authCenter:messages.accessRestrictionRemoved')
+ )
accessOpen.value = false
emit('changed')
await getList()
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/grant/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/grant/index.vue
index b51b89355..3ad7ce362 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/grant/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/grant/index.vue
@@ -1,10 +1,18 @@
访问策略{{ $t('authCenter:messages.accessPolicies') }}
- 撤销选中{{ selected.length ? `(${selected.length})` : '' }}
+ {{ $t('authCenter:messages.revokeSelected')
+ }}{{ selected.length ? `(${selected.length})` : '' }}
@@ -103,19 +113,20 @@
type="primary"
icon="el-icon-search"
@click="handleQuery"
- >查找{{ $t('common:find') }}
清空{{ $t('common:clear') }}
找到 {{ total }} 条授权{{ $t('layout:interface.found') }} {{ total }}
+ {{ $t('authCenter:messages.grants') }}
@@ -147,14 +158,16 @@
>
{{ scope.row.userName || `用户 ${scope.row.userId}` }}{{
+ scope.row.userName || $t('auth:user.fallbackName', { id: scope.row.userId })
+ }}{{ scope.row.userId || short(scope.row.subjectId) }}
@@ -186,22 +199,25 @@
{{
- (scope.row.grantedResources || []).join('、') || '仅身份信息'
+ (scope.row.grantedResources || []).join('、') ||
+ $t('authCenter:interface.identityInformationOnly')
}}
- {{ parseTime(scope.row.lastUsedAt) || '尚未使用' }}
+ {{
+ parseTime(scope.row.lastUsedAt) || $t('authCenter:expression.notUsedYet')
+ }}
@@ -212,7 +228,7 @@
>
@@ -221,12 +237,16 @@
:type="scope.row.accessStatus === 'blocked' ? 'danger' : 'info'"
effect="plain"
>
- {{ scope.row.accessStatus === 'blocked' ? '禁止访问' : '允许授权' }}
+ {{
+ scope.row.accessStatus === 'blocked'
+ ? $t('authCenter:messages.blockAccess')
+ : $t('authCenter:messages.consentAllowed')
+ }}
查看{{ $t('common:view') }}
撤销{{ $t('authCenter:messages.revoke') }}
{{ scope.row.accessStatus === 'blocked' ? '解除禁止' : '禁止访问' }}{{
+ scope.row.accessStatus === 'blocked'
+ ? $t('authCenter:expression.removeRestriction')
+ : $t('authCenter:messages.blockAccess')
+ }}
-
+
-
将撤销 {{ revokeTargetCount }} 组用户与应用的现有授权
+
{{ $t('auth:grant.revokeCount', { count: revokeTargetCount }) }}
- 包括一次性授权、已记住的授权和持续访问权限。在线校验的资源将在下次检查时拒绝旧凭据;仅本地验签或缓存校验结果的资源可能延迟生效。用户重新同意后可以再次访问。
+ {{
+ $t(
+ 'authCenter:messages.thisIncludesOneTimeRememberedAndOfflineAccessGrantsResourcesUsingOnline'
+ )
+ }}
{{ $t('authCenter:messages.revocationReason') }}
- 取消
+ {{ $t('common:cancel') }}
确认撤销{{ $t('authCenter:messages.confirmRevocation') }}
@@ -324,7 +354,11 @@
{{ accessTarget.userName || `用户 ${accessTarget.userId}` }} ·
- {{ accessTarget.clientName || accessTarget.clientId }}{{
+ accessTarget.userName || $t('auth:user.fallbackName', { id: accessTarget.userId })
+ }}
+ · {{ accessTarget.clientName || accessTarget.clientId }}
- 将撤销该用户对应用的全部现有授权,并禁止再次授权。只有管理员解除禁止后,用户才能重新授权;其他应用不受影响。
+ {{
+ $t(
+ 'authCenter:messages.thisRevokesAllExistingGrantsForThisUserAndApplicationAndPrevents'
+ )
+ }}
+
+
+ {{
+ $t(
+ 'authCenter:messages.theUserMayGrantConsentAgainAfterTheRestrictionIsRemovedRevoked'
+ )
+ }}
-
解除后用户可以重新授权。已撤销的授权和旧凭据保持失效。
{{ $t('common:operationReason') }}
- 取消
+ {{ $t('common:cancel') }}
{{ accessBlocked ? '确认禁止' : '确认解除' }}{{
+ accessBlocked
+ ? $t('authCenter:expression.confirmRestriction')
+ : $t('authCenter:expression.confirmRemoval')
+ }}
@@ -374,7 +424,7 @@
@@ -385,13 +435,15 @@
>
-
{{ detail.userName || detail.userId || '用户' }}
-
已授权给 {{ detail.clientName || detail.clientId }}
+
{{ detail.userName || detail.userId || $t('system:user.user') }}
+
+ {{ $t('authCenter:messages.grantedTo') }} {{ detail.clientName || detail.clientId }}
+
{{ statusText(detail.status) }}
- 允许的权限
+ {{ $t('authCenter:messages.allowedPermissions') }}
- 可访问服务
- {{ (detail.grantedResources || []).join('、') || '仅用于获取登录身份信息' }}
+ {{ $t('pluginAdmin:accessibleServices') }}
+
+ {{
+ (detail.grantedResources || []).join('、') ||
+ $t('authCenter:expression.usedOnlyToObtainSignInIdentityInformation')
+ }}
+
- {{
+ {{
parseTime(detail.consentedAt) || '—'
}}
- {{
- parseTime(detail.lastUsedAt) || '尚未使用'
+ {{
+ parseTime(detail.lastUsedAt) || $t('authCenter:expression.notUsedYet')
}}
- {{
- (detail.rememberedScopes || []).join('、') || '未记住,下次仍需按策略确认'
+ {{
+ (detail.rememberedScopes || []).join('、') ||
+ $t('authCenter:expression.notRememberedFutureConfirmationFollowsThePolicy')
}}
- {{
- detail.accessStatus === 'blocked' ? '禁止访问,需管理员解除' : '允许重新授权'
+ {{
+ detail.accessStatus === 'blocked'
+ ? $t('authCenter:expression.accessBlockedAnAdministratorMustRemoveTheRestriction')
+ : $t('authCenter:expression.newConsentAllowed')
}}
- {{
+ {{
detail.accessReason || '—'
}}
- {{
+ {{
detail.revokeReason || '—'
}}
- - 授权 ID
+ - {{ $t('monitor:messages.authorizationID') }}
- {{ detail.grantId }}
- - 用户主体
+ - {{ $t('authCenter:userPrincipal') }}
- {{ detail.subjectId }}
- - 策略版本
+ - {{ $t('authCenter:messages.policyVersion') }}
- {{ detail.clientPolicyVersion || '—' }}
@@ -449,6 +509,8 @@
@@ -501,7 +563,13 @@ function short(value) {
/** 获取授权状态名称 */
function statusText(value) {
- return { active: '仍然有效', revoked: '已撤销', expired: '已过期' }[value] || '未知状态'
+ return (
+ {
+ active: t('authCenter:messages.stillValid'),
+ revoked: t('authCenter:messages.revoked'),
+ expired: t('common:expired'),
+ }[value] || t('authCenter:messages.unknownStatus')
+ )
}
/** 获取授权状态标签类型 */
@@ -550,7 +618,7 @@ async function revoke() {
await revokeOAuthGrants(revokeIds.value.join(','), {
reason: reason.value.trim(),
})
- proxy.$modal.msgSuccess('授权已撤销')
+ proxy.$modal.msgSuccess(t('authCenter:messages.grantRevoked'))
revokeOpen.value = false
await getList()
} finally {
@@ -574,7 +642,11 @@ async function saveAccess() {
blocked: accessBlocked.value,
reason: accessReason.value.trim(),
})
- proxy.$modal.msgSuccess(accessBlocked.value ? '已禁止访问该应用' : '已解除禁止,请重新授权')
+ proxy.$modal.msgSuccess(
+ accessBlocked.value
+ ? t('authCenter:messages.accessToThisApplicationHasBeenBlocked')
+ : t('authCenter:messages.restrictionRemovedGrantConsentAgain')
+ )
accessOpen.value = false
await getList()
} finally {
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/key/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/key/index.vue
index 0a60dae36..cd900ed9e 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/key/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/key/index.vue
@@ -1,9 +1,13 @@
- 安排密钥轮换
+ {{ $t('authCenter:messages.scheduleKeyRotation') }}
@@ -29,7 +33,7 @@
>
-
认证服务
+
{{ $t('authCenter:messages.authenticationService') }}
{{ serviceStatus.title }}
{{ serviceStatus.description }}
@@ -51,13 +55,17 @@
>
-
当前签名密钥
-
{{ activeKey?.kid || '尚未激活' }}
+
{{ $t('authCenter:messages.currentSigningKey') }}
+
{{ activeKey?.kid || $t('authCenter:expression.notActivated') }}
{{
activeKey
- ? `自 ${parseTime(activeKey.signingStartAt) || '计划时间'} 起签发新凭据`
- : '需要先激活一把已公开的密钥。'
+ ? $t('auth:key.issuingSince', {
+ time:
+ parseTime(activeKey.signingStartAt) ||
+ $t('authCenter:expression.scheduledTime'),
+ })
+ : $t('authCenter:expression.firstActivateAKeyWhosePublicKeyHasBeenPublished')
}}
@@ -79,13 +87,17 @@
>
-
下一次轮换
-
{{ nextKey?.kid || '尚未安排' }}
+
{{ $t('authCenter:messages.nextRotation') }}
+
{{ nextKey?.kid || $t('authCenter:expression.notScheduled') }}
{{
nextKey
- ? `计划在 ${parseTime(nextKey.signingStartAt) || '待确认时间'} 接管签名`
- : '建议在现有密钥到期前安排轮换。'
+ ? $t('auth:key.scheduledAt', {
+ time:
+ parseTime(nextKey.signingStartAt) ||
+ $t('authCenter:expression.timePendingConfirmation'),
+ })
+ : $t('authCenter:expression.scheduleRotationBeforeTheCurrentKeyExpires')
}}
@@ -95,7 +107,8 @@
共 {{ total }} 把密钥{{ $t('system:notice.total') }} {{ total }}
+ {{ $t('authCenter:messages.keys') }}
@@ -130,7 +143,7 @@
@@ -143,7 +156,7 @@
@@ -156,21 +169,28 @@
>
- 公开给应用{{ parseTime(scope.row.publishAt) || '—' }}
{{ scope.row.status === 'pending' ? '计划开始签名' : '开始签名' }}{{ $t('authCenter:messages.publishedToApplications') }}{{ parseTime(scope.row.publishAt) || '—' }}
+ {{
+ scope.row.status === 'pending'
+ ? $t('authCenter:expression.scheduledSigningStart')
+ : $t('authCenter:expression.signingStarts')
+ }}{{ parseTime(scope.row.signingStartAt) || '—' }}
@@ -181,7 +201,7 @@
- 等待公开
+ {{ $t('authCenter:messages.awaitingPublication') }}
@@ -210,7 +230,7 @@
icon="el-icon-circle-check"
v-hasPermi="['system:oauthKey:activate']"
@click="activate(scope.row)"
- >开始使用{{ $t('authCenter:messages.activate') }}
停止签名{{ $t('authCenter:messages.stopSigning') }}
删除记录{{ $t('authCenter:messages.deleteRecord') }}
-
+
创建第一把密钥{{ $t('authCenter:messages.createTheFirstKey') }}
@@ -256,23 +276,35 @@
-
1先公开应用提前拿到公钥
+
+ 1{{ $t('authCenter:messages.publishFirst') }}{{ $t('authCenter:messages.applicationsObtainThePublicKeyInAdvance') }}
+
-
2再接管签名新凭据改用新密钥
+
+ 2{{ $t('authCenter:messages.thenTakeOverSigning') }}{{ $t('authCenter:messages.newCredentialsUseTheNewKey') }}
+
-
3保留旧公钥旧凭据仍可验证到期
+
+ 3{{ $t('authCenter:messages.retainTheOldPublicKey') }}{{
+ $t('authCenter:messages.oldCredentialsRemainVerifiableUntilTheyExpire')
+ }}
+
- 取消
+ {{ $t('common:cancel') }}
创建轮换计划{{ $t('authCenter:messages.createRotationPlan') }}
@@ -362,6 +417,8 @@
@@ -401,19 +458,23 @@ const activeKey = computed(() => rows.value.find((item) => item.status === 'acti
const serviceStatus = computed(() => {
if (!enabled.value) {
return {
- title: '尚未启用',
- description: '可以先准备密钥,启用服务后再对外签发凭据。',
+ title: t('authCenter:messages.notEnabled'),
+ description: t(
+ 'authCenter:messages.youCanPrepareKeysFirstAndStartIssuingCredentialsWhenTheService'
+ ),
}
}
if (!ready.value) {
return {
- title: '等待初始化签名密钥',
- description: '管理后台可以正常使用,认证接口会暂时拒绝请求。',
+ title: t('authCenter:messages.waitingForSigningKeyInitialization'),
+ description: t(
+ 'authCenter:messages.theAdminConsoleRemainsAvailableAuthenticationEndpointsWillTemporarilyRejectRequests'
+ ),
}
}
return {
- title: '已启用并可以提供认证',
- description: '身份凭据会使用当前签名密钥签署。',
+ title: t('authCenter:messages.enabledAndReadyForAuthentication'),
+ description: t('authCenter:messages.identityCredentialsAreSignedWithTheCurrentSigningKey'),
}
})
const nextKey = computed(
@@ -427,21 +488,31 @@ const nextKey = computed(
const validateActivationTime = (_rule, value, callback) => {
if (!value) {
- return callback(new Error('请选择开始签名时间'))
+ return callback(new Error(t('authCenter:messages.chooseASigningStartTime')))
}
callback()
}
const rules = {
kid: [
- { required: true, message: '请输入便于识别的密钥编号', trigger: 'blur' },
+ {
+ required: true,
+ message: () => t('authCenter:messages.enterAnIdentifiableKeyID'),
+ trigger: 'blur',
+ },
{
pattern: /^[A-Za-z0-9._-]+$/,
- message: '只能使用字母、数字、点、横线和下划线',
+ message: () => t('authCenter:messages.useOnlyLettersDigitsPeriodsHyphensAndUnderscores'),
trigger: 'blur',
},
],
- publishAt: [{ required: true, message: '请选择公开公钥时间', trigger: 'change' }],
+ publishAt: [
+ {
+ required: true,
+ message: () => t('authCenter:messages.chooseAPublicKeyPublicationTime'),
+ trigger: 'change',
+ },
+ ],
activateAt: [{ validator: validateActivationTime, trigger: 'change' }],
}
@@ -449,11 +520,11 @@ const rules = {
function statusText(value) {
return (
{
- pending: '等待接管',
- active: '正在签名',
- retiring: '验证旧凭据',
- retired: '已退出',
- compromised: '疑似泄露',
+ pending: t('authCenter:messages.awaitingActivation'),
+ active: t('authCenter:messages.signing'),
+ retiring: t('authCenter:messages.verifyingOldCredentials'),
+ retired: t('authCenter:messages.retired'),
+ compromised: t('authCenter:messages.possiblyCompromised'),
}[value] || value
)
}
@@ -475,60 +546,66 @@ function statusType(value) {
function roleText(value) {
return (
{
- pending: '公钥已发布,尚未签发新凭据',
- active: '正在用于签发新的身份和访问凭据',
- retiring: '不再签发新凭据,只验证尚未到期的旧凭据',
- retired: '已从公开密钥列表移出',
- compromised: '已标记为不可信,请尽快完成应急轮换',
- }[value] || '状态信息未知'
+ pending: t('authCenter:messages.publicKeyPublishedNotYetIssuingNewCredentials'),
+ active: t('authCenter:messages.usedToIssueNewIdentityAndAccessCredentials'),
+ retiring: t(
+ 'authCenter:messages.noLongerIssuingNewCredentialsOnlyVerifyingUnexpiredOldCredentials'
+ ),
+ retired: t('authCenter:messages.removedFromThePublicKeyList'),
+ compromised: t(
+ 'authCenter:messages.markedAsUntrustedCompleteEmergencyRotationAsSoonAsPossible'
+ ),
+ }[value] || t('authCenter:messages.unknownStatusInformation')
)
}
/** 缩略显示RSA公钥模数 */
function publicFingerprint(jwk) {
if (!jwk?.n) {
- return '公开指纹尚未提供'
+ return t('authCenter:messages.publicFingerprintUnavailable')
}
- return `公开指纹 RSA · ${jwk.n.slice(0, 18)}…`
+ return t('auth:interface.publicFingerprintRSAValue', { value0: jwk.n.slice(0, 18) })
}
/** 获取密钥后续处理计划 */
function nextActionText(row) {
return (
{
- pending: '等待开始使用',
- active: '在下一把密钥接管后停止签名',
- retiring: '等待旧凭据全部到期',
- retired: '可以清理元数据',
- compromised: '立即安排应急轮换',
- }[row.status] || '暂无计划'
+ pending: t('authCenter:messages.waitingToStart'),
+ active: t('authCenter:messages.stopSigningWhenTheNextKeyTakesOver'),
+ retiring: t('authCenter:messages.waitingForAllOldCredentialsToExpire'),
+ retired: t('authCenter:messages.metadataCanBeRemoved'),
+ compromised: t('authCenter:messages.scheduleEmergencyRotationNow'),
+ }[row.status] || t('authCenter:messages.noPlan')
)
}
/** 显示密钥后续操作的时间条件 */
function nextActionTime(row) {
if (row.status === 'pending') {
- return parseTime(row.signingStartAt) || '需要手动开始使用'
+ return parseTime(row.signingStartAt) || t('authCenter:messages.manualActivationRequired')
}
if (['retiring', 'retired'].includes(row.status)) {
return row.removeFromJwksAt
- ? `最早清理:${parseTime(row.removeFromJwksAt)}`
- : '等待安全验证窗口结束'
+ ? t('auth:interface.earliestCleanupValue', { value0: parseTime(row.removeFromJwksAt) })
+ : t('authCenter:messages.waitingForTheSafeVerificationWindowToEnd')
}
if (row.status === 'active') {
- return '当前没有自动停止时间'
+ return t('authCenter:messages.noAutomaticStopTimeIsSet')
}
- return '请查看安全日志'
+ return t('authCenter:messages.checkTheSecurityLogs')
}
/** 检查密钥是否已到允许启用的公开时间 */
function activationDisabledReason(row) {
const publishAt = new Date(row.publishAt).getTime()
if (!Number.isFinite(publishAt)) {
- return '公钥公开时间无效,请刷新列表后重试'
+ return t('authCenter:messages.invalidPublicKeyPublicationTimeRefreshTheListAndTryAgain')
}
if (publishAt > Date.now()) {
- return `公钥将在 ${parseTime(row.publishAt)} 公开,之后才能开始使用`
+ return t('auth:interface.thePublicKeyWillBePublishedAtValueItCanBeActivatedAfterThat', {
+ value0: parseTime(row.publishAt),
+ })
}
return ''
}
@@ -568,13 +645,15 @@ async function rotate() {
return
}
if (payload.activateAt && new Date(payload.activateAt) < new Date(payload.publishAt)) {
- proxy.$modal.msgError('开始签名时间不能早于公开公钥时间')
+ proxy.$modal.msgError(t('authCenter:messages.signingCannotStartBeforePublicKeyPublication'))
return
}
saving.value = true
try {
await rotateOidcKey(payload)
- proxy.$modal.msgSuccess('轮换计划已创建,新公钥会按计划先行公开')
+ proxy.$modal.msgSuccess(
+ t('authCenter:messages.rotationScheduledTheNewPublicKeyWillBePublishedFirstAsPlanned')
+ )
open.value = false
await getList()
} finally {
@@ -592,31 +671,42 @@ async function activate(row) {
const signingStartAt = new Date(row.signingStartAt).getTime()
const scheduleNotice =
Number.isFinite(signingStartAt) && signingStartAt > Date.now()
- ? `该密钥原计划在 ${parseTime(row.signingStartAt)} 开始签名,本次操作将提前生效。`
- : '它将立即接管新凭据的签发。'
+ ? t('auth:interface.thisKeyWasScheduledToStartSigningAtValueThisActionActivatesItEarly', {
+ value0: parseTime(row.signingStartAt),
+ })
+ : t('authCenter:messages.itWillImmediatelyTakeOverIssuanceOfNewCredentials')
await proxy.$modal.confirm(
- `开始使用密钥 ${row.kid}?${scheduleNotice}当前签名密钥会进入旧凭据验证期。`
+ t(
+ 'auth:interface.activateKeyValueValueTheCurrentSigningKeyWillEnterTheOldCredentialVerificationPeriod',
+ { value0: row.kid, value1: scheduleNotice }
+ )
)
await activateOidcKey(row.kid)
- proxy.$modal.msgSuccess('新的签名密钥已开始使用')
+ proxy.$modal.msgSuccess(t('authCenter:messages.theNewSigningKeyIsActive'))
await getList()
}
/** 停止使用密钥签发新令牌 */
async function retire(row) {
await proxy.$modal.confirm(
- `停止使用密钥 ${row.kid} 签发新凭据?它的公钥仍会保留一段时间,用于验证尚未到期的旧凭据。`
+ t('auth:interface.stopIssuingNewCredentialsWithKeyValueItsPublicKeyWillRemainAvailableFor', {
+ value0: row.kid,
+ })
)
await retireOidcKey(row.kid)
- proxy.$modal.msgSuccess('密钥已停止签名,当前仅用于验证旧凭据')
+ proxy.$modal.msgSuccess(t('authCenter:messages.theKeyHasStoppedSigningAndIsNowUsedOnlyToVerify'))
await getList()
}
/** 删除按钮操作 */
async function handleDelete(row) {
- await proxy.$modal.confirm(`删除密钥 ${row.kid} 的记录?请确认所有由它签署的凭据都已到期。`)
+ await proxy.$modal.confirm(
+ t('auth:interface.deleteTheRecordForKeyValueConfirmThatEveryCredentialItSignedHasExpired', {
+ value0: row.kid,
+ })
+ )
await deleteOidcKey(row.kid)
- proxy.$modal.msgSuccess('密钥记录已删除')
+ proxy.$modal.msgSuccess(t('authCenter:messages.keyRecordDeleted'))
await getList()
}
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/resource/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/resource/index.vue
index 8a70acce7..85a27443e 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/resource/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/resource/index.vue
@@ -1,10 +1,14 @@
新增服务{{ $t('authCenter:messages.addService') }}
@@ -60,12 +65,12 @@
type="primary"
icon="el-icon-search"
@click="handleQuery"
- >查找{{ $t('common:find') }}
清空{{ $t('common:clear') }}
@@ -73,7 +78,8 @@
已登记 {{ total }} 个服务{{ $t('authCenter:messages.registered') }} {{ total }}
+ {{ $t('authCenter:messages.services') }}
@@ -106,7 +112,7 @@
@@ -137,29 +143,31 @@
{{
scope.row.accessTokenTtlSeconds
? formatDuration(scope.row.accessTokenTtlSeconds)
- : '平台默认'
+ : $t('pluginAdmin:platformDefault')
}}
{{
- scope.row.status === '0' ? '使用中' : '已停用'
+ scope.row.status === '0'
+ ? $t('authCenter:messages.inUse')
+ : $t('pluginAdmin:release.disabled')
}}
编辑{{ $t('common:editAction') }}
更多{{ $t('common:more') }}
@@ -189,14 +197,14 @@
command="enable"
icon="el-icon-circle-check"
v-hasPermi="['system:oauthResource:edit']"
- >重新启用{{ $t('authCenter:messages.reEnable') }}
停用服务{{ $t('authCenter:messages.disableService') }}
@@ -205,12 +213,12 @@
-
+
新增第一个服务{{ $t('authCenter:messages.addYourFirstService') }}
@@ -227,12 +235,17 @@
- 取消
+ {{ $t('common:cancel') }}
保存服务{{ $t('authCenter:messages.saveService') }}
@@ -395,6 +444,8 @@
@@ -426,21 +477,74 @@ const queryParams = reactive({
})
const form = reactive(emptyForm())
const claimOptions = [
- { value: 'sub', label: '用户唯一标识(sub)' },
- { value: 'name', label: '姓名(name)' },
- { value: 'email', label: '邮箱(email)' },
- { value: 'roles', label: '角色(roles)' },
- { value: 'client_id', label: '应用编号(client_id)' },
- { value: 'scope', label: '已获权限(scope)' },
- { value: 'sid', label: '会话标识(sid)' },
+ {
+ value: 'sub',
+ get label() {
+ return t('auth:interface.userIdentifierSub')
+ },
+ },
+ {
+ value: 'name',
+ get label() {
+ return t('auth:interface.nameName')
+ },
+ },
+ {
+ value: 'email',
+ get label() {
+ return t('auth:interface.emailEmail')
+ },
+ },
+ {
+ value: 'roles',
+ get label() {
+ return t('auth:interface.rolesRoles')
+ },
+ },
+ {
+ value: 'client_id',
+ get label() {
+ return t('auth:interface.clientIDClientId')
+ },
+ },
+ {
+ value: 'scope',
+ get label() {
+ return t('auth:interface.grantedPermissionsScope')
+ },
+ },
+ {
+ value: 'sid',
+ get label() {
+ return t('auth:interface.sessionIDSid')
+ },
+ },
]
const rules = {
- resourceId: [{ required: true, message: '请输入服务标识', trigger: 'blur' }],
- resourceName: [{ required: true, message: '请输入服务名称', trigger: 'blur' }],
+ resourceId: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.enterAServiceIdentifier')
+ },
+ trigger: 'blur',
+ },
+ ],
+ resourceName: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.enterAServiceName')
+ },
+ trigger: 'blur',
+ },
+ ],
audience: [
{
required: true,
- message: '请输入令牌目标(通常填写服务地址)',
+ get message() {
+ return t('auth:interface.enterTheTokenAudienceUsuallyTheServiceURL')
+ },
trigger: 'blur',
},
],
@@ -449,7 +553,7 @@ const rules = {
required: true,
type: 'array',
min: 1,
- message: '至少选择一项可返回的用户信息',
+ message: () => t('authCenter:messages.selectAtLeastOneAllowedUserInformationField'),
trigger: 'change',
},
],
@@ -530,7 +634,7 @@ async function submitForm() {
delete data.status
}
await (persisted ? updateOAuthResource(data) : addOAuthResource(data))
- proxy.$modal.msgSuccess('资源配置已保存')
+ proxy.$modal.msgSuccess(t('authCenter:messages.resourceSettingsSaved'))
open.value = false
await getList()
} finally {
@@ -541,7 +645,12 @@ async function submitForm() {
/** 修改资源服务状态 */
async function changeStatus(row, status) {
try {
- await proxy.$modal.confirm(`${status === '0' ? '启用' : '停用'}资源“${row.resourceName}”?`)
+ await proxy.$modal.confirm(
+ t('auth:interface.valueResourceValue', {
+ value0: status === '0' ? t('system:oauth.enable') : t('system:oauth.disabled'),
+ value1: row.resourceName,
+ })
+ )
await changeOAuthResourceStatus({ resourceId: row.resourceId, status })
getList()
} catch {
@@ -552,10 +661,12 @@ async function changeStatus(row, status) {
/** 删除按钮操作 */
async function handleDelete(row) {
await proxy.$modal.confirm(
- `停用“${row.resourceName}”后将停止为该服务签发和刷新访问令牌,是否继续?`
+ t('auth:interface.disablingValueStopsIssuanceAndRefreshOfAccessTokensForThisServiceContinue', {
+ value0: row.resourceName,
+ })
)
await deleteOAuthResources(row.resourceId)
- proxy.$modal.msgSuccess('资源已停用')
+ proxy.$modal.msgSuccess(t('authCenter:messages.resourceDisabled'))
await getList()
}
@@ -578,12 +689,12 @@ function claimLabel(value) {
function formatDuration(value) {
const seconds = Number(value) || 0
if (seconds >= 3600 && seconds % 3600 === 0) {
- return `${seconds / 3600} 小时`
+ return t('auth:interface.valueHours', { value0: seconds / 3600 })
}
if (seconds >= 60 && seconds % 60 === 0) {
- return `${seconds / 60} 分钟`
+ return t('auth:interface.valueMinutes', { value0: seconds / 60 })
}
- return `${seconds} 秒`
+ return t('auth:interface.valueSeconds', { value0: seconds })
}
getList()
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/scope/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/scope/index.vue
index 2c2da4a7e..475c4cfff 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/scope/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/scope/index.vue
@@ -1,10 +1,18 @@
新增权限{{ $t('authCenter:messages.addPermission') }}
@@ -80,12 +89,12 @@
type="primary"
icon="el-icon-search"
@click="handleQuery"
- >查找{{ $t('common:find') }}
清空{{ $t('common:clear') }}
@@ -93,7 +102,8 @@
已定义 {{ total }} 项权限{{ $t('authCenter:messages.defined') }} {{ total }}
+ {{ $t('authCenter:messages.permissions') }}
@@ -118,7 +128,7 @@
@@ -126,18 +136,22 @@
:type="scope.row.scopeType === 'identity' ? 'primary' : 'success'"
effect="plain"
>
- {{ scope.row.scopeType === 'identity' ? '登录身份信息' : '服务访问' }}
+ {{
+ scope.row.scopeType === 'identity'
+ ? $t('authCenter:messages.signInIdentityInformation')
+ : $t('authCenter:messages.serviceAccess')
+ }}
{{ resourceName(scope.row.resourceId) }}
@@ -152,7 +166,7 @@
不返回额外信息{{ $t('auth:interface.noAdditionalInformationReturned') }}
@@ -172,25 +186,31 @@
v-if="scope.row.sensitive"
type="warning"
size="small"
- >敏感权限{{ $t('authCenter:messages.sensitivePermission') }}
- {{ scope.row.consentRequired ? '需要确认' : '无需重复确认' }}
+ {{
+ scope.row.consentRequired
+ ? $t('authCenter:expression.confirmationRequired')
+ : $t('authCenter:expression.skipRepeatedConfirmation')
+ }}
{{
- scope.row.status === '0' ? '使用中' : '已停用'
+ scope.row.status === '0'
+ ? $t('authCenter:messages.inUse')
+ : $t('pluginAdmin:release.disabled')
}}
编辑{{ $t('common:editAction') }}
更多{{ $t('common:more') }}
@@ -221,14 +241,14 @@
command="enable"
icon="el-icon-circle-check"
v-hasPermi="['system:oauthScope:edit']"
- >重新启用{{ $t('authCenter:messages.reEnable') }}
停用权限{{ $t('authCenter:messages.disablePermission') }}
@@ -237,12 +257,12 @@
-
+
新增第一项权限{{ $t('authCenter:messages.addYourFirstPermission') }}
@@ -259,12 +279,17 @@
-
权限含义
-
先选择这项权限用于登录信息还是服务访问,再说明它可以返回什么。
+
{{ $t('authCenter:messages.permissionMeaning') }}
+
+ {{
+ $t(
+ 'authCenter:messages.chooseWhetherThisPermissionProvidesSignInInformationOrServiceAccessThen'
+ )
+ }}
+
- 登录身份信息
- 例如姓名、邮箱和角色
+ {{ $t('authCenter:messages.signInIdentityInformation') }}
+ {{ $t('authCenter:messages.forExampleNameEmailAndRoles') }}
- 服务访问
- 例如查看订单或修改库存
+ {{ $t('authCenter:messages.serviceAccess') }}
+ {{
+ $t('authCenter:messages.forExampleViewingOrdersOrUpdatingInventory')
+ }}
@@ -310,12 +347,12 @@
@@ -327,13 +364,15 @@
@@ -345,13 +384,15 @@
>
- 使用前让用户确认
- 标记为敏感权限
+ {{
+ $t('authCenter:messages.askTheUserToConfirmBeforeUse')
+ }}
+ {{
+ $t('authCenter:messages.markAsSensitivePermission')
+ }}
- 取消
+ {{ $t('common:cancel') }}
保存权限{{ $t('authCenter:messages.savePermission') }}
@@ -429,6 +486,8 @@
@@ -463,17 +522,72 @@ const queryParams = reactive({
})
const form = reactive(emptyForm())
const claimOptions = [
- { value: 'sub', label: '用户唯一标识(sub)' },
- { value: 'name', label: '姓名(name)' },
- { value: 'email', label: '邮箱(email)' },
- { value: 'roles', label: '角色(roles)' },
- { value: 'preferred_username', label: '登录账号(preferred_username)' },
+ {
+ value: 'sub',
+ get label() {
+ return t('auth:interface.userIdentifierSub')
+ },
+ },
+ {
+ value: 'name',
+ get label() {
+ return t('auth:interface.nameName')
+ },
+ },
+ {
+ value: 'email',
+ get label() {
+ return t('auth:interface.emailEmail')
+ },
+ },
+ {
+ value: 'roles',
+ get label() {
+ return t('auth:interface.rolesRoles')
+ },
+ },
+ {
+ value: 'preferred_username',
+ get label() {
+ return t('auth:interface.loginAccountPreferredUsername')
+ },
+ },
]
const rules = {
- scopeCode: [{ required: true, message: '请输入权限代码', trigger: 'blur' }],
- scopeName: [{ required: true, message: '请输入显示名称', trigger: 'blur' }],
- scopeType: [{ required: true, message: '请选择权限用途', trigger: 'change' }],
- resourceId: [{ required: true, message: '请选择这项权限所属的服务', trigger: 'change' }],
+ scopeCode: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.enterAPermissionCode')
+ },
+ trigger: 'blur',
+ },
+ ],
+ scopeName: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.enterADisplayName')
+ },
+ trigger: 'blur',
+ },
+ ],
+ scopeType: [
+ {
+ required: true,
+ get message() {
+ return t('auth:interface.selectAPermissionPurpose')
+ },
+ trigger: 'change',
+ },
+ ],
+ resourceId: [
+ {
+ required: true,
+ message: () => t('authCenter:messages.chooseTheServiceThisPermissionBelongsTo'),
+ trigger: 'change',
+ },
+ ],
}
/** 创建权限表单默认值 */
@@ -564,7 +678,7 @@ async function submitForm() {
data.resourceId = null
}
await (persisted ? updateOAuthScope(data) : addOAuthScope(data))
- proxy.$modal.msgSuccess('权限已保存')
+ proxy.$modal.msgSuccess(t('authCenter:messages.permissionSaved'))
open.value = false
await getList()
} finally {
@@ -575,7 +689,12 @@ async function submitForm() {
/** 修改权限状态 */
async function changeStatus(row, status) {
try {
- await proxy.$modal.confirm(`${status === '0' ? '启用' : '停用'} Scope “${row.scopeCode}”?`)
+ await proxy.$modal.confirm(
+ t('auth:scope.confirmStatus', {
+ action: status === '0' ? t('system:oauth.enable') : t('system:oauth.disabled'),
+ code: row.scopeCode,
+ })
+ )
await changeOAuthScopeStatus({ scopeCode: row.scopeCode, status })
await getList()
} catch {
@@ -585,9 +704,13 @@ async function changeStatus(row, status) {
/** 删除按钮操作 */
async function handleDelete(row) {
- await proxy.$modal.confirm(`停用权限“${row.scopeName}”后,应用不能再申请这项权限,是否继续?`)
+ await proxy.$modal.confirm(
+ t('auth:interface.disablingPermissionValuePreventsApplicationsFromRequestingItContinue', {
+ value0: row.scopeName,
+ })
+ )
await deleteOAuthScopes(row.scopeCode)
- proxy.$modal.msgSuccess('权限已停用')
+ proxy.$modal.msgSuccess(t('authCenter:messages.permissionDisabled'))
await getList()
}
@@ -604,7 +727,7 @@ function handleRowCommand(command, row) {
/** 获取权限关联的资源服务名称 */
function resourceName(resourceId) {
if (!resourceId) {
- return '统一身份信息'
+ return t('authCenter:messages.unifiedIdentityInformation')
}
return (
resourceOptions.value.find((item) => item.resourceId === resourceId)?.resourceName || resourceId
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/session/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/session/index.vue
index ea7069af8..3b21d91bc 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/session/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/oauth/session/index.vue
@@ -1,10 +1,14 @@
- 强制下线{{ selected.length ? `(${selected.length})` : '' }}
+ {{ $t('authCenter:messages.forceSignOut')
+ }}{{ selected.length ? `(${selected.length})` : '' }}
@@ -76,19 +82,20 @@
type="primary"
icon="el-icon-search"
@click="handleQuery"
- >查找
+ >{{ $t('common:find') }}
清空{{ $t('common:clear') }}
找到 {{ total }} 个会话
+ >{{ $t('layout:interface.found') }} {{ total }}
+ {{ $t('authCenter:messages.sessions') }}
@@ -120,25 +127,29 @@
>
- {{ scope.row.userName || `用户 ${scope.row.userId}` }}
+ {{
+ scope.row.userName || $t('auth:user.fallbackName', { id: scope.row.userId })
+ }}
{{ scope.row.userId || shortId(scope.row.subjectId) }}
- {{ scope.row.ipAddress || '未知地址' }}
+ {{
+ scope.row.ipAddress || $t('authCenter:expression.unknownAddress')
+ }}
{{ authMethodText(scope.row.amr) }}
@@ -153,7 +164,7 @@
尚无关联应用{{ $t('authCenter:messages.noAssociatedApplications') }}
@@ -172,7 +183,7 @@
@@ -180,7 +191,7 @@
@@ -191,7 +202,7 @@
查看{{ $t('common:view') }}
下线{{ $t('authCenter:messages.signOut') }}
-
+
-
将结束 {{ revokeIds.length }} 个外部登录会话
+
{{ $t('auth:session.endCount', { count: revokeIds.length }) }}
- 将终止这些会话的登录状态及离线访问凭据。资源服务通过在线校验感知失效;应用本地登录状态由应用负责清理。
+ {{
+ $t(
+ 'authCenter:messages.thisEndsTheseSessionsAndTheirOfflineAccessCredentialsResourceServicesDetect'
+ )
+ }}
{{ $t('authCenter:messages.signOutReason') }}
- 取消
+ {{ $t('common:cancel') }}
确认下线{{ $t('authCenter:messages.confirmSignOut') }}
@@ -278,7 +293,7 @@
@@ -289,16 +304,16 @@
>
-
{{ detail.userName || detail.userId || '用户' }}
+
{{ detail.userName || detail.userId || $t('system:user.user') }}
- {{ detail.ipAddress || '未知来源地址' }} ·
+ {{ detail.ipAddress || $t('authCenter:expression.unknownSourceAddress') }} ·
{{ authMethodText(detail.amr) }}
{{ statusText(detail.status) }}
- 关联应用
+ {{ $t('authCenter:messages.associatedApplications') }}
尚无关联应用{{ $t('authCenter:messages.noAssociatedApplications') }}
@@ -317,34 +332,34 @@
border
class="detail-descriptions"
>
- {{
+ {{
parseTime(detail.authTime) || '—'
}}
- {{
+ {{
parseTime(detail.lastSeenAt) || '—'
}}
- {{
+ {{
parseTime(detail.idleExpiresAt) || '—'
}}
- {{
+ {{
parseTime(detail.absoluteExpiresAt) || '—'
}}
- {{
+ {{
detail.revokeReason || '—'
}}
- - 会话 ID
+ - {{ $t('monitor:messages.sessionID') }}
- {{ detail.sid }}
- - 用户主体
+ - {{ $t('authCenter:userPrincipal') }}
- {{ detail.subjectId }}
- - 身份版本
+ - {{ $t('authCenter:messages.identityVersion') }}
- {{ detail.authVersion || '—' }}
- - 认证级别
+ - {{ $t('authCenter:messages.authenticationLevel') }}
- {{ detail.acr || '—' }}
@@ -392,7 +409,13 @@ function shortId(value, size = 12) {
/** 获取会话状态名称 */
function statusText(value) {
- return { active: '在线', revoked: '已下线', expired: '已过期' }[value] || '未知状态'
+ return (
+ {
+ active: t('authCenter:messages.online'),
+ revoked: t('authCenter:messages.signedOut'),
+ expired: t('common:expired'),
+ }[value] || t('authCenter:messages.unknownStatus')
+ )
}
/** 获取会话状态标签类型 */
@@ -403,13 +426,15 @@ function statusType(value) {
/** 获取认证方式的展示名称 */
function authMethodText(methods = []) {
const labels = {
- pwd: '密码登录',
- password: '密码登录',
- otp: '动态验证码',
- mfa: '多重验证',
- sms: '短信验证',
+ pwd: t('authCenter:messages.passwordSignIn'),
+ password: t('authCenter:messages.passwordSignIn'),
+ otp: t('authCenter:messages.oneTimeCode'),
+ mfa: t('authCenter:messages.multiFactorAuthentication'),
+ sms: t('authCenter:messages.sMSVerification'),
}
- return methods.length ? methods.map((item) => labels[item] || item).join(' + ') : '登录方式未知'
+ return methods.length
+ ? methods.map((item) => labels[item] || item).join(' + ')
+ : t('authCenter:messages.unknownSignInMethod')
}
/** 查询认证会话列表 */
@@ -451,7 +476,7 @@ async function revoke() {
await revokeOAuthSessions(revokeIds.value.join(','), {
reason: reason.value.trim(),
})
- proxy.$modal.msgSuccess('会话已撤销')
+ proxy.$modal.msgSuccess(t('authCenter:messages.sessionRevoked'))
revokeOpen.value = false
await getList()
} finally {
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/views/system/plugin/components/PluginConfigDialog.vue b/ruoyi-fastapi-frontend/vue2/web/src/views/system/plugin/components/PluginConfigDialog.vue
index 0207eb825..cde6ed2d0 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/views/system/plugin/components/PluginConfigDialog.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/views/system/plugin/components/PluginConfigDialog.vue
@@ -12,6 +12,7 @@
:refresh-key="refreshKey"
/>
格式化 JSON{{ $t('pluginAdmin:messages.formatJSON') }}
@@ -114,21 +115,21 @@
size="small"
type="warning"
effect="plain"
- >必填{{ $t('pluginAdmin:messages.required') }}
敏感{{ $t('pluginAdmin:messages.sensitive') }}
默认 {{ formatConfigDefaultValue(item) }}{{ $t('layout:size.default') }} {{ formatConfigDefaultValue(item) }}
保 存{{ $t('file:messages.save') }}
- 关 闭
+ {{ $t('common:close') }}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
new file mode 100644
index 000000000..28d622896
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
@@ -0,0 +1,32 @@
+import { setMessageTranslator } from './message.mjs'
+import { reactive, toRef } from 'vue'
+import { i18n } from './index'
+
+export const localeState = reactive({ locale: i18n.locale, preference: i18n.preference })
+i18n.engine.on('languageChanged', (locale) => {
+ localeState.locale = locale
+})
+i18n.engine.on('preferenceChanged', (preference) => {
+ localeState.preference = preference
+})
+export const t = (key, options) => {
+ void localeState.locale
+ return i18n.t(key, options)
+}
+export const resolveText = (original, translations) => {
+ void localeState.locale
+ return i18n.resolveText(original, translations)
+}
+export const useI18n = () => ({
+ locale: toRef(localeState, 'locale'),
+ preference: toRef(localeState, 'preference'),
+ t,
+ i18n,
+})
+export default {
+ install(app) {
+ setMessageTranslator(t)
+ app.config.globalProperties.$t = t
+ app.config.globalProperties.$locale = localeState
+ },
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
new file mode 100644
index 000000000..39b9cada1
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
@@ -0,0 +1,28 @@
+import '@/utils/time' // 原生端须先加载 Intl 兼容实现,再初始化 i18next。
+import '@formatjs/intl-pluralrules/locale-data/zh.js'
+import '@formatjs/intl-numberformat/locale-data/zh.js'
+import '@formatjs/intl-datetimeformat/locale-data/zh.js'
+import { createLocaleRuntime } from './runtime.mjs'
+import { meta, resources } from './registry'
+import dayjs from 'dayjs'
+import 'dayjs/locale/zh-cn'
+import 'dayjs/locale/en'
+import config from '@/config'
+
+export const i18n = createLocaleRuntime({
+ meta,
+ resources,
+ storage: {
+ get: (key) => uni.getStorageSync(key),
+ set: (key, value) => uni.setStorageSync(key, value),
+ },
+ scope: 'ruoyi-vue3-mobile:' + (config.baseUrl || ''),
+ deviceLocales: () => [uni.getSystemInfoSync().language],
+ onChange(code, entry) {
+ dayjs.locale(entry.dayjs || 'en')
+ if (typeof uni.setLocale === 'function') uni.setLocale(code)
+ },
+})
+export const t = i18n.t
+export const resolveRouteTitle = (route) => i18n.resolveRouteTitle(route)
+export const refreshDeviceLocale = () => i18n.refreshDeviceLocale()
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
new file mode 100644
index 000000000..c27f81908
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
@@ -0,0 +1,24 @@
+{
+ "sourceLocale": "zh-CN",
+ "defaultLocale": "zh-CN",
+ "locales": [
+ {
+ "code": "zh-CN",
+ "nativeName": "简体中文",
+ "enabled": true,
+ "direction": "ltr",
+ "aliases": ["zh", "zh-Hans"],
+ "fallback": [],
+ "dayjs": "zh-cn"
+ },
+ {
+ "code": "en-US",
+ "nativeName": "English",
+ "enabled": true,
+ "direction": "ltr",
+ "aliases": ["en"],
+ "fallback": ["zh-CN"],
+ "dayjs": "en"
+ }
+ ]
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
new file mode 100644
index 000000000..54cf2991d
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
@@ -0,0 +1,33 @@
+{
+ "language": "Language",
+ "followDevice": "Follow device",
+ "save": "Save",
+ "cancel": "Cancel",
+ "confirm": "Confirm",
+ "loading": "Loading…",
+ "retry": "Retry",
+ "languageSaved": "Language preference saved",
+ "languageFailed": "Could not save the language preference. Please try again.",
+ "login": {
+ "title": "RuoYi Administration",
+ "username": "Username",
+ "password": "Password",
+ "code": "Verification code",
+ "remember": "Remember password",
+ "submit": "Sign in",
+ "signingIn": "Signing in…",
+ "usernameRequired": "Enter your username",
+ "passwordRequired": "Enter your password",
+ "codeRequired": "Enter the verification code"
+ },
+ "network": {
+ "error": "Unable to connect to the server",
+ "timeout": "The request timed out"
+ },
+ "session": {
+ "expired": "Your session has expired. Please sign in again.",
+ "signIn": "Sign in again",
+ "stay": "Stay on this page"
+ },
+ "notice": "Notice"
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/mobile.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/mobile.json
new file mode 100644
index 000000000..dfcb3e866
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/mobile.json
@@ -0,0 +1,251 @@
+{
+ "app": {
+ "title": "RuoYi-FastAPI Mobile",
+ "comingSoon": "Coming soon",
+ "systemNotice": "System notice"
+ },
+ "home": {
+ "search": "Search...",
+ "healthy": "All systems operational",
+ "updated": "Just updated",
+ "productivity": "Productivity",
+ "notifications": "New notifications",
+ "tasks": "Pending tasks",
+ "shortcuts": "Quick access",
+ "requests": "Requests",
+ "news": "News",
+ "statistics": "Statistics",
+ "plans": "Plans",
+ "recent": "Recent updates",
+ "viewAll": "View all",
+ "leaveRequest": "Leave request",
+ "awaitingApproval": "Awaiting manager approval",
+ "pending": "Pending",
+ "weeklyReport": "Weekly report",
+ "submitted": "Submitted successfully",
+ "completed": "Completed",
+ "greeting": "Hello, {{name}}",
+ "welcome": "Welcome back"
+ },
+ "auth": {
+ "usernamePlaceholder": "Enter your username",
+ "passwordPlaceholder": "Enter your password",
+ "signingIn": "Signing in, please wait...",
+ "loginTitle": "Sign in to RuoYi-FastAPI Mobile",
+ "login": "Sign in",
+ "noAccount": "No account?",
+ "registerNow": "Register now",
+ "acceptTerms": "By signing in, you agree to the",
+ "agreementLink": "Terms of Service",
+ "and": "and",
+ "privacyLink": "Privacy Policy",
+ "confirmPasswordRequired": "Enter your password again",
+ "registering": "Registering, please wait...",
+ "registerTitle": "Register for RuoYi-FastAPI Mobile",
+ "confirmPasswordPlaceholder": "Enter your password again",
+ "register": "Register",
+ "existingAccount": "Sign in with an existing account",
+ "registerSuccess": "Your account {{username}} has been registered successfully!"
+ },
+ "about": {
+ "version": "Version",
+ "email": "Email",
+ "hotline": "Service hotline",
+ "website": "Website",
+ "title": "About us"
+ },
+ "avatar": {
+ "generating": "Generating image...",
+ "choose": "Choose avatar"
+ },
+ "actions": {
+ "updated": "Updated successfully",
+ "submit": "Submit",
+ "saveFailed": "Could not save. Please try again."
+ },
+ "help": {
+ "product": "About RuoYi-FastAPI",
+ "openSourceQuestion": "Is RuoYi-FastAPI open source?",
+ "openSourceAnswer": "Yes, it is open source.",
+ "commercialQuestion": "Can RuoYi-FastAPI be used commercially?",
+ "commercialAnswer": "Yes.",
+ "websiteQuestion": "What is the RuoYi-FastAPI website?",
+ "docsQuestion": "Where is the RuoYi-FastAPI documentation?",
+ "other": "Other questions",
+ "signOutQuestion": "How do I sign out?",
+ "signOutAnswer": "Go to Me > Settings > Sign out.",
+ "avatarQuestion": "How do I change my avatar?",
+ "avatarAnswer": "Go to Me, choose your avatar, then tap Submit.",
+ "passwordQuestion": "How do I change my password?",
+ "passwordAnswer": "Go to Me > Settings > Change password.",
+ "title": "FAQ"
+ },
+ "profile": {
+ "view": "View profile",
+ "signIn": "Tap to sign in",
+ "community": "Community",
+ "support": "Online support",
+ "feedback": "Feedback community",
+ "like": "Like us",
+ "edit": "Edit profile",
+ "male": "Male",
+ "female": "Female",
+ "nicknameRequired": "Nickname is required",
+ "phoneRequired": "Phone number is required",
+ "phoneInvalid": "Enter a valid phone number",
+ "emailRequired": "Email address is required",
+ "emailInvalid": "Enter a valid email address",
+ "nickname": "Nickname",
+ "nicknamePlaceholder": "Enter your nickname",
+ "phone": "Phone number",
+ "phonePlaceholder": "Enter your phone number",
+ "email": "Email",
+ "emailPlaceholder": "Enter your email address",
+ "sex": "Gender",
+ "shortNickname": "Nickname",
+ "post": "Post",
+ "role": "Role",
+ "createdAt": "Created on"
+ },
+ "settings": {
+ "title": "Settings",
+ "signOutConfirm": "Are you sure you want to sign out?",
+ "checkUpdates": "Check for updates",
+ "clearCache": "Clear cache",
+ "signOut": "Sign out"
+ },
+ "password": {
+ "oldRequired": "Current password is required",
+ "newRequired": "New password is required",
+ "length": "Use 6 to 20 characters",
+ "confirmRequired": "Confirm your password",
+ "mismatch": "The passwords do not match",
+ "old": "Current password",
+ "oldPlaceholder": "Enter your current password",
+ "new": "New password",
+ "newPlaceholder": "Enter your new password",
+ "confirm": "Confirm password",
+ "confirmPlaceholder": "Confirm your new password",
+ "title": "Change password"
+ },
+ "timezone": {
+ "title": "Time zone",
+ "saved": "Time zone saved",
+ "profileFailed": "Could not load account settings. Try saving again or reopen this page.",
+ "automatic": "Follow device automatically",
+ "display": "Display time zone",
+ "searchPlaceholder": "Search time zones, e.g. Asia/Shanghai",
+ "search": "Search time zones",
+ "choose": "Choose display time zone",
+ "noResults": "No matching time zones. Try another search.",
+ "loadFailed": "Could not load time zones. You can still use your current time zone.",
+ "preview": "Time preview",
+ "previewZone": "Preview time zone:",
+ "previewTime": "Time preview:",
+ "deviceFallback": "The device time zone could not be detected. The system time zone is used; you can also choose one manually.",
+ "hint": "Used for displayed times, date filters and exports. Scheduled tasks and business statistics use their own time zones.",
+ "save": "Save time zone"
+ },
+ "work": {
+ "ai": "AI productivity",
+ "chat": "AI chat",
+ "assistant": "AI assistant",
+ "image": "Image generation",
+ "studio": "Creative studio",
+ "system": "System management",
+ "users": "Users",
+ "roles": "Roles",
+ "departments": "Departments",
+ "config": "Configuration",
+ "dictionaries": "Dictionaries",
+ "notices": "Announcements",
+ "logs": "Logs",
+ "more": "More",
+ "subtitle": "Workspace"
+ },
+ "errors": {
+ "unauthorized": "Authentication failed. Unable to access system resources.",
+ "forbidden": "You do not have permission to perform this action.",
+ "notFound": "The requested resource does not exist.",
+ "unknown": "An unknown error occurred. Please contact the administrator.",
+ "sessionInvalid": "Your session is invalid or has expired. Please sign in again.",
+ "uploadResponse": "Invalid upload response",
+ "upload": "Upload failed",
+ "httpStatus": "Server request failed ({{status}})"
+ },
+ "agreement": {
+ "title": "User agreement",
+ "acceptance": {
+ "title": "1. Acceptance of the terms of service",
+ "body": "Welcome to the RuoYi-FastAPI mobile framework (the Product). RuoYi-FastAPI owns and operates the Product. Read this agreement carefully before use. By clicking Agree or using the services, you acknowledge that you have read and accepted all terms of this agreement."
+ },
+ "security": {
+ "title": "2. Accounts and security",
+ "body": "Provide true, accurate, current and complete personal information when registering. You are responsible for protecting your account and password and for all activities under your account. Notify us immediately if you discover unauthorized use."
+ },
+ "conduct": {
+ "title": "3. User conduct",
+ "body": "You must comply with applicable laws and regulations when using the Product. Do not use it for unlawful activities, including publishing false information, infringing intellectual property, distributing obscene content or conducting cyberattacks."
+ },
+ "changes": {
+ "title": "4. Changes, interruptions and termination of services",
+ "body": "Due to the nature of network services, we may change, interrupt or terminate some or all services at any time. We will try to announce interruptions caused by maintenance or network failures in advance, but accept no liability for resulting losses."
+ },
+ "intellectualProperty": {
+ "title": "5. Intellectual property",
+ "body": "All content in the Product, including text, images, audio, video and software code, belongs to RuoYi-FastAPI or the respective rights holders. Unauthorized use, copying, modification or distribution is prohibited."
+ },
+ "disclaimer": {
+ "title": "6. Disclaimer",
+ "body": "The Product is provided as is, without express or implied warranties. We accept no liability for interruptions or data loss caused by force majeure, cyberattacks or system instability."
+ },
+ "updated": "Updated: January 1, 2024"
+ },
+ "privacy": {
+ "title": "Privacy policy",
+ "intro": "RuoYi-FastAPI takes your privacy seriously. This policy explains how we collect, use, store and protect your personal information. Read it carefully before using the Product.",
+ "collection": {
+ "title": "1. Collection and use of personal information",
+ "body": "To provide better services, we may collect the following information:",
+ "account": "• Account information: when you register or sign in, we collect your username, password, mobile number and related information.",
+ "device": "• Device information: to keep your account secure and improve services, we collect your device model, operating system version and unique device identifier.",
+ "log": "• Log information: we automatically collect operation logs, IP addresses and access times when you use the Product."
+ },
+ "sharing": {
+ "title": "2. Sharing, transfer and disclosure of personal information",
+ "body": "We do not share, transfer or publicly disclose your personal information to third parties, except:",
+ "consent": "• With your explicit authorization or consent;",
+ "law": "• As required by laws, regulations or judicial authorities;",
+ "publicInterest": "• To protect national security, public safety or substantial public interests."
+ },
+ "protection": {
+ "title": "3. Protection of personal information",
+ "body": "We use measures including encryption, access controls and security audits to protect your information. We strive to prevent unauthorized access, alteration or disclosure."
+ },
+ "rights": {
+ "title": "4. Your rights",
+ "body": "You may access, correct or delete your personal information and close your account. To exercise these rights, contact us using the details in the Contact us section."
+ },
+ "updates": {
+ "title": "5. Updates to this policy",
+ "body": "We may update this policy as laws or our business change. Updates will be published in the Product, and we will notify you appropriately before they take effect."
+ },
+ "contact": {
+ "title": "6. Contact us",
+ "body": "For questions or suggestions about this policy, please contact us:",
+ "email": "Email: xxx@xxx.com"
+ },
+ "updated": "Updated: January 1, 2024"
+ },
+ "nav": {
+ "home": "Home",
+ "work": "Workspace",
+ "mine": "Me",
+ "login": "Sign in",
+ "register": "Register",
+ "avatar": "Change avatar",
+ "profile": "Profile",
+ "web": "Web page",
+ "text": "Text"
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/utility.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/utility.json
new file mode 100644
index 000000000..237fa9876
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/utility.json
@@ -0,0 +1,37 @@
+{
+ "weekday": {
+ "sunday": "Sun",
+ "monday": "Mon",
+ "tuesday": "Tue",
+ "wednesday": "Wed",
+ "thursday": "Thu",
+ "friday": "Fri",
+ "saturday": "Sat"
+ },
+ "timezone": {
+ "invalid": "Invalid IANA time zone: {{timezoneName}}",
+ "invalidDateTime": "Invalid date and time: {{value}}",
+ "nonexistent": "{{value}} does not exist in {{timezoneName}}. Choose a valid time after the daylight saving transition.",
+ "ambiguous": "{{value}} occurs twice in {{timezoneName}}. Select a UTC offset.",
+ "invalidDate": "Invalid date: {{value}}",
+ "invalidField": "Field {{field}} contains an invalid RFC 3339 timestamp"
+ },
+ "crypto": {
+ "randomFormat": "Unsupported random value format: tag={{arg0}}, keys={{arg1}}",
+ "randomUnavailable": "Secure random numbers are unavailable in this environment",
+ "publicKeyFailed": "Could not retrieve the transport public key",
+ "keyProtocol": "Unsupported transport public key protocol version",
+ "keyAlgorithm": "Unsupported transport public key algorithm",
+ "responseProtocol": "Unsupported transport response protocol version",
+ "responseAlgorithm": "Unsupported transport response algorithm",
+ "keyVersion": "Transport response key version mismatch",
+ "headerVersion": "Transport response header and body key versions do not match",
+ "aad": "Invalid transport response AAD",
+ "requestMismatch": "The transport response method/path does not match the request",
+ "direction": "Invalid transport response direction",
+ "queryLength": "Encrypted GET/DELETE parameters are too long. Use POST or reduce the query parameters.",
+ "missingContext": "Missing response decryption context",
+ "envelope": "Invalid transport response envelope",
+ "randomPool": "The secure random pool is exhausted and this environment cannot refill it synchronously"
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
new file mode 100644
index 000000000..177446f56
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
@@ -0,0 +1,33 @@
+{
+ "language": "语言",
+ "followDevice": "跟随设备",
+ "save": "保存",
+ "cancel": "取消",
+ "confirm": "确定",
+ "loading": "加载中…",
+ "retry": "重试",
+ "languageSaved": "语言设置已保存",
+ "languageFailed": "语言设置保存失败,请重试",
+ "login": {
+ "title": "若依管理系统",
+ "username": "账号",
+ "password": "密码",
+ "code": "验证码",
+ "remember": "记住密码",
+ "submit": "登录",
+ "signingIn": "登录中…",
+ "usernameRequired": "请输入您的账号",
+ "passwordRequired": "请输入您的密码",
+ "codeRequired": "请输入验证码"
+ },
+ "network": {
+ "error": "后端接口连接异常",
+ "timeout": "系统接口请求超时"
+ },
+ "session": {
+ "expired": "登录状态已过期,请重新登录。",
+ "signIn": "重新登录",
+ "stay": "留在此页"
+ },
+ "notice": "提示"
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/mobile.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/mobile.json
new file mode 100644
index 000000000..0ef2d78bb
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/mobile.json
@@ -0,0 +1,251 @@
+{
+ "app": {
+ "title": "RuoYi-FastAPI移动端",
+ "comingSoon": "模块建设中~",
+ "systemNotice": "系统提示"
+ },
+ "home": {
+ "search": "搜索...",
+ "healthy": "系统运行正常",
+ "updated": "刚刚更新",
+ "productivity": "工作效率",
+ "notifications": "新通知",
+ "tasks": "待办任务",
+ "shortcuts": "快捷入口",
+ "requests": "申请",
+ "news": "新闻",
+ "statistics": "统计",
+ "plans": "计划",
+ "recent": "最近更新",
+ "viewAll": "查看全部",
+ "leaveRequest": "请假申请",
+ "awaitingApproval": "等待经理审批",
+ "pending": "待处理",
+ "weeklyReport": "周报",
+ "submitted": "提交成功",
+ "completed": "已完成",
+ "greeting": "你好,{{name}}",
+ "welcome": "欢迎回来"
+ },
+ "auth": {
+ "usernamePlaceholder": "请输入账号",
+ "passwordPlaceholder": "请输入密码",
+ "signingIn": "登录中,请耐心等待...",
+ "loginTitle": "RuoYi-FastAPI移动端登录",
+ "login": "登 录",
+ "noAccount": "没有账号?",
+ "registerNow": "立即注册",
+ "acceptTerms": "登录即代表同意",
+ "agreementLink": "《用户协议》",
+ "and": "和",
+ "privacyLink": "《隐私协议》",
+ "confirmPasswordRequired": "请再次输入您的密码",
+ "registering": "注册中,请耐心等待...",
+ "registerTitle": "RuoYi-FastAPI移动端注册",
+ "confirmPasswordPlaceholder": "请输入重复密码",
+ "register": "注 册",
+ "existingAccount": "使用已有账号登录",
+ "registerSuccess": "恭喜你,您的账号 {{username}} 注册成功!"
+ },
+ "about": {
+ "version": "版本信息",
+ "email": "官方邮箱",
+ "hotline": "服务热线",
+ "website": "公司网站",
+ "title": "关于我们"
+ },
+ "avatar": {
+ "generating": "图片生成中...",
+ "choose": "选择头像"
+ },
+ "actions": {
+ "updated": "修改成功",
+ "submit": "提交",
+ "saveFailed": "保存失败,请重试"
+ },
+ "help": {
+ "product": "RuoYi-FastAPI问题",
+ "openSourceQuestion": "RuoYi-FastAPI开源吗?",
+ "openSourceAnswer": "开源",
+ "commercialQuestion": "RuoYi-FastAPI可以商用吗?",
+ "commercialAnswer": "可以",
+ "websiteQuestion": "RuoYi-FastAPI官网地址多少?",
+ "docsQuestion": "RuoYi-FastAPI文档地址多少?",
+ "other": "其他问题",
+ "signOutQuestion": "如何退出登录?",
+ "signOutAnswer": "请点击[我的] - [应用设置] - [退出登录]即可退出登录",
+ "avatarQuestion": "如何修改用户头像?",
+ "avatarAnswer": "请点击[我的] - [选择头像] - [点击提交]即可更换用户头像",
+ "passwordQuestion": "如何修改登录密码?",
+ "passwordAnswer": "请点击[我的] - [应用设置] - [修改密码]即可修改登录密码",
+ "title": "常见问题"
+ },
+ "profile": {
+ "view": "查看个人信息",
+ "signIn": "点击登录",
+ "community": "交流群",
+ "support": "在线客服",
+ "feedback": "反馈社区",
+ "like": "点赞我们",
+ "edit": "编辑资料",
+ "male": "男",
+ "female": "女",
+ "nicknameRequired": "用户昵称不能为空",
+ "phoneRequired": "手机号码不能为空",
+ "phoneInvalid": "请输入正确的手机号码",
+ "emailRequired": "邮箱地址不能为空",
+ "emailInvalid": "请输入正确的邮箱地址",
+ "nickname": "用户昵称",
+ "nicknamePlaceholder": "请输入昵称",
+ "phone": "手机号码",
+ "phonePlaceholder": "请输入手机号码",
+ "email": "邮箱",
+ "emailPlaceholder": "请输入邮箱",
+ "sex": "性别",
+ "shortNickname": "昵称",
+ "post": "岗位",
+ "role": "角色",
+ "createdAt": "创建日期"
+ },
+ "settings": {
+ "title": "应用设置",
+ "signOutConfirm": "确定注销并退出系统吗?",
+ "checkUpdates": "检查更新",
+ "clearCache": "清理缓存",
+ "signOut": "退出登录"
+ },
+ "password": {
+ "oldRequired": "旧密码不能为空",
+ "newRequired": "新密码不能为空",
+ "length": "长度在 6 到 20 个字符",
+ "confirmRequired": "确认密码不能为空",
+ "mismatch": "两次输入的密码不一致",
+ "old": "旧密码",
+ "oldPlaceholder": "请输入旧密码",
+ "new": "新密码",
+ "newPlaceholder": "请输入新密码",
+ "confirm": "确认密码",
+ "confirmPlaceholder": "请确认新密码",
+ "title": "修改密码"
+ },
+ "timezone": {
+ "title": "时区设置",
+ "saved": "时区设置已保存",
+ "profileFailed": "账号设置读取失败,请重试保存或重新进入页面",
+ "automatic": "自动跟随设备",
+ "display": "显示时区",
+ "searchPlaceholder": "搜索时区,例如 Asia/Shanghai",
+ "search": "搜索时区",
+ "choose": "选择显示时区",
+ "noResults": "没有匹配的时区,请修改搜索词。",
+ "loadFailed": "时区列表加载失败,仍可使用当前时区。",
+ "preview": "时间预览",
+ "previewZone": "预览时区:",
+ "previewTime": "时间预览:",
+ "deviceFallback": "当前设备无法识别时区,已使用系统时区;你也可以手动选择。",
+ "hint": "用于时间显示、日期筛选和导出。定时任务和业务统计使用各自配置的时区。",
+ "save": "保存时区"
+ },
+ "work": {
+ "ai": "AI 生产力",
+ "chat": "智能对话",
+ "assistant": "智能助手",
+ "image": "图像生成",
+ "studio": "创意工坊",
+ "system": "系统管理",
+ "users": "用户管理",
+ "roles": "角色管理",
+ "departments": "部门管理",
+ "config": "配置管理",
+ "dictionaries": "字典管理",
+ "notices": "通知公告",
+ "logs": "日志管理",
+ "more": "更多",
+ "subtitle": "工作台"
+ },
+ "errors": {
+ "unauthorized": "认证失败,无法访问系统资源",
+ "forbidden": "当前操作没有权限",
+ "notFound": "访问资源不存在",
+ "unknown": "系统未知错误,请反馈给管理员",
+ "sessionInvalid": "无效的会话,或者会话已过期,请重新登录。",
+ "uploadResponse": "上传响应格式不正确",
+ "upload": "上传失败",
+ "httpStatus": "系统接口 {{status}} 异常"
+ },
+ "agreement": {
+ "title": "用户协议",
+ "acceptance": {
+ "title": "1. 服务条款的确认和接纳",
+ "body": "欢迎使用RuoYi-FastAPI移动端框架(以下简称“本产品”)。本产品的服务所有权和运作权归RuoYi-FastAPI所有。用户在使用本产品前,请仔细阅读本协议。当您点击“同意”或实际使用本产品服务时,即视为您已阅读并完全同意本协议的所有条款。"
+ },
+ "security": {
+ "title": "2. 用户账号与安全",
+ "body": "您在注册账号时,应提供真实、准确、最新和完整的个人资料。您有责任维护账号和密码的安全,并对以您账号进行的所有活动承担法律责任。如发现账号被非法使用,请立即通知我们。"
+ },
+ "conduct": {
+ "title": "3. 用户行为规范",
+ "body": "用户在使用本产品过程中,必须遵守国家法律法规,不得利用本产品从事违法违规活动,包括但不限于:发布虚假信息、侵犯他人知识产权、传播淫秽色情信息、进行网络攻击等。"
+ },
+ "changes": {
+ "title": "4. 服务内容的变更、中断或终止",
+ "body": "鉴于网络服务的特殊性,我们有权随时变更、中断或终止部分或全部网络服务。对于因服务器维护、网络故障等原因导致的服务中断,我们将尽量提前公告,但不对因此产生的损失承担责任。"
+ },
+ "intellectualProperty": {
+ "title": "5. 知识产权声明",
+ "body": "本产品包含的所有内容(包括但不限于文字、图片、音频、视频、软件代码等)的知识产权归RuoYi-FastAPI或相关权利人所有。未经授权,任何人不得擅自使用、复制、修改或传播。"
+ },
+ "disclaimer": {
+ "title": "6. 免责声明",
+ "body": "本产品按“现状”提供,不包含任何明示或暗示的保证。我们不对因不可抗力、黑客攻击、系统不稳定等原因导致的服务中断或数据丢失承担责任。"
+ },
+ "updated": "更新日期:2024年01月01日"
+ },
+ "privacy": {
+ "title": "隐私协议",
+ "intro": "RuoYi-FastAPI非常重视您的隐私保护。本隐私政策旨在向您说明我们如何收集、使用、存储和保护您的个人信息。请您在使用本产品前仔细阅读本政策。",
+ "collection": {
+ "title": "1. 我们如何收集和使用您的个人信息",
+ "body": "为了向您提供更好的服务,我们可能会收集您的以下信息:",
+ "account": "• 账号信息:当您注册或登录时,我们需要收集您的用户名、密码、手机号码等信息。",
+ "device": "• 设备信息:为了保障账户安全和优化服务,我们会收集您的设备型号、操作系统版本、唯一设备标识符等信息。",
+ "log": "• 日志信息:当您使用本产品时,我们会自动收集您的操作日志、IP地址、访问时间等信息。"
+ },
+ "sharing": {
+ "title": "2. 我们如何共享、转让、公开披露您的个人信息",
+ "body": "我们不会向任何第三方共享、转让或公开披露您的个人信息,但以下情况除外:",
+ "consent": "• 获得您的明确授权或同意;",
+ "law": "• 根据法律法规或司法机关的要求;",
+ "publicInterest": "• 为了维护国家安全、公共安全或重大公共利益。"
+ },
+ "protection": {
+ "title": "3. 我们如何保护您的个人信息",
+ "body": "我们采取了多种安全措施来保护您的个人信息,包括数据加密、访问控制、安全审计等。我们会尽力防止您的信息被未经授权的访问、篡改或泄露。"
+ },
+ "rights": {
+ "title": "4. 您的权利",
+ "body": "您有权访问、更正或删除您的个人信息。您也可以随时注销账号。如您需要行使这些权利,请通过“联系我们”章节中的方式与我们联系。"
+ },
+ "updates": {
+ "title": "5. 本政策如何更新",
+ "body": "随着法律法规的变化或业务的发展,我们可能会不时更新本隐私政策。更新后的政策将在本产品中发布,并在生效前通过适当方式通知您。"
+ },
+ "contact": {
+ "title": "6. 联系我们",
+ "body": "如果您对本隐私政策有任何疑问或建议,请通过以下方式联系我们:",
+ "email": "邮箱:xxx@xxx.com"
+ },
+ "updated": "更新日期:2024年01月01日"
+ },
+ "nav": {
+ "home": "首页",
+ "work": "工作台",
+ "mine": "我的",
+ "login": "登录",
+ "register": "注册",
+ "avatar": "修改头像",
+ "profile": "个人信息",
+ "web": "浏览网页",
+ "text": "浏览文本"
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/utility.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/utility.json
new file mode 100644
index 000000000..fcd259da8
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/utility.json
@@ -0,0 +1,37 @@
+{
+ "weekday": {
+ "sunday": "日",
+ "monday": "一",
+ "tuesday": "二",
+ "wednesday": "三",
+ "thursday": "四",
+ "friday": "五",
+ "saturday": "六"
+ },
+ "timezone": {
+ "invalid": "无效的 IANA 时区: {{timezoneName}}",
+ "invalidDateTime": "无效的日期时间: {{value}}",
+ "nonexistent": "{{value}} 在 {{timezoneName}} 不存在,请选择夏令时跳转后的有效时间",
+ "ambiguous": "{{value}} 在 {{timezoneName}} 出现两次,请选择 UTC 偏移",
+ "invalidDate": "无效的日期: {{value}}",
+ "invalidField": "字段 {{field}} 包含无效的 RFC 3339 时间"
+ },
+ "crypto": {
+ "randomFormat": "平台随机数返回结果格式不受支持: tag={{arg0}}, keys={{arg1}}",
+ "randomUnavailable": "当前运行环境缺少安全随机数能力",
+ "publicKeyFailed": "获取传输层公钥失败",
+ "keyProtocol": "传输层公钥协议版本不受支持",
+ "keyAlgorithm": "传输层公钥算法不受支持",
+ "responseProtocol": "传输层响应协议版本不受支持",
+ "responseAlgorithm": "传输层响应算法不受支持",
+ "keyVersion": "传输层响应密钥版本不匹配",
+ "headerVersion": "传输层响应头与响应体密钥版本不一致",
+ "aad": "传输层响应AAD不合法",
+ "requestMismatch": "传输层响应的method/path与当前请求不匹配",
+ "direction": "传输层响应方向标识不合法",
+ "queryLength": "当前GET/DELETE请求参数加密后长度超限,请改用POST请求或精简查询条件",
+ "missingContext": "缺少响应解密上下文",
+ "envelope": "传输层响应信封格式不合法",
+ "randomPool": "传输加密随机数池不足,且当前运行环境无法同步补充安全随机数"
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/message.mjs b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/message.mjs
new file mode 100644
index 000000000..8f293acfa
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/message.mjs
@@ -0,0 +1,10 @@
+let translator
+
+/** 构建配置和协议工具可独立运行,界面启动后由调用方注入翻译器。 */
+export function setMessageTranslator(value) {
+ translator = value
+}
+
+export function translateMessage(key, fallback, options) {
+ return translator ? translator(key, options) : fallback
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
new file mode 100644
index 000000000..3b2526b51
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
@@ -0,0 +1,15 @@
+/** 只提交编辑过的译文,空值表示删除,未出现的语言保持不变。 */
+export function updateTranslationPatch(patch, original, locale, value) {
+ const next = { ...patch }
+ if (value === (original?.[locale] || '')) delete next[locale]
+ else next[locale] = value || null
+ return next
+}
+
+/** 兼容旧缓存并保留业务键值,译文只影响显示标签。 */
+export function localizeDictionary(items, resolveText) {
+ return items.map((item) => ({
+ ...item,
+ label: resolveText(item.originalLabel ?? item.label, item.labelI18n),
+ }))
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/navigation.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/navigation.js
new file mode 100644
index 000000000..668d69663
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/navigation.js
@@ -0,0 +1,35 @@
+import { t } from './adapter'
+
+const pageTitles = {
+ 'pages/login': () => t('mobile:nav.login'),
+ 'pages/register': () => t('mobile:nav.register'),
+ 'pages/index': () => t('mobile:app.title'),
+ 'pages/work/index': () => t('mobile:nav.work'),
+ 'pages/mine/index': () => t('mobile:nav.mine'),
+ 'pages/mine/avatar/index': () => t('mobile:nav.avatar'),
+ 'pages/mine/info/index': () => t('mobile:nav.profile'),
+ 'pages/mine/info/edit': () => t('mobile:profile.edit'),
+ 'pages/mine/pwd/index': () => t('mobile:password.title'),
+ 'pages/mine/setting/index': () => t('mobile:settings.title'),
+ 'pages/mine/setting/timezone': () => t('mobile:timezone.title'),
+ 'pages/mine/help/index': () => t('mobile:help.title'),
+ 'pages/mine/about/index': () => t('mobile:about.title'),
+ 'pages/common/agreement/index': () => t('mobile:agreement.title'),
+ 'pages/common/privacy/index': () => t('mobile:privacy.title'),
+ 'pages/common/webview/index': () => t('mobile:nav.web'),
+ 'pages/common/textview/index': () => t('mobile:nav.text'),
+}
+
+/** 同步页面标题和原生标签,保留外部网页、文本内容的自定义标题。 */
+export function refreshNavigation() {
+ const pages = getCurrentPages()
+ const page = pages[pages.length - 1]
+ const title = page && pageTitles[page.route]
+ if (title && !page.options?.title && !page.$page?.options?.title) {
+ uni.setNavigationBarTitle({ title: title() })
+ }
+ const labels = [t('mobile:nav.home'), t('mobile:nav.work'), t('mobile:nav.mine')]
+ labels.forEach((text, index) => {
+ uni.setTabBarItem({ index, text, fail() {} })
+ })
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
new file mode 100644
index 000000000..b303c6cdf
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+import { getInfo } from '@/api/login'
+import { i18n } from './index'
+
+/**
+ * 保存当前账号或访客的语言偏好。
+ *
+ * @param {string} preference 语言标识或 auto
+ * @returns {Promise} 偏好保存与界面切换结果
+ */
+export function saveLocale(preference) {
+ return i18n.setPreference(preference, {
+ save: (locale) =>
+ request({ url: '/system/user/profile/locale', method: 'put', data: { locale } }),
+ readBack: async () => (await getInfo()).user?.locale,
+ })
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/registry.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/registry.js
new file mode 100644
index 000000000..04455c649
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/registry.js
@@ -0,0 +1,15 @@
+import meta from './locale-meta.json'
+import zh from './locales/zh-CN/common.json'
+import en from './locales/en-US/common.json'
+
+import zhMobile from './locales/zh-CN/mobile.json'
+import enMobile from './locales/en-US/mobile.json'
+
+import zhUtility from './locales/zh-CN/utility.json'
+import enUtility from './locales/en-US/utility.json'
+
+export { meta }
+export const resources = {
+ 'zh-CN': { utility: zhUtility, common: zh, mobile: zhMobile },
+ 'en-US': { utility: enUtility, common: en, mobile: enMobile },
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
new file mode 100644
index 000000000..83a07012c
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
@@ -0,0 +1,216 @@
+import { createInstance } from 'i18next'
+
+/**
+ * 规范化语言标识,兼容使用下划线的设备语言。
+ *
+ * @param {string} value 原始语言标识
+ * @returns {string|null} 规范化后的语言标识,无效时返回 null
+ */
+export function normalizeLocale(value) {
+ if (typeof value !== 'string' || value.length > 63) return null
+ value = value.trim().replace(/_/g, '-')
+ if (/^x(?:-[a-z0-9]{1,8})+$/i.test(value)) return value.toLowerCase()
+ try {
+ return Intl.getCanonicalLocales(value.trim().replace(/_/g, '-'))[0] || null
+ } catch {
+ return null
+ }
+}
+
+/**
+ * 校验当前应用的语言注册表、资源和回退链。
+ *
+ * @param {Object} meta 当前应用的语言元数据
+ * @param {Object} resources 按语言和命名空间组织的词库
+ * @returns {Object} 语言匹配与回退查询接口
+ */
+export function createLocaleRegistry(meta, resources) {
+ const entries = meta.locales.filter((item) => item.enabled)
+ const byCode = new Map(entries.map((item) => [item.code, item]))
+ for (const key of [meta.sourceLocale, meta.defaultLocale]) {
+ if (!byCode.has(key)) throw new Error(`Unregistered locale: ${key}`)
+ }
+ const aliases = new Map()
+ const visit = (code, path = []) => {
+ if (path.includes(code)) throw new Error(`Locale fallback cycle: ${code}`)
+ const entry = byCode.get(code)
+ if (!entry || !resources[code]) throw new Error(`Missing locale resources: ${code}`)
+ for (const fallback of entry.fallback || []) visit(fallback, [...path, code])
+ }
+ for (const entry of entries) {
+ if (normalizeLocale(entry.code) !== entry.code)
+ throw new Error(`Noncanonical locale: ${entry.code}`)
+ visit(entry.code)
+ for (const alias of entry.aliases || []) {
+ const code = normalizeLocale(alias)
+ if (!code || aliases.has(code)) throw new Error(`Conflicting locale alias: ${alias}`)
+ aliases.set(code, entry.code)
+ }
+ }
+ function match(value) {
+ const code = normalizeLocale(value)
+ return byCode.has(code) ? code : aliases.get(code)
+ }
+ return {
+ entries,
+ resolve(value, devices = []) {
+ const candidates = value === 'auto' ? devices : [value]
+ for (const candidate of candidates) {
+ const code = match(candidate)
+ if (code) return code
+ }
+ return meta.defaultLocale
+ },
+ chain(code) {
+ const result = []
+ const append = (value) => {
+ if (result.includes(value)) return
+ result.push(value)
+ for (const fallback of byCode.get(value)?.fallback || []) append(fallback)
+ }
+ append(code)
+ append(meta.sourceLocale)
+ return result
+ },
+ get: (code) => byCode.get(code),
+ }
+}
+
+/**
+ * 创建当前应用独立的国际化实例,隔离账号和访客的语言偏好。
+ *
+ * @param {Object} options 当前应用的语言、存储和设备适配配置
+ * @returns {Object} 翻译、语言切换与偏好管理接口
+ */
+export function createLocaleRuntime({
+ meta,
+ resources,
+ storage,
+ scope,
+ deviceLocales = () => [],
+ onChange = () => {},
+}) {
+ const registry = createLocaleRegistry(meta, resources)
+ const engine = createInstance()
+ let account = null
+ let generation = 0
+ let preference = meta.defaultLocale
+ let queue = Promise.resolve()
+ const storageKey = () => `${scope}:locale:v1:${account === null ? 'guest' : `user:${account}`}`
+ const validPreference = (value) => (value === 'auto' ? value : normalizeLocale(value))
+ engine.init({
+ resources,
+ lng: meta.defaultLocale,
+ initAsync: false,
+ defaultNS: 'common',
+ ns: Object.keys(resources[meta.sourceLocale]),
+ load: 'currentOnly',
+ supportedLngs: registry.entries.map((item) => item.code),
+ fallbackLng: (code) => registry.chain(code).slice(1),
+ interpolation: { escapeValue: false },
+ returnNull: false,
+ returnEmptyString: false,
+ })
+ function commit(value, persist = true) {
+ preference = value
+ const code = registry.resolve(value, deviceLocales())
+ // 各端均同步打包当前语言及回退词库,切换时可直接取词。
+ engine.changeLanguage(code)
+ if (persist) storage.set(storageKey(), value)
+ onChange(code, registry.get(code))
+ engine.emit('preferenceChanged', value)
+ }
+ function restore() {
+ commit(validPreference(storage.get(storageKey())) || meta.defaultLocale, false)
+ }
+ const runtime = {
+ engine,
+ registry,
+ t: (key, options) => engine.t(key, options),
+ get locale() {
+ return engine.language
+ },
+ get preference() {
+ return preference
+ },
+ get accountId() {
+ return account
+ },
+ get headers() {
+ return { 'Accept-Language': engine.language, 'X-I18n-Version': '1' }
+ },
+ initialize(hasSession = false) {
+ const previous = hasSession ? storage.get(`${scope}:locale:account`) : null
+ account =
+ previous === null || previous === undefined || previous === '' ? null : String(previous)
+ restore()
+ },
+ /**
+ * 切换账号并使旧账号尚未完成的语言切换失效。
+ *
+ * @param {string|number|null} id 当前账号标识,null 表示访客
+ * @param {string} value 服务端返回的语言偏好
+ */
+ setAccount(id, value = meta.defaultLocale) {
+ generation++
+ account = id === null || id === undefined ? null : String(id)
+ storage.set(`${scope}:locale:account`, account || '')
+ if (account === null) restore()
+ else commit(validPreference(value) || meta.defaultLocale)
+ },
+ /**
+ * 串行保存语言偏好,确认保存成功后再更新界面。
+ *
+ * @param {string} value 语言标识或 auto
+ * @param {Object} callbacks 保存偏好与失败后回读的接口
+ * @returns {Promise} 语言切换结果
+ */
+ setPreference(value, { save, readBack } = {}) {
+ const canonical = validPreference(value)
+ if (!canonical) return Promise.reject(new Error('Invalid locale preference'))
+ const epoch = generation
+ const expectedAccount = account
+ const run = async () => {
+ if (generation !== epoch) throw new Error('Locale account changed')
+ // 保存账号偏好前,先确认有效语言的资源已经加载。
+ const code = registry.resolve(canonical, deviceLocales())
+ if (!engine.hasResourceBundle(code, 'common')) throw new Error('Missing locale resources')
+ if (expectedAccount !== null) {
+ if (!save) throw new Error('A preference save callback is required')
+ try {
+ await save(canonical)
+ } catch (error) {
+ if (!readBack || (await readBack()) !== canonical) throw error
+ }
+ }
+ if (generation !== epoch) throw new Error('Locale account changed')
+ commit(canonical)
+ }
+ const result = queue.then(run)
+ queue = result.catch(() => {})
+ return result
+ },
+ refreshDeviceLocale() {
+ if (preference === 'auto') commit(preference, false)
+ },
+ acceptStorageEvent(key, value) {
+ const canonical = validPreference(value)
+ if (key === storageKey() && canonical) commit(canonical, false)
+ },
+ resolveText(original, translations = {}) {
+ for (const code of registry.chain(engine.language)) {
+ if (code === meta.sourceLocale) return original
+ if (typeof translations?.[code] === 'string' && translations[code])
+ return translations[code]
+ }
+ return original
+ },
+ resolveRouteTitle(route) {
+ const info = route?.meta || route || {}
+ return info.titleKey && engine.exists(info.titleKey)
+ ? engine.t(info.titleKey)
+ : runtime.resolveText(info.title || '', info.titleI18n)
+ },
+ }
+ return runtime
+}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts b/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
index fcc9026be..fba6ae0a1 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
@@ -1,3 +1,8 @@
+import { refreshNavigation } from '@/i18n/navigation'
+import LocalePlugin from '@/i18n/adapter'
+import LanguageSelect from '@/components/LanguageSelect/index.vue'
+import { i18n } from '@/i18n'
+import { getToken } from '@/utils/auth'
// @ts-nocheck
import { createSSRApp } from 'vue'
import App from './App.vue'
@@ -9,6 +14,11 @@ import { useDict } from '@/utils/dict'
export function createApp() {
const app = createSSRApp(App)
app.use(store)
+ app.use(LocalePlugin)
+ app.mixin({ onShow: refreshNavigation })
+ i18n.engine.on('languageChanged', refreshNavigation)
+ app.component('LanguageSelect', LanguageSelect)
+ i18n.initialize(Boolean(getToken()))
app.config.globalProperties.useDict = useDict
install(app)
return {
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/agreement/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/agreement/index.vue
index 713e0bba6..759e1811f 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/agreement/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/agreement/index.vue
@@ -1,55 +1,55 @@
- 用户协议
+ {{ $t('mobile:agreement.title') }}
- 1. 服务条款的确认和接纳
- 欢迎使用RuoYi-FastAPI移动端框架(以下简称“本产品”)。本产品的服务所有权和运作权归RuoYi-FastAPI所有。用户在使用本产品前,请仔细阅读本协议。当您点击“同意”或实际使用本产品服务时,即视为您已阅读并完全同意本协议的所有条款。
+ {{
+ $t('mobile:agreement.acceptance.title')
+ }}
+ {{ $t('mobile:agreement.acceptance.body') }}
- 2. 用户账号与安全
- 您在注册账号时,应提供真实、准确、最新和完整的个人资料。您有责任维护账号和密码的安全,并对以您账号进行的所有活动承担法律责任。如发现账号被非法使用,请立即通知我们。
+ {{
+ $t('mobile:agreement.security.title')
+ }}
+ {{ $t('mobile:agreement.security.body') }}
- 3. 用户行为规范
- 用户在使用本产品过程中,必须遵守国家法律法规,不得利用本产品从事违法违规活动,包括但不限于:发布虚假信息、侵犯他人知识产权、传播淫秽色情信息、进行网络攻击等。
+ {{
+ $t('mobile:agreement.conduct.title')
+ }}
+ {{ $t('mobile:agreement.conduct.body') }}
- 4. 服务内容的变更、中断或终止
- 鉴于网络服务的特殊性,我们有权随时变更、中断或终止部分或全部网络服务。对于因服务器维护、网络故障等原因导致的服务中断,我们将尽量提前公告,但不对因此产生的损失承担责任。
+ {{
+ $t('mobile:agreement.changes.title')
+ }}
+ {{ $t('mobile:agreement.changes.body') }}
- 5. 知识产权声明
- 本产品包含的所有内容(包括但不限于文字、图片、音频、视频、软件代码等)的知识产权归RuoYi-FastAPI或相关权利人所有。未经授权,任何人不得擅自使用、复制、修改或传播。
+ {{
+ $t('mobile:agreement.intellectualProperty.title')
+ }}
+ {{ $t('mobile:agreement.intellectualProperty.body') }}
- 6. 免责声明
- 本产品按“现状”提供,不包含任何明示或暗示的保证。我们不对因不可抗力、黑客攻击、系统不稳定等原因导致的服务中断或数据丢失承担责任。
+ {{
+ $t('mobile:agreement.disclaimer.title')
+ }}
+ {{ $t('mobile:agreement.disclaimer.body') }}
- 更新日期:2024年01月01日
+ {{ $t('mobile:agreement.updated') }}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/privacy/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/privacy/index.vue
index 064bd670e..716f9ca40 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/privacy/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/privacy/index.vue
@@ -1,71 +1,66 @@
- 隐私协议
+ {{ $t('mobile:privacy.title') }}
- RuoYi-FastAPI非常重视您的隐私保护。本隐私政策旨在向您说明我们如何收集、使用、存储和保护您的个人信息。请您在使用本产品前仔细阅读本政策。
+ {{ $t('mobile:privacy.intro') }}
- 1. 我们如何收集和使用您的个人信息
- 为了向您提供更好的服务,我们可能会收集您的以下信息:
- • 账号信息:当您注册或登录时,我们需要收集您的用户名、密码、手机号码等信息。
- •
- 设备信息:为了保障账户安全和优化服务,我们会收集您的设备型号、操作系统版本、唯一设备标识符等信息。
- • 日志信息:当您使用本产品时,我们会自动收集您的操作日志、IP地址、访问时间等信息。
+ {{
+ $t('mobile:privacy.collection.title')
+ }}
+ {{ $t('mobile:privacy.collection.body') }}
+ {{ $t('mobile:privacy.collection.account') }}
+ {{ $t('mobile:privacy.collection.device') }}
+ {{ $t('mobile:privacy.collection.log') }}
- 2. 我们如何共享、转让、公开披露您的个人信息
- 我们不会向任何第三方共享、转让或公开披露您的个人信息,但以下情况除外:
- • 获得您的明确授权或同意;
- • 根据法律法规或司法机关的要求;
- • 为了维护国家安全、公共安全或重大公共利益。
+ {{
+ $t('mobile:privacy.sharing.title')
+ }}
+ {{ $t('mobile:privacy.sharing.body') }}
+ {{ $t('mobile:privacy.sharing.consent') }}
+ {{ $t('mobile:privacy.sharing.law') }}
+ {{ $t('mobile:privacy.sharing.publicInterest') }}
- 3. 我们如何保护您的个人信息
- 我们采取了多种安全措施来保护您的个人信息,包括数据加密、访问控制、安全审计等。我们会尽力防止您的信息被未经授权的访问、篡改或泄露。
+ {{
+ $t('mobile:privacy.protection.title')
+ }}
+ {{ $t('mobile:privacy.protection.body') }}
- 4. 您的权利
- 您有权访问、更正或删除您的个人信息。您也可以随时注销账号。如您需要行使这些权利,请通过“联系我们”章节中的方式与我们联系。
+ {{
+ $t('mobile:privacy.rights.title')
+ }}
+ {{ $t('mobile:privacy.rights.body') }}
- 5. 本政策如何更新
- 随着法律法规的变化或业务的发展,我们可能会不时更新本隐私政策。更新后的政策将在本产品中发布,并在生效前通过适当方式通知您。
+ {{
+ $t('mobile:privacy.updates.title')
+ }}
+ {{ $t('mobile:privacy.updates.body') }}
- 6. 联系我们
- 如果您对本隐私政策有任何疑问或建议,请通过以下方式联系我们:
- 邮箱:xxx@xxx.com
+ {{
+ $t('mobile:privacy.contact.title')
+ }}
+ {{ $t('mobile:privacy.contact.body') }}
+ {{ $t('mobile:privacy.contact.email') }}
- 更新日期:2024年01月01日
+ {{ $t('mobile:privacy.updated') }}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/textview/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/textview/index.vue
index 81ce760d2..cd14f77d1 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/textview/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/common/textview/index.vue
@@ -19,8 +19,8 @@ const title = ref('')
const content = ref('')
onLoad((options) => {
- title.value = options.title
- content.value = options.content
+ title.value = decodeURIComponent(options.title || '')
+ content.value = decodeURIComponent(options.content || '')
uni.setNavigationBarTitle({
title: options.title,
})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/index.vue
index 89f19fd6e..014bdf2e7 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/index.vue
@@ -4,7 +4,7 @@
- RuoYi-FastAPI移动端
+ {{ $t('mobile:app.title') }}
@@ -17,7 +17,7 @@
@@ -54,15 +54,15 @@
- 系统运行正常
- 刚刚更新
+ {{
+ $t('mobile:home.healthy')
+ }}
+ {{ $t('mobile:home.updated') }}
85%
- 工作效率
+ {{ $t('mobile:home.productivity') }}
@@ -83,7 +83,7 @@
class="rounded-2xl bg-white p-4 shadow-xs border border-gray-100 flex items-center justify-between"
>
- 新通知
+ {{ $t('mobile:home.notifications') }}
12
- 待办任务
+ {{ $t('mobile:home.tasks') }}
5
- 快捷入口
+ {{ $t('mobile:home.shortcuts') }}
@@ -119,7 +119,9 @@
>
- 申请
+ {{
+ $t('mobile:home.requests')
+ }}
- 新闻
+ {{ $t('mobile:home.news') }}
- 统计
+ {{
+ $t('mobile:home.statistics')
+ }}
- 计划
+ {{ $t('mobile:home.plans') }}
@@ -151,8 +155,8 @@
- 最近更新
- 查看全部
+ {{ $t('mobile:home.recent') }}
+ {{ $t('mobile:home.viewAll') }}
- 请假申请
- 等待经理审批
+ {{ $t('mobile:home.leaveRequest') }}
+ {{ $t('mobile:home.awaitingApproval') }}
- 待处理{{ $t('mobile:home.pending') }}
- 周报
- 提交成功
+ {{ $t('mobile:home.weeklyReport') }}
+ {{ $t('mobile:home.submitted') }}
- 已完成
+ {{
+ $t('mobile:home.completed')
+ }}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
index a51c74470..f5d1e48dd 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
@@ -2,6 +2,7 @@
+
@@ -11,7 +12,9 @@
mode="widthFix"
/>
- RuoYi-FastAPI移动端登录
+ {{
+ $t('mobile:auth.loginTitle')
+ }}
@@ -27,7 +30,7 @@
v-model="loginForm.username"
class="h-12 w-full rounded-xl bg-gray-50 pl-12 pr-4 text-sm text-gray-700 outline-hidden transition-all focus:bg-white focus:ring-2 focus:ring-blue-400"
type="text"
- placeholder="请输入账号"
+ :placeholder="$t('common:login.usernameRequired')"
maxlength="30"
/>
@@ -43,7 +46,7 @@
v-model="loginForm.password"
type="password"
class="h-12 w-full rounded-xl bg-gray-50 pl-12 pr-4 text-sm text-gray-700 outline-hidden transition-all focus:bg-white focus:ring-2 focus:ring-blue-400"
- placeholder="请输入密码"
+ :placeholder="$t('common:login.passwordRequired')"
maxlength="20"
/>
@@ -63,7 +66,7 @@
v-model="loginForm.code"
type="number"
class="h-12 w-full rounded-xl bg-gray-50 pl-12 pr-4 text-sm text-gray-700 outline-hidden transition-all focus:bg-white focus:ring-2 focus:ring-blue-400"
- placeholder="验证码"
+ :placeholder="$t('common:login.code')"
maxlength="4"
/>
@@ -83,7 +86,7 @@
@click="handleLogin"
class="flex h-12 w-full items-center justify-center rounded-xl bg-linear-to-r from-blue-500 to-indigo-600 text-base font-semibold text-white shadow-lg shadow-blue-500/30 transition-transform active:scale-95"
>
- 登 录
+ {{ $t('mobile:auth.login') }}
@@ -92,26 +95,26 @@
class="flex items-center text-sm text-gray-500"
v-if="register"
>
- 没有账号?
+ {{ $t('mobile:auth.noAccount') }}
立即注册{{ $t('mobile:auth.registerNow') }}
- 登录即代表同意
+ {{ $t('mobile:auth.acceptTerms') }}
《用户协议》{{ $t('mobile:auth.agreementLink') }}
- 和
+ {{ $t('mobile:auth.and') }}
《隐私协议》{{ $t('mobile:auth.privacyLink') }}
@@ -120,6 +123,7 @@
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/index.vue
index 9fbd9f013..e28a404e2 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/index.vue
@@ -40,7 +40,7 @@
class="mt-1 flex items-center text-sm text-blue-100"
@click="handleToInfo"
>
- 查看个人信息
+ {{ $t('mobile:profile.view') }}
@@ -49,8 +49,8 @@
class="text-xl font-bold"
@click="handleToLogin"
>
- 点击登录
-
+ {{ $t('mobile:profile.signIn') }}
@@ -71,7 +71,9 @@
>
- 交流群
+ {{
+ $t('mobile:profile.community')
+ }}
- 在线客服
+ {{ $t('mobile:profile.support') }}
- 反馈社区
+ {{ $t('mobile:profile.feedback') }}
- 点赞我们
+ {{ $t('mobile:profile.like') }}
@@ -116,7 +118,7 @@
>
- 编辑资料
+ {{ $t('mobile:profile.edit') }}
@@ -127,7 +129,7 @@
>
- 常见问题
+ {{ $t('mobile:help.title') }}
@@ -138,7 +140,7 @@
>
- 关于我们
+ {{ $t('mobile:about.title') }}
@@ -149,7 +151,7 @@
>
- 应用设置
+ {{ $t('mobile:settings.title') }}
@@ -159,6 +161,7 @@
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/edit.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/edit.vue
index bd20b5625..1a77d14c8 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/edit.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/edit.vue
@@ -3,41 +3,49 @@
- 用户昵称
+ {{
+ $t('mobile:profile.nickname')
+ }}
- 手机号码
+ {{
+ $t('mobile:profile.phone')
+ }}
- 邮箱
+ {{
+ $t('mobile:profile.email')
+ }}
- 性别
+ {{
+ $t('mobile:profile.sex')
+ }}
- 提 交
+ {{ $t('mobile:actions.submit') }}
@@ -69,8 +77,9 @@
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.js b/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.js
index dd718f972..50263bdb1 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.js
@@ -1,3 +1,4 @@
+import { t } from '@/i18n'
export default {
// 消息提示
msg(content) {
@@ -27,19 +28,20 @@ export default {
// 弹出提示
alert(content, title) {
uni.showModal({
- title: title || '系统提示',
+ title: title || t('mobile:app.systemNotice'),
content: content,
showCancel: false,
+ confirmText: t('common:confirm'),
})
},
// 确认窗体
confirm(content, title) {
return new Promise((resolve, reject) => {
uni.showModal({
- title: title || '系统提示',
+ title: title || t('mobile:app.systemNotice'),
content: content,
- cancelText: '取消',
- confirmText: '确定',
+ cancelText: t('common:cancel'),
+ confirmText: t('common:confirm'),
success: function (res) {
if (res.confirm) {
resolve(res.confirm)
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/store/modules/user.js b/ruoyi-fastapi-frontend/vue3/mobile/src/store/modules/user.js
index 8ccc71af2..602c1558a 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/store/modules/user.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/store/modules/user.js
@@ -1,3 +1,4 @@
+import { i18n } from '@/i18n'
import { defineStore } from 'pinia'
import { ref } from 'vue'
import config from '@/config'
@@ -90,6 +91,7 @@ export const useUserStore = defineStore('user', () => {
getInfo()
.then((res) => {
const user = res.user
+ i18n.setAccount(user?.userId, user?.locale)
appTimezone.value = res.appTimezone
setBusinessTimezone(res.appTimezone)
applyTimezone(user.timeZone)
@@ -131,6 +133,7 @@ export const useUserStore = defineStore('user', () => {
SET_ROLES([])
SET_PERMISSIONS([])
removeToken()
+ i18n.setAccount(null)
storage.clean()
}
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/common.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/common.js
index cb99fbf6b..e8284a5fb 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/common.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/common.js
@@ -1,3 +1,4 @@
+import { t } from '@/i18n'
/**
* 显示消息提示框
* @param content 提示的标题
@@ -16,10 +17,10 @@ export function toast(content) {
export function showConfirm(content) {
return new Promise((resolve, reject) => {
uni.showModal({
- title: '提示',
+ title: t('common:notice'),
content: content,
- cancelText: '取消',
- confirmText: '确定',
+ cancelText: t('common:cancel'),
+ confirmText: t('common:confirm'),
success: function (res) {
resolve(res)
},
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/dict.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/dict.js
index 8f093a75f..0ca766f95 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/dict.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/dict.js
@@ -1,30 +1,39 @@
+import { localizeDictionary } from '@/i18n/names.mjs'
+import { getToken } from '@/utils/auth'
import useDictStore from '@/store/modules/dict'
import { getDicts } from '@/api/system/dict/data'
-import { ref, toRefs } from 'vue'
+import { computed, ref } from 'vue'
+import { resolveText } from '@/i18n/adapter'
/**
- * 获取字典数据
+ * 获取字典数据,缓存原始名称及译文,显示标签随语言切换。
*/
-export function useDict(...args) {
- const res = ref({})
- return (() => {
- args.forEach((dictType, index) => {
- res.value[dictType] = []
- const dicts = useDictStore().getDict(dictType)
- if (dicts) {
- res.value[dictType] = dicts
- } else {
- getDicts(dictType).then((resp) => {
- res.value[dictType] = resp.data.map((p) => ({
- label: p.dictLabel,
- value: p.dictValue,
- elTagType: p.listClass,
- elTagClass: p.cssClass,
- }))
- useDictStore().setDict(dictType, res.value[dictType])
- })
- }
- })
- return toRefs(res.value)
- })()
+export function useDict(...types) {
+ const result = {}
+ types.forEach((type) => {
+ const raw = ref(useDictStore().getDict(type) || [])
+ const cached = useDictStore().getDict(type)
+ result[type] = computed(() => localizeDictionary(raw.value, resolveText))
+ // 兼容旧缓存:先展示已有标签,再补取完整的语言映射。
+ if (
+ !cached ||
+ cached.some((item) => !Object.prototype.hasOwnProperty.call(item, 'labelI18n'))
+ ) {
+ const token = getToken()
+ getDicts(type).then((response) => {
+ if (getToken() !== token) return
+ raw.value = response.data.map((item) => ({
+ originalLabel: item.dictLabel,
+ label: item.dictLabel,
+ labelI18n: item.dictLabelI18n || {},
+ value: item.dictValue,
+ elTagType: item.listClass,
+ elTagClass: item.cssClass,
+ }))
+ useDictStore().removeDict(type)
+ useDictStore().setDict(type, raw.value)
+ })
+ }
+ })
+ return result
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/errorCode.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/errorCode.js
index 0eef5eb6d..f5d85bc44 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/errorCode.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/errorCode.js
@@ -1,6 +1,15 @@
+import { t } from '@/i18n'
export default {
- 401: '认证失败,无法访问系统资源',
- 403: '当前操作没有权限',
- 404: '访问资源不存在',
- default: '系统未知错误,请反馈给管理员',
+ get 401() {
+ return t('mobile:errors.unauthorized')
+ },
+ get 403() {
+ return t('mobile:errors.forbidden')
+ },
+ get 404() {
+ return t('mobile:errors.notFound')
+ },
+ get default() {
+ return t('mobile:errors.unknown')
+ },
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/request.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/request.js
index ff5c510f2..aca5ed4d4 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/request.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/request.js
@@ -1,3 +1,4 @@
+import { i18n, t } from '@/i18n'
import { handleSessionExpired } from '@/utils/session'
import config from '@/config'
import { getToken } from '@/utils/auth'
@@ -19,7 +20,7 @@ const baseUrl = config.baseUrl
const request = async (config) => {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
- config.header = config.header || {}
+ config.header = { ...i18n.headers, ...config.header }
config.headers = config.headers || {}
config.header['X-Timezone'] = config.header['X-Timezone'] || getDisplayTimezone()
const token = getToken()
@@ -61,7 +62,7 @@ const request = async (config) => {
const { code, msg } = getResponseStatus(res, res.data)
if (code === 401) {
handleSessionExpired(isToken ? null : token)
- const error = new Error('无效的会话,或者会话已过期,请重新登录。')
+ const error = new Error(t('mobile:errors.sessionInvalid'))
error.response = res
reject(error)
} else if (code === 500) {
@@ -107,11 +108,11 @@ const request = async (config) => {
let { message } = error
if (message === 'Network Error') {
- message = '后端接口连接异常'
+ message = t('common:network.error')
} else if (message && message.includes('timeout')) {
- message = '系统接口请求超时'
+ message = t('common:network.timeout')
} else if (message && message.includes('Request failed with status code')) {
- message = '系统接口' + message.substr(message.length - 3) + '异常'
+ message = t('mobile:errors.httpStatus', { status: message.substr(message.length - 3) })
}
if (message) {
toast(message)
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/session.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/session.js
index 1c6344ba1..a4aa01328 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/session.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/session.js
@@ -1,3 +1,4 @@
+import { t } from '@/i18n'
import { useUserStore } from '@/store/modules/user'
import { getToken } from '@/utils/auth'
import { showConfirm } from '@/utils/common'
@@ -14,7 +15,7 @@ export function handleSessionExpired(token) {
if (!token || token !== getToken()) return Promise.resolve(false)
if (sessionExpiredPromise) return sessionExpiredPromise
sessionExpiredPromise = Promise.resolve()
- .then(() => showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?'))
+ .then(() => showConfirm(t('common:session.expired')))
.then(async (result) => {
if (!result.confirm || token !== getToken()) return false
await useUserStore().logOut()
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/time.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/time.js
index d6e69115d..6e55f2a83 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/time.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/time.js
@@ -1,3 +1,4 @@
+import { translateMessage } from '../i18n/message.mjs'
// 补齐小程序运行时可能缺失的 Intl 能力和 IANA 时区数据。
// 同步加载,保证业务时区初始化和首屏渲染时已具备完整能力。
import '@formatjs/intl-getcanonicallocales/polyfill.js'
@@ -20,7 +21,15 @@ const DATE_ONLY_PATTERN = /^(\d{4})-(\d{2})-(\d{2})$/
const WALL_TIME_PATTERN = /^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?$/
const RFC3339_PATTERN =
/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d+)?(Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/
-const WEEKDAYS = ['日', '一', '二', '三', '四', '五', '六']
+const WEEKDAYS = [
+ () => translateMessage('utility:weekday.sunday', '日'),
+ () => translateMessage('utility:weekday.monday', '一'),
+ () => translateMessage('utility:weekday.tuesday', '二'),
+ () => translateMessage('utility:weekday.wednesday', '三'),
+ () => translateMessage('utility:weekday.thursday', '四'),
+ () => translateMessage('utility:weekday.friday', '五'),
+ () => translateMessage('utility:weekday.saturday', '六'),
+]
const MILLISECONDS_PER_SECOND = 1000
const MILLISECONDS_PER_MINUTE = 60 * MILLISECONDS_PER_SECOND
const MILLISECONDS_PER_HOUR = 60 * MILLISECONDS_PER_MINUTE
@@ -55,7 +64,11 @@ export class TimeInputError extends Error {
*/
function getFormatter(timezoneName) {
if (typeof timezoneName !== 'string' || !timezoneName.trim() || /^[+-]/.test(timezoneName)) {
- throw new Error(`无效的 IANA 时区: ${timezoneName}`)
+ throw new Error(
+ translateMessage('utility:timezone.invalid', `无效的 IANA 时区: ${timezoneName}`, {
+ timezoneName,
+ })
+ )
}
const name = timezoneName.trim()
@@ -75,7 +88,11 @@ function getFormatter(timezoneName) {
})
timezoneFormatters.set(name, formatter)
} catch {
- throw new Error(`无效的 IANA 时区: ${timezoneName}`)
+ throw new Error(
+ translateMessage('utility:timezone.invalid', `无效的 IANA 时区: ${timezoneName}`, {
+ timezoneName,
+ })
+ )
}
}
return timezoneFormatters.get(name)
@@ -295,7 +312,7 @@ function formatEpoch(epoch, pattern, timezoneName) {
.replaceAll('{h}', 'HH')
.replaceAll('{i}', 'mm')
.replaceAll('{s}', 'ss')
- .replaceAll('{a}', `[${WEEKDAYS[value.day()]}]`)
+ .replaceAll('{a}', `[${WEEKDAYS[value.day()]()}]`)
return value.format(format)
}
@@ -363,7 +380,10 @@ export function formatEpochSeconds(value, pattern, timezoneName) {
export function getWallTimeCandidates(value, timezoneName = getDisplayTimezone()) {
const wallMilliseconds = parseWallTimeMilliseconds(value)
if (wallMilliseconds === null) {
- throw new TimeInputError(`无效的日期时间: ${value}`, 'INVALID_TIME')
+ throw new TimeInputError(
+ translateMessage('utility:timezone.invalidDateTime', `无效的日期时间: ${value}`, { value }),
+ 'INVALID_TIME'
+ )
}
const offsets = new Set()
@@ -414,7 +434,11 @@ export function toRfc3339(value, { timezoneName = getDisplayTimezone(), offset }
const candidates = getWallTimeCandidates(value, timezoneName)
if (!candidates.length) {
throw new TimeInputError(
- `${value} 在 ${timezoneName} 不存在,请选择夏令时跳转后的有效时间`,
+ translateMessage(
+ 'utility:timezone.nonexistent',
+ `${value} 在 ${timezoneName} 不存在,请选择夏令时跳转后的有效时间`,
+ { value, timezoneName }
+ ),
'DST_GAP'
)
}
@@ -427,7 +451,11 @@ export function toRfc3339(value, { timezoneName = getDisplayTimezone(), offset }
return selected.value
}
throw new TimeInputError(
- `${value} 在 ${timezoneName} 出现两次,请选择 UTC 偏移`,
+ translateMessage(
+ 'utility:timezone.ambiguous',
+ `${value} 在 ${timezoneName} 出现两次,请选择 UTC 偏移`,
+ { value, timezoneName }
+ ),
'DST_FOLD',
candidates
)
@@ -456,7 +484,10 @@ export function normalizeRangeBoundary(value) {
}
if (typeof value === 'string' && DATE_ONLY_PATTERN.test(value)) {
if (parseWallTimeMilliseconds(value, true) === null) {
- throw new TimeInputError(`无效的日期: ${value}`, 'INVALID_DATE')
+ throw new TimeInputError(
+ translateMessage('utility:timezone.invalidDate', `无效的日期: ${value}`, { value }),
+ 'INVALID_DATE'
+ )
}
return value
}
@@ -485,7 +516,14 @@ export function prepareTimeFields(record, fields, timezoneName = getDisplayTimez
? original
: toBusinessDateTimeInput(original, timezoneName)
if (input === null && original != null) {
- throw new TimeInputError(`字段 ${field} 包含无效的 RFC 3339 时间`, 'INVALID_TIME')
+ throw new TimeInputError(
+ translateMessage(
+ 'utility:timezone.invalidField',
+ `字段 ${field} 包含无效的 RFC 3339 时间`,
+ { field }
+ ),
+ 'INVALID_TIME'
+ )
}
result[field] = input
originals[field] = { original, input }
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportCrypto.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportCrypto.js
index e64b89a57..537a3f8d9 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportCrypto.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportCrypto.js
@@ -1,3 +1,4 @@
+import { translateMessage } from '../i18n/message.mjs'
import config from '@/config'
import forge, { primeForgeRandomBytes } from '@/utils/transportForge'
import {
@@ -292,9 +293,13 @@ function normalizeRandomBytesResult(randomValues, expectedLength) {
return randomValues
}
throw new Error(
- `平台随机数返回结果格式不受支持: tag=${getObjectTag(randomValues)}, keys=${Object.keys(
- randomValues || {}
- ).join(',')}`
+ translateMessage(
+ 'utility:crypto.randomFormat',
+ `平台随机数返回结果格式不受支持: tag=${getObjectTag(randomValues)}, keys=${Object.keys(
+ randomValues || {}
+ ).join(',')}`,
+ { arg0: getObjectTag(randomValues), arg1: Object.keys(randomValues || {}).join(',') }
+ )
)
}
@@ -452,7 +457,9 @@ async function getRandomBytes(length) {
if (appPlusRandomBytes !== null) {
return appPlusRandomBytes
}
- throw new Error('当前运行环境缺少安全随机数能力')
+ throw new Error(
+ translateMessage('utility:crypto.randomUnavailable', '当前运行环境缺少安全随机数能力')
+ )
}
/**
@@ -661,7 +668,10 @@ function validateTransportPublicKeyResponse(responsePayload) {
!responsePayload?.data ||
typeof responsePayload.data !== 'object'
) {
- throw new Error(responsePayload?.msg || '获取传输层公钥失败')
+ throw new Error(
+ responsePayload?.msg ||
+ translateMessage('utility:crypto.publicKeyFailed', '获取传输层公钥失败')
+ )
}
}
@@ -674,16 +684,16 @@ function validateTransportPublicKeyResponse(responsePayload) {
*/
function validateTransportPublicKeyPayload(payload, transportPolicy) {
if (!payload?.publicKey || !payload?.kid) {
- throw new Error('获取传输层公钥失败')
+ throw new Error(translateMessage('utility:crypto.publicKeyFailed', '获取传输层公钥失败'))
}
if (
String(payload.envelopeVersion || DEFAULT_TRANSPORT_ENVELOPE_VERSION) !==
transportPolicy.envelopeVersion
) {
- throw new Error('传输层公钥协议版本不受支持')
+ throw new Error(translateMessage('utility:crypto.keyProtocol', '传输层公钥协议版本不受支持'))
}
if (payload.alg !== transportPolicy.requestEnvelopeAlgorithm) {
- throw new Error('传输层公钥算法不受支持')
+ throw new Error(translateMessage('utility:crypto.keyAlgorithm', '传输层公钥算法不受支持'))
}
}
@@ -709,28 +719,34 @@ function validateResponseEnvelope(
const aad = envelope.aad
if (String(envelope.v || '') !== transportPolicy.envelopeVersion) {
- throw new Error('传输层响应协议版本不受支持')
+ throw new Error(
+ translateMessage('utility:crypto.responseProtocol', '传输层响应协议版本不受支持')
+ )
}
if (String(envelope.alg || '') !== transportPolicy.responseEnvelopeAlgorithm) {
- throw new Error('传输层响应算法不受支持')
+ throw new Error(translateMessage('utility:crypto.responseAlgorithm', '传输层响应算法不受支持'))
}
if (String(envelope.kid || '') !== String(transportContext.kid)) {
- throw new Error('传输层响应密钥版本不匹配')
+ throw new Error(translateMessage('utility:crypto.keyVersion', '传输层响应密钥版本不匹配'))
}
if (responseKid && String(envelope.kid) !== String(responseKid)) {
- throw new Error('传输层响应头与响应体密钥版本不一致')
+ throw new Error(
+ translateMessage('utility:crypto.headerVersion', '传输层响应头与响应体密钥版本不一致')
+ )
}
if (!aad || typeof aad !== 'object' || Array.isArray(aad)) {
- throw new Error('传输层响应AAD不合法')
+ throw new Error(translateMessage('utility:crypto.aad', '传输层响应AAD不合法'))
}
if (
String(aad.method || '').toUpperCase() !== expectedAad.method ||
String(aad.path || '') !== expectedAad.path
) {
- throw new Error('传输层响应的method/path与当前请求不匹配')
+ throw new Error(
+ translateMessage('utility:crypto.requestMismatch', '传输层响应的method/path与当前请求不匹配')
+ )
}
if (String(aad.direction || '') !== expectedAad.direction) {
- throw new Error('传输层响应方向标识不合法')
+ throw new Error(translateMessage('utility:crypto.direction', '传输层响应方向标识不合法'))
}
}
@@ -1029,7 +1045,12 @@ export async function encryptTransportRequest(requestConfig) {
buildQueryUrlLength(requestConfig.url, requestConfig.params) >
Number(transportPolicy.maxEncryptedGetUrlLength || 4096)
) {
- throw new Error('当前GET/DELETE请求参数加密后长度超限,请改用POST请求或精简查询条件')
+ throw new Error(
+ translateMessage(
+ 'utility:crypto.queryLength',
+ '当前GET/DELETE请求参数加密后长度超限,请改用POST请求或精简查询条件'
+ )
+ )
}
}
@@ -1096,6 +1117,9 @@ export function shouldRetryTransportWithFreshKey(responseOrError) {
const responseMsg = responseOrError?.data?.msg || responseOrError?.response?.data?.msg
const errorMessage = responseOrError?.message
return (
+ ['transport.decryptFailed', 'transport.keyExpired'].includes(
+ responseOrError?.data?.msgKey || responseOrError?.response?.data?.msgKey
+ ) ||
TRANSPORT_RETRYABLE_ERROR_MESSAGES.has(responseMsg) ||
TRANSPORT_RETRYABLE_ERROR_MESSAGES.has(errorMessage)
)
@@ -1121,10 +1145,13 @@ export async function decryptTransportResponse(response, requestConfig) {
const transportPolicy = getTransportCryptoPolicy()
const transportContext = requestConfig.__transportCryptoContext
if (!transportContext) {
- throw new Error('缺少响应解密上下文')
+ throw new Error(translateMessage('utility:crypto.missingContext', '缺少响应解密上下文'))
}
- const envelope = parseJsonObject(response.data, '传输层响应信封格式不合法')
+ const envelope = parseJsonObject(
+ response.data,
+ translateMessage('utility:crypto.envelope', '传输层响应信封格式不合法')
+ )
validateResponseEnvelope(envelope, response, requestConfig, transportContext, transportPolicy)
const plaintext = await decryptEnvelope(envelope, transportContext)
response.data = JSON.parse(plaintext)
@@ -1160,7 +1187,10 @@ export async function decryptTransportErrorResponse(error, requestConfig) {
}
try {
- const envelope = parseJsonObject(response.data, '传输层响应信封格式不合法')
+ const envelope = parseJsonObject(
+ response.data,
+ translateMessage('utility:crypto.envelope', '传输层响应信封格式不合法')
+ )
validateResponseEnvelope(envelope, response, requestConfig, transportContext, transportPolicy)
const plaintext = await decryptEnvelope(envelope, transportContext)
response.data = JSON.parse(plaintext)
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.js
index b4d6dacf3..7a54c2890 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.js
@@ -1,3 +1,4 @@
+import { translateMessage } from '../i18n/message.mjs'
import forge from 'node-forge/lib/forge'
import 'node-forge/lib/util'
import 'node-forge/lib/asn1'
@@ -178,7 +179,12 @@ function consumeRandomBytes(length) {
refillRandomBytePool(length)
}
if (randomBytePool.length < length) {
- throw new Error('传输加密随机数池不足,且当前运行环境无法同步补充安全随机数')
+ throw new Error(
+ translateMessage(
+ 'utility:crypto.randomPool',
+ '传输加密随机数池不足,且当前运行环境无法同步补充安全随机数'
+ )
+ )
}
const bytes = randomBytePool.slice(0, length)
randomBytePool = randomBytePool.slice(length)
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/upload.js b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/upload.js
index db67d4c74..3d7014e4e 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/upload.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/upload.js
@@ -1,3 +1,4 @@
+import { i18n, t } from '@/i18n'
import { handleSessionExpired } from '@/utils/session'
import config from '@/config'
import { getToken } from '@/utils/auth'
@@ -10,7 +11,7 @@ const baseUrl = config.baseUrl
export default function upload(config) {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
- config.header = config.header || {}
+ config.header = { ...i18n.headers, ...config.header }
const token = getToken()
if (token && !isToken) {
config.header['Authorization'] = 'Bearer ' + token
@@ -33,14 +34,14 @@ export default function upload(config) {
try {
const result = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
if (!result || typeof result !== 'object') {
- throw new Error('上传响应格式不正确')
+ throw new Error(t('mobile:errors.uploadResponse'))
}
const { code, msg } = getResponseStatus(res, result)
if (code === 200) {
resolve(result)
} else if (code == 401) {
handleSessionExpired(isToken ? null : token)
- reject('无效的会话,或者会话已过期,请重新登录。')
+ reject(t('mobile:errors.sessionInvalid'))
} else if (code === 500) {
toast(msg)
reject('500')
@@ -49,18 +50,18 @@ export default function upload(config) {
reject(code)
}
} catch (error) {
- toast('上传响应格式不正确')
+ toast(t('mobile:errors.uploadResponse'))
reject(error)
}
},
fail: (error) => {
- let message = String(error?.message || error?.errMsg || '上传失败')
+ let message = String(error?.message || error?.errMsg || t('mobile:errors.upload'))
if (message == 'Network Error') {
- message = '后端接口连接异常'
+ message = t('common:network.error')
} else if (message.includes('timeout')) {
- message = '系统接口请求超时'
+ message = t('common:network.timeout')
} else if (message.includes('Request failed with status code')) {
- message = '系统接口' + message.substr(message.length - 3) + '异常'
+ message = t('mobile:errors.httpStatus', { status: message.substr(message.length - 3) })
}
toast(message)
const uploadError = error instanceof Error ? error : new Error(message)
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs
new file mode 100644
index 000000000..3f61b7f0e
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs
@@ -0,0 +1,49 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { updateTranslationPatch, localizeDictionary } from '../../src/i18n/names.mjs'
+import { createLocaleRuntime } from '../../src/i18n/runtime.mjs'
+
+test('translation edits preserve unknown languages and distinguish removal from no edit', () => {
+ const original = { 'en-US': 'Users', 'ja-JP': 'ユーザー' }
+ let patch = updateTranslationPatch({}, original, 'en-US', 'Accounts')
+ assert.deepEqual(patch, { 'en-US': 'Accounts' })
+ patch = updateTranslationPatch(patch, original, 'en-US', '')
+ assert.deepEqual(patch, { 'en-US': null })
+ assert.equal(original['ja-JP'], 'ユーザー')
+ assert.deepEqual(updateTranslationPatch(patch, original, 'en-US', 'Users'), {})
+})
+
+test('cached dictionaries switch through a third language without changing business values', async () => {
+ const locale = createLocaleRuntime({
+ meta: {
+ sourceLocale: 'zh-CN',
+ defaultLocale: 'zh-CN',
+ locales: [
+ { code: 'zh-CN', enabled: true, fallback: [] },
+ { code: 'en-US', enabled: true, fallback: ['zh-CN'] },
+ { code: 'ja-JP', enabled: true, fallback: ['en-US'] },
+ ],
+ },
+ resources: { 'zh-CN': { common: {} }, 'en-US': { common: {} }, 'ja-JP': { common: {} } },
+ storage: { get() {}, set() {} },
+ })
+ const cache = [
+ { label: '正常', value: '0', labelI18n: { 'en-US': 'Enabled', 'ja-JP': '有効' } },
+ { label: '旧缓存', value: 'legacy' },
+ ]
+ await locale.setPreference('en-US')
+ assert.deepEqual(
+ localizeDictionary(cache, locale.resolveText).map((item) => item.label),
+ ['Enabled', '旧缓存']
+ )
+ await locale.setPreference('ja-JP')
+ assert.deepEqual(
+ localizeDictionary(cache, locale.resolveText).map((item) => item.label),
+ ['有効', '旧缓存']
+ )
+ assert.equal(cache[0].label, '正常')
+ assert.deepEqual(
+ localizeDictionary(cache, locale.resolveText).map((item) => item.value),
+ ['0', 'legacy']
+ )
+})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs
new file mode 100644
index 000000000..f4548fc52
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs
@@ -0,0 +1,138 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { readFileSync } from 'node:fs'
+import {
+ createLocaleRuntime,
+ createLocaleRegistry,
+ normalizeLocale,
+} from '../../src/i18n/runtime.mjs'
+const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url)))
+const resources = Object.fromEntries(
+ meta.locales.map(({ code }) => [
+ code,
+ {
+ common: JSON.parse(
+ readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url))
+ ),
+ },
+ ])
+)
+function setup(extra = {}) {
+ const data = new Map()
+ return createLocaleRuntime({
+ meta,
+ resources,
+ scope: 'test:api',
+ storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) },
+ ...extra,
+ })
+}
+test('canonical locales, explicit aliases, and precise region fallback', () => {
+ const runtime = setup()
+ assert.equal(normalizeLocale('en_us'), 'en-US')
+ assert.equal(normalizeLocale('../en'), null)
+ assert.equal(normalizeLocale('x-acme'), 'x-acme')
+ assert.equal(runtime.registry.resolve('en'), 'en-US')
+ assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN')
+ assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US')
+})
+test('third language is configured, not a two-language branch', async () => {
+ const expanded = {
+ ...meta,
+ locales: [
+ ...meta.locales,
+ {
+ code: 'ja-JP',
+ nativeName: '日本語',
+ enabled: true,
+ direction: 'ltr',
+ aliases: ['ja'],
+ fallback: ['en-US'],
+ },
+ ],
+ }
+ const runtime = setup({
+ meta: expanded,
+ resources: { ...resources, 'ja-JP': { common: { language: '言語' } } },
+ })
+ await runtime.setPreference('ja-JP')
+ assert.equal(runtime.locale, 'ja-JP')
+ assert.equal(runtime.t('common:language'), '言語')
+ assert.equal(runtime.headers['Accept-Language'], 'ja-JP')
+ assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name')
+})
+test('save failure leaves active language and preference intact', async () => {
+ const runtime = setup()
+ runtime.setAccount(1, 'zh-CN')
+ await assert.rejects(
+ runtime.setPreference('en-US', {
+ save: async () => {
+ throw Error('network')
+ },
+ })
+ )
+ assert.equal(runtime.locale, 'zh-CN')
+ assert.equal(runtime.preference, 'zh-CN')
+})
+test('an old save cannot overwrite a new account', async () => {
+ const runtime = setup()
+ runtime.setAccount(1, 'zh-CN')
+ let done
+ const pending = runtime.setPreference('en-US', {
+ save: () =>
+ new Promise((resolve) => {
+ done = resolve
+ }),
+ })
+ await Promise.resolve()
+ runtime.setAccount(2, 'zh-CN')
+ done()
+ await assert.rejects(pending)
+ assert.equal(runtime.accountId, '2')
+ assert.equal(runtime.locale, 'zh-CN')
+})
+test('guest preference returns after logout; unsupported account preference is retained', async () => {
+ const runtime = setup()
+ await runtime.setPreference('en-US')
+ runtime.setAccount(1, 'fr-CA')
+ assert.equal(runtime.preference, 'fr-CA')
+ assert.equal(runtime.locale, 'zh-CN')
+ runtime.setAccount(null)
+ assert.equal(runtime.locale, 'en-US')
+})
+test('auto follows changed device locale without changing the preference', async () => {
+ let device = 'en-US'
+ const runtime = setup({ deviceLocales: () => [device] })
+ await runtime.setPreference('auto')
+ const oldHeaders = runtime.headers
+ device = 'zh-CN'
+ runtime.refreshDeviceLocale()
+ assert.equal(runtime.preference, 'auto')
+ assert.equal(runtime.locale, 'zh-CN')
+ assert.equal(oldHeaders['Accept-Language'], 'en-US')
+})
+test('preference switches are serialized and recover after failed requests', async () => {
+ const runtime = setup()
+ runtime.setAccount(1)
+ const seen = []
+ const save = async (value) => {
+ seen.push(value)
+ }
+ await Promise.all([
+ runtime.setPreference('en-US', { save }),
+ runtime.setPreference('zh-CN', { save }),
+ ])
+ assert.deepEqual(seen, ['en-US', 'zh-CN'])
+ assert.equal(runtime.locale, 'zh-CN')
+})
+test('fallback cycles and missing resources fail at registration', () => {
+ assert.throws(
+ () =>
+ createLocaleRegistry(
+ { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) },
+ resources
+ ),
+ /cycle/
+ )
+ assert.throws(() => createLocaleRegistry(meta, {}), /Missing/)
+})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs
new file mode 100644
index 000000000..c5a32834c
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs
@@ -0,0 +1,70 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import { join, dirname } from 'node:path'
+import { createRequire } from 'node:module'
+import { spawnSync } from 'node:child_process'
+const require = createRequire(import.meta.url)
+const cli = join(dirname(require.resolve('@x18n/cli/package.json')), 'bin.mjs')
+test('the pinned x18n CLI scans framework calls and fails on broken catalogs', async () => {
+ const root = await mkdtemp(join(tmpdir(), 'ruoyi-x18n-'))
+ const source = { greeting: '你好,{{name}}', items_other: '{{count}} 项' }
+ const english = {
+ greeting: 'Hello, {{name}}',
+ items_one: '{{count}} item',
+ items_other: '{{count}} items',
+ }
+ async function catalog(code, values) {
+ const dir = join(root, 'locales', code)
+ await mkdir(dir, { recursive: true })
+ await writeFile(join(dir, 'common.json'), JSON.stringify(values))
+ }
+ function check() {
+ const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], {
+ encoding: 'utf8',
+ })
+ return { status: result.status, report: JSON.parse(result.stdout) }
+ }
+ try {
+ await writeFile(
+ join(root, 'x18n.config.json'),
+ JSON.stringify({
+ sourceLocale: 'zh-CN',
+ presets: ['i18next'],
+ resources: [{ pattern: 'locales/{locale}/{namespace}.json' }],
+ namespace: { separator: ':', default: 'common' },
+ usage: { include: ['src/**/*.{js,jsx,vue}'], calls: [{ callee: '$t' }] },
+ checks: { 'missing-translation': 'error', 'empty-translation': 'error' },
+ })
+ )
+ await mkdir(join(root, 'src'))
+ await writeFile(
+ join(root, 'src/usage.vue'),
+ "{{ $t('common:greeting', { name: 'Ada' }) }}{{ $t('common:items', { count: 2 }) }}"
+ )
+ await catalog('zh-CN', source)
+ await catalog('en-US', english)
+ await catalog('ja-JP', { greeting: 'こんにちは、{{name}}', items_other: '{{count}} 件' })
+ let result = check()
+ assert.equal(result.status, 0, JSON.stringify(result.report.errors))
+ assert.equal(result.report.data.projects[0].coverage.length, 3)
+ assert.ok(
+ result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0)
+ )
+ assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key'))
+ await catalog('en-US', { items_one: english.items_one, items_other: english.items_other })
+ result = check()
+ assert.equal(result.status, 1)
+ assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation'))
+ await catalog('en-US', { ...english, greeting: 'Hello' })
+ result = check()
+ assert.equal(result.status, 1)
+ assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch'))
+ await writeFile(join(root, 'src/missing.js'), "t('common:missing')")
+ result = check()
+ assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key'))
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/x18n.config.mjs b/ruoyi-fastapi-frontend/vue3/mobile/x18n.config.mjs
new file mode 100644
index 000000000..b2cfe2f33
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/mobile/x18n.config.mjs
@@ -0,0 +1,33 @@
+// https://x18n.dev/raw/guide/configuration.md
+import { readFileSync } from 'node:fs'
+
+const meta = JSON.parse(
+ readFileSync(new URL('./src/i18n/locale-meta.json', import.meta.url), 'utf8')
+)
+export default {
+ sourceLocale: meta.sourceLocale,
+ locales: [
+ ...new Set([
+ meta.sourceLocale,
+ ...meta.locales.filter((item) => item.enabled).map((item) => item.code),
+ ]),
+ ],
+ presets: ['i18next'],
+ resources: [{ pattern: 'src/i18n/locales/{locale}/{namespace}.json' }],
+ namespace: { separator: ':', default: 'common' },
+ usage: {
+ include: ['src/**/*.{js,jsx,ts,tsx,vue,mjs}'],
+ exclude: ['src/vendor/**', 'src/uni_modules/**', 'src/i18n/locales/**'],
+ calls: [
+ { callee: 'translateMessage' },
+ { callee: '$t' },
+ { callee: 'useI18n', factory: true, returns: ['t'] },
+ ],
+ },
+ checks: {
+ 'missing-translation': 'error',
+ 'empty-translation': 'error',
+ 'unused-key': 'warning',
+ 'hard-string': 'warning',
+ },
+}
diff --git a/ruoyi-fastapi-frontend/vue3/web/package.json b/ruoyi-fastapi-frontend/vue3/web/package.json
index 8bc4c7a62..b98670f36 100644
--- a/ruoyi-fastapi-frontend/vue3/web/package.json
+++ b/ruoyi-fastapi-frontend/vue3/web/package.json
@@ -20,7 +20,9 @@
"test:auth-center": "node tests/run-tests.js auth-center",
"test:time": "node --test tests/time/time.test.js",
"preview": "vite preview",
- "test:session": "node --experimental-vm-modules --test tests/security/logout.test.mjs"
+ "test:session": "node --experimental-vm-modules --test tests/security/logout.test.mjs",
+ "i18n:check": "node scripts/check-i18n.mjs && x18n --root . check --json",
+ "test:i18n": "node --test tests/i18n/*.test.mjs"
},
"repository": {
"type": "git",
@@ -43,6 +45,7 @@
"element-plus": "2.14.7",
"file-saver": "2.0.5",
"fuse.js": "7.5.0",
+ "i18next": "26.5.11",
"js-beautify": "1.15.4",
"js-cookie": "3.0.8",
"jsencrypt": "3.5.4",
@@ -64,6 +67,8 @@
"devDependencies": {
"@vitejs/plugin-vue": "6.0.10",
"@vue/compiler-sfc": "3.5.44",
+ "@x18n/builtins": "0.1.3",
+ "@x18n/cli": "0.1.3",
"esbuild": "0.28.2",
"less": "4.9.1",
"prettier": "3.9.10",
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/en-US.json b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/en-US.json
new file mode 100644
index 000000000..feefb9deb
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/en-US.json
@@ -0,0 +1,83 @@
+{
+ "reasoningProcess": "Reasoning process",
+ "thinking": "Thinking…",
+ "settingsSaved": "Settings saved",
+ "deleteThisConversation": "Delete this conversation?",
+ "deletedSuccessfully": "Deleted successfully",
+ "chooseAModelFirst": "Choose a model first",
+ "copied": "Copied",
+ "copyFailed": "Copy failed",
+ "youCanUploadUpTo10Images": "You can upload up to 10 images",
+ "newConversation": "New conversation",
+ "noConversationHistory": "No conversation history",
+ "aIAssistant": "AI assistant",
+ "globalSettings": "Global settings",
+ "chooseAModel": "Choose a model",
+ "helloIAmYourAIAssistant": "Hello! I am your AI assistant",
+ "enterAQuestionBelowToStartAConversation": "Enter a question below to start a conversation…",
+ "copy": "Copy",
+ "duration": "Duration",
+ "input": "Input",
+ "output": "Output",
+ "total": "Total",
+ "reasoning": "Reasoning",
+ "enterYourQuestionEnterToSendShiftEnterForA": "Enter your question… (Enter to send, Shift + Enter for a new line)",
+ "uploadImages": "Upload images",
+ "deepReasoning": "Deep reasoning",
+ "globalUserSettings": "Global user settings",
+ "defaultTemperature": "Default temperature",
+ "includeConversationHistory": "Include conversation history",
+ "historyRounds": "History rounds",
+ "showMetricsByDefault": "Show metrics by default",
+ "enableVision": "Enable vision",
+ "maximumImageSize": "Maximum image size",
+ "imageSize": "Image size",
+ "systemPrompt": "System prompt",
+ "setTheGlobalSystemPrompt": "Set the global system prompt",
+ "cancel": "Cancel",
+ "save": "Save",
+ "modelCodeIsRequired": "Model code is required",
+ "providerIsRequired": "Provider is required",
+ "modelSortOrderIsRequired": "Model sort order is required",
+ "addModel": "Add model",
+ "editModel": "Edit model",
+ "modelCode": "Model code",
+ "enterAModelCode": "Enter a model code",
+ "provider": "Provider",
+ "chooseAProvider": "Choose a provider",
+ "status": "Status",
+ "modelStatus": "Model status",
+ "search": "Search",
+ "reset": "Reset",
+ "add": "Add",
+ "edit": "Edit",
+ "delete": "Delete",
+ "supportsReasoning": "Supports reasoning",
+ "supportsImages": "Supports images",
+ "createdAt": "Created at",
+ "actions": "Actions",
+ "modelName": "Model name",
+ "enterAModelName": "Enter a model name",
+ "modelSortOrder": "Model sort order",
+ "enterAnAPIKey": "Enter an API Key",
+ "enterABaseURL": "Enter a Base URL",
+ "maximumOutput": "Maximum output",
+ "modelType": "Model type",
+ "enterAModelTypeOptional": "Enter a model type (optional)",
+ "remark": "Remark",
+ "enterContent": "Enter content",
+ "me": "Me",
+ "stop": "Stop",
+ "send": "Send",
+ "confirm": "Confirm",
+ "modelID": "Model ID",
+ "enterModelCodeEGDeepseekR1": "Enter model code (e.g. deepseek-r1)",
+ "requestFailed": "Request failed: {{message}}",
+ "emptyContent": "There is no content to copy",
+ "imageTooLarge": "Each image must not exceed {{size}} MB",
+ "uploadingImages": "Uploading images, please wait...",
+ "imageUploadFailed": "Image upload failed",
+ "updated": "Updated successfully",
+ "added": "Added successfully",
+ "deleteModels": "Delete models with IDs “{{ids}}”?"
+}
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/zh-CN.json b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/zh-CN.json
new file mode 100644
index 000000000..51001f225
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locales/zh-CN.json
@@ -0,0 +1,83 @@
+{
+ "reasoningProcess": "深度思考过程",
+ "thinking": "思考中...",
+ "settingsSaved": "配置保存成功",
+ "deleteThisConversation": "是否确认删除该会话?",
+ "deletedSuccessfully": "删除成功",
+ "chooseAModelFirst": "请先选择模型",
+ "copied": "复制成功",
+ "copyFailed": "复制失败",
+ "youCanUploadUpTo10Images": "最多只能上传 10 张图片",
+ "newConversation": "新对话",
+ "noConversationHistory": "暂无历史对话",
+ "aIAssistant": "AI 助手",
+ "globalSettings": "全局参数配置",
+ "chooseAModel": "选择模型",
+ "helloIAmYourAIAssistant": "你好!我是你的 AI 助手",
+ "enterAQuestionBelowToStartAConversation": "请在下方输入问题开始对话...",
+ "copy": "复制",
+ "duration": "耗时",
+ "input": "输入",
+ "output": "输出",
+ "total": "总",
+ "reasoning": "推理",
+ "enterYourQuestionEnterToSendShiftEnterForA": "请输入您的问题... (Enter 发送,Shift + Enter 换行)",
+ "uploadImages": "上传图片",
+ "deepReasoning": "深度思考",
+ "globalUserSettings": "用户全局配置",
+ "defaultTemperature": "默认温度",
+ "includeConversationHistory": "附带历史消息",
+ "historyRounds": "历史消息轮数",
+ "showMetricsByDefault": "默认显示指标",
+ "enableVision": "开启视觉功能",
+ "maximumImageSize": "图片最大大小",
+ "imageSize": "图片大小",
+ "systemPrompt": "系统提示词",
+ "setTheGlobalSystemPrompt": "设置全局系统提示词",
+ "cancel": "取 消",
+ "save": "保存",
+ "modelCodeIsRequired": "模型编码不能为空",
+ "providerIsRequired": "提供商不能为空",
+ "modelSortOrderIsRequired": "模型排序不能为空",
+ "addModel": "添加模型",
+ "editModel": "修改模型",
+ "modelCode": "模型编码",
+ "enterAModelCode": "请输入模型编码",
+ "provider": "提供商",
+ "chooseAProvider": "请选择提供商",
+ "status": "状态",
+ "modelStatus": "模型状态",
+ "search": "搜索",
+ "reset": "重置",
+ "add": "新增",
+ "edit": "修改",
+ "delete": "删除",
+ "supportsReasoning": "支持推理",
+ "supportsImages": "支持图片",
+ "createdAt": "创建时间",
+ "actions": "操作",
+ "modelName": "模型名称",
+ "enterAModelName": "请输入模型名称",
+ "modelSortOrder": "模型排序",
+ "enterAnAPIKey": "请输入API Key",
+ "enterABaseURL": "请输入Base URL",
+ "maximumOutput": "最大输出",
+ "modelType": "模型类型",
+ "enterAModelTypeOptional": "请输入模型类型 (可选)",
+ "remark": "备注",
+ "enterContent": "请输入内容",
+ "me": "我",
+ "stop": "停止",
+ "send": "发送",
+ "confirm": "确 定",
+ "modelID": "模型ID",
+ "enterModelCodeEGDeepseekR1": "请输入模型编码 (如 deepseek-r1)",
+ "requestFailed": "请求失败:{{message}}",
+ "emptyContent": "内容为空,无法复制",
+ "imageTooLarge": "单张图片大小不能超过 {{size}} MB",
+ "uploadingImages": "正在上传图片,请稍候...",
+ "imageUploadFailed": "上传图片失败",
+ "updated": "修改成功",
+ "added": "新增成功",
+ "deleteModels": "是否确认删除模型编号为“{{ids}}”的数据项?"
+}
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
index adf8b7bb8..89adfb27d 100644
--- a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
@@ -9,11 +9,11 @@
@click="toggleReasoning"
>
- 深度思考过程
+ {{ $t('plugin.ai:reasoningProcess') }}
思考中...{{ $t('plugin.ai:thinking') }}
新建对话{{ $t('plugin.ai:newConversation') }}
- {{ session.sessionTitle || '新对话' }}
+ {{ session.sessionTitle || $t('plugin.ai:newConversation') }}
{{ formatTime(session.createdAt) }}
@@ -48,7 +48,7 @@
v-if="sessionList.length === 0 && !sessionLoading"
class="empty-session"
>
- 暂无历史对话
+ {{ $t('plugin.ai:noConversationHistory') }}
@@ -57,11 +57,11 @@
@@ -307,7 +308,7 @@
-
+
-
+
-
+
-
+
@@ -390,12 +391,12 @@
-
+
@@ -403,11 +404,11 @@
@@ -425,6 +426,8 @@
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/components/FileUpload/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/components/FileUpload/index.vue
index 2a7ea2e0c..727f41661 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/components/FileUpload/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/components/FileUpload/index.vue
@@ -225,7 +225,9 @@ export default {
},
// 文件个数超出
handleExceed() {
- this.$modal.msgError(t('file:interface.youCanUploadAtMostValueFiles', { value0: this.limit }))
+ this.$modal.msgError(
+ t('file:interface.youCanUploadAtMostValueFiles.index', { value0: this.limit })
+ )
},
// 上传失败
handleUploadError(err) {
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/components/LanguageSelect/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/components/LanguageSelect/index.vue
index bf4f50f5f..6339bf270 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/components/LanguageSelect/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/components/LanguageSelect/index.vue
@@ -1,14 +1,13 @@
+
', path, hljs),
+ '<script>&</script>'
+ )
+ }
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs
new file mode 100644
index 000000000..7d9ef90a0
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs
@@ -0,0 +1,77 @@
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import { createRequire } from 'node:module'
+import { test } from 'node:test'
+
+const require = createRequire(import.meta.url)
+const Vue = require('vue')
+const Vuex = require('vuex')
+Vue.use(Vuex)
+const read = (path) =>
+ readFileSync(new URL(`../../src/${path}`, import.meta.url), 'utf8').replace(/^import .*$/gm, '')
+
+test('dictionary consumers retain their array and ignore late responses after invalidation or logout', async () => {
+ let token = 'account-one'
+ const requests = []
+ const module = new Function(
+ 'getDicts',
+ 'getToken',
+ read('store/modules/dict.js').replace('export default', 'return')
+ )(
+ () => new Promise((resolve) => requests.push(resolve)),
+ () => token
+ )
+ const store = new Vuex.Store({ modules: { dict: module } })
+ const DictData = new Function(
+ 'resolveText',
+ read('utils/dict/DictData.js').replace('export default class', 'return class')
+ )((text) => text)
+ const DictMeta = {
+ parse: (type) => ({
+ type,
+ request: () => store.dispatch('dict/loadDict', type),
+ responseConverter: (rows) =>
+ rows.map((row) => new DictData(row.dictLabel, row.dictValue, row)),
+ }),
+ }
+ const Dict = new Function(
+ 'Vue',
+ 'mergeRecursive',
+ 'DictMeta',
+ 'DictData',
+ read('utils/dict/Dict.js').replace('export default class Dict', 'class Dict') + ';return Dict'
+ )(Vue, (_defaults, options) => options, DictMeta, DictData)
+ const install = new Function(
+ 'Dict',
+ 'mergeOptions',
+ read('utils/dict/index.js').replace('export default function', 'return function')
+ )(Dict, () => {})
+ const LocalVue = Vue.extend()
+ install(LocalVue, {})
+ const first = new LocalVue({ store, dicts: ['status'] })
+ const second = new LocalVue({ store, dicts: ['status'] })
+ const held = first.dict.type.status
+ assert.equal(requests.length, 1)
+ store.commit('dict/REMOVE_DICT', 'status')
+ await Vue.nextTick()
+ assert.equal(requests.length, 2)
+ requests[1]({ data: [{ dictLabel: 'new', dictLabelI18n: { 'en-US': 'New' }, dictValue: '1' }] })
+ await new Promise(setImmediate)
+ assert.equal(held[0].label, 'new')
+ assert.equal(second.dict.type.status[0].label, 'new')
+ requests[0]({ data: [{ dictLabel: 'old', dictLabelI18n: {}, dictValue: '1' }] })
+ await new Promise(setImmediate)
+ assert.equal(held[0].label, 'new')
+ assert.equal(first.dict.type.status, held, 'existing consumer references stay attached')
+ store.commit('dict/REMOVE_DICT', 'status')
+ await Vue.nextTick()
+ token = null
+ store.commit('dict/CLEAN_DICT')
+ await Vue.nextTick()
+ requests[2]({ data: [{ dictLabel: 'old account', dictValue: '1' }] })
+ await new Promise(setImmediate)
+ assert.equal(held.length, 0)
+ assert.equal(requests.length, 3)
+ first.$destroy()
+ second.$destroy()
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.mjs
new file mode 100644
index 000000000..e24dbafc8
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.mjs
@@ -0,0 +1,97 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { mkdtemp, mkdir, writeFile, rm } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import { dirname, join, sep } from 'node:path'
+import { pathToFileURL } from 'node:url'
+import { checkLocaleRegistration } from '../../scripts/check-i18n.mjs'
+
+async function fixture() {
+ const root = await mkdtemp(join(tmpdir(), 'ruoyi-message-shapes-'))
+ const url = pathToFileURL(root + sep)
+ const write = async (file, content) => {
+ const path = join(root, file)
+ await mkdir(dirname(path), { recursive: true })
+ await writeFile(path, content)
+ }
+ const metadata = (codes) => ({
+ sourceLocale: 'zh-CN',
+ defaultLocale: 'zh-CN',
+ locales: codes.map((code) => ({
+ code,
+ enabled: true,
+ aliases: [],
+ fallback: [],
+ direction: 'ltr',
+ })),
+ })
+ await write('src/i18n/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US'])))
+ for (const code of ['zh-CN', 'en-US']) {
+ await write(
+ `src/i18n/locales/${code}/common.json`,
+ JSON.stringify({ ready: code, branch: { leaf: code }, list: [code] })
+ )
+ }
+ // A host language must not become an implicit requirement of the plugin.
+ await write('plugins/example/locale-meta.json', JSON.stringify(metadata(['zh-CN'])))
+ await write('plugins/example/locales/zh-CN.json', JSON.stringify({ ready: '插件' }))
+ return { root, url, write }
+}
+
+test('literal string messages pass and comments, examples and missing keys remain separate concerns', async () => {
+ const { root, url, write } = await fixture()
+ try {
+ await write(
+ 'src/Example.jsx',
+ `// t('common:branch')
+const example = "t('common:list')";
+export const render = () => {t('common:branch.leaf')}{t('common:missing')};
+const dynamic = 'common:' + name; t(dynamic);`
+ )
+ await write(
+ 'src/Example.vue',
+ `{{ t('common:branch.leaf') }}
+`
+ )
+ assert.deepEqual(await checkLocaleRegistration(url), [
+ { name: 'host', locales: ['zh-CN', 'en-US'] },
+ { name: 'plugin.example', locales: ['zh-CN'] },
+ ])
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+})
+
+for (const locale of ['zh-CN', 'en-US']) {
+ for (const [shape, message] of [
+ ['object', { nested: 'text' }],
+ ['array', ['text']],
+ ]) {
+ test(`rejects ${locale} ${shape} messages referenced from Vue templates and JS calls`, async () => {
+ const { root, url, write } = await fixture()
+ try {
+ for (const code of ['zh-CN', 'en-US']) {
+ await write(
+ `src/i18n/locales/${code}/common.json`,
+ JSON.stringify({ ready: 'OK', invalid: code === locale ? message : 'Valid string' })
+ )
+ }
+ await write('src/script.js', "this.$t('common:invalid')")
+ await write(
+ 'src/views/tool/build/Example.vue',
+ `{{ $t('common:invalid') }}`
+ )
+ await assert.rejects(checkLocaleRegistration(url), (error) => {
+ assert.match(error.message, /Invalid translation message shape/)
+ assert.ok(error.message.includes(`common:invalid resolves to ${shape} in ${locale}`))
+ assert.ok(error.message.includes('src/script.js:1'))
+ assert.ok(error.message.includes('src/views/tool/build/Example.vue:1'))
+ assert.equal(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN'), false)
+ return true
+ })
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+ })
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs
index 96f12ccc6..734c9caa2 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs
@@ -4,7 +4,9 @@ import { createRequire } from 'node:module'
import { test } from 'node:test'
import { withLocalePatch } from '../../src/utils/localePayload.mjs'
import { restoreVisitedViews, serializeVisitedViews } from '../../src/utils/tagsView.js'
+import { createPluginLocaleRuntime } from '../../src/i18n/plugin.mjs'
import { createLocaleRuntime } from '../../src/i18n/runtime.mjs'
+import LocaleForms from '../../src/i18n/forms.js'
const require = createRequire(import.meta.url)
const Vue = require('vue')
@@ -25,12 +27,14 @@ const source = readFileSync(new URL('../../src/i18n/adapter.js', import.meta.url
const adapter = new Function(
'Vue',
'i18n',
+ 'createPluginLocaleRuntime',
source
- .replace(/^import .*\n/gm, '')
+ .replace(/^import .*\r?\n/gm, '')
.replace(/export const /g, 'const ')
+ .replace(/export function /g, 'function ')
.replace('export default', 'const plugin =') +
- '\nreturn { t, resolveRouteTitle, resolveText, localeState, plugin }'
-)(Vue, i18n)
+ '\nreturn { t, resolveRouteTitle, resolveText, localeState, plugin, createPluginI18n }'
+)(Vue, i18n, createPluginLocaleRuntime)
Vue.use(adapter.plugin)
function router() {
@@ -62,7 +66,7 @@ test('route and dictionary labels react without changing the route, input or val
)
const DictData = new Function(
'resolveText',
- dataSource.replace(/^import .*\n/gm, '').replace('export default class', 'return class')
+ dataSource.replace(/^import .*\r?\n/gm, '').replace('export default class', 'return class')
)(adapter.resolveText)
const option = new DictData('正常', '0', { dictLabelI18n: { 'en-US': 'Active' } })
const vm = new Vue({
@@ -103,13 +107,6 @@ test('persisted tabs restore current metadata and explicit custom titles', () =>
assert.equal(restored[0].customTitle, 'User title')
assert.equal(restored[0].params.id, '7')
assert.equal(restored[0].hash, '#details')
- const legacy = restoreVisitedViews(
- [{ path: '/menu/1', title: '旧名称', meta: { title: '旧名称' } }, { path: '/removed' }, null],
- (location) => instance.resolve(location).route
- )
- assert.equal(legacy.length, 1)
- assert.equal(legacy[0].meta.titleI18n['en-US'], 'Menu')
- assert.equal(legacy[0].customTitle, undefined)
})
test('locale patches preserve omitted languages and distinguish updates from deletion', () => {
@@ -128,10 +125,8 @@ test('locale patches preserve omitted languages and distinguish updates from del
})
test('a locale change revalidates only fields already displaying errors', () => {
- const formSource = readFileSync(new URL('../../src/i18n/forms.js', import.meta.url), 'utf8')
- const plugin = new Function(formSource.replace('export default', 'return'))()
let mixin
- plugin.install({
+ LocaleForms.install({
mixin(value) {
mixin = value
},
@@ -149,3 +144,27 @@ test('a locale change revalidates only fields already displaying errors', () =>
mixin.watch['$locale.locale'].call(form)
assert.deepEqual(calls, [''])
})
+
+test('a plugin translator tracks Vue computed text without replacing its draft', async () => {
+ const plugin = adapter.createPluginI18n(
+ meta,
+ {
+ 'zh-CN': { 'plugin.test': { title: '插件标题' } },
+ 'en-US': { 'plugin.test': { title: 'Plugin title' } },
+ },
+ 'plugin.test'
+ )
+ const vm = new Vue({
+ data: () => ({ draft: 'unsaved' }),
+ computed: { title: () => plugin.t('title') },
+ })
+ await i18n.setPreference('zh-CN')
+ await Vue.nextTick()
+ assert.equal(vm.title, '插件标题')
+ await i18n.setPreference('en-US')
+ await Vue.nextTick()
+ assert.equal(vm.title, 'Plugin title')
+ assert.equal(vm.draft, 'unsaved')
+ plugin.removePluginLocales()
+ vm.$destroy()
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs
new file mode 100644
index 000000000..d70a3043c
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs
@@ -0,0 +1,80 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { createLocaleRuntime } from '../../src/i18n/runtime.mjs'
+import { createPluginLocaleRuntime } from '../../src/i18n/plugin.mjs'
+
+const entry = (code, fallback = []) => ({
+ code,
+ enabled: true,
+ direction: 'ltr',
+ aliases: [],
+ fallback,
+})
+const hostMeta = {
+ sourceLocale: 'zh-CN',
+ defaultLocale: 'zh-CN',
+ locales: [entry('zh-CN'), entry('en-US'), entry('ja-JP')],
+}
+function hostRuntime() {
+ return createLocaleRuntime({
+ meta: hostMeta,
+ resources: Object.fromEntries(
+ hostMeta.locales.map(({ code }) => [code, { common: { hello: code } }])
+ ),
+ storage: { get() {}, set() {} },
+ scope: 'plugin-test',
+ })
+}
+function plugin(host, namespace = 'plugin.demo') {
+ return createPluginLocaleRuntime({
+ host,
+ namespace,
+ meta: {
+ sourceLocale: 'zh-CN',
+ defaultLocale: 'en-US',
+ languageFallbacks: { en: 'en-US' },
+ locales: [entry('zh-CN'), entry('en-US', ['zh-CN'])],
+ },
+ resources: {
+ 'zh-CN': { [namespace]: { hello: '你好', sourceOnly: '源语言' } },
+ 'en-US': { [namespace]: { hello: 'Hello' } },
+ },
+ })
+}
+
+test('source plugins resolve the host language using only their own defaults and fallback chain', async () => {
+ const host = hostRuntime()
+ const first = plugin(host)
+ const second = plugin(host, 'plugin.other')
+ assert.equal(first.t('hello'), '你好')
+ await host.setPreference('en-US')
+ assert.equal(first.t('hello'), 'Hello')
+ assert.equal(first.t('sourceOnly'), '源语言')
+ await host.setPreference('ja-JP')
+ assert.equal(host.locale, 'ja-JP')
+ assert.equal(host.headers['Accept-Language'], 'ja-JP')
+ assert.equal(first.locale, 'en-US')
+ assert.equal(first.t('hello'), 'Hello')
+ assert.equal(host.engine.hasResourceBundle('en-US', 'plugin.demo'), false)
+ assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.other'), false)
+ assert.equal(second.t('hello'), 'Hello')
+})
+
+test('unregistering and registering a plugin changes only its instance and preserves its catalogs', async () => {
+ const host = hostRuntime()
+ const first = plugin(host)
+ const second = plugin(host, 'plugin.other')
+ first.removePluginLocales()
+ await host.setPreference('en-US')
+ assert.equal(first.locale, 'zh-CN')
+ assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.demo'), false)
+ assert.equal(second.t('hello'), 'Hello')
+ assert.equal(host.t('common:hello'), 'en-US')
+ first.registerPluginLocales()
+ first.registerPluginLocales()
+ assert.equal(first.locale, 'en-US')
+ assert.equal(first.t('hello'), 'Hello')
+ first.removePluginLocales()
+ first.registerPluginLocales()
+ assert.equal(first.t('sourceOnly'), '源语言')
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs
new file mode 100644
index 000000000..49ad1687e
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs
@@ -0,0 +1,226 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { readFileSync } from 'node:fs'
+import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.mjs'
+
+const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url)))
+const resources = {
+ 'zh-CN': { common: { sample: '中文' } },
+ 'en-US': { common: { sample: 'English' } },
+}
+function setup(storage = { get: () => null, set: () => {} }, extra = {}) {
+ return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra })
+}
+const key = 'contract:api:locale:v2:user:7'
+
+test('declared language families preserve exact variants', () => {
+ const registry = createLocaleRegistry(meta, resources)
+ assert.equal(registry.resolve('auto', ['en-GB']), 'en-US')
+ assert.equal(registry.resolve('auto', ['en-AU']), 'en-US')
+ const expanded = {
+ ...meta,
+ defaultLocale: 'en-US',
+ locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }],
+ }
+ const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} })
+ assert.equal(precise.resolve('en-GB'), 'en-GB')
+ assert.equal(precise.resolve('zh-TW'), 'en-US')
+ assert.throws(
+ () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources),
+ /Invalid language fallback/
+ )
+})
+
+test('source language supplies missing text independently of the negotiation default', async () => {
+ const expanded = {
+ ...meta,
+ defaultLocale: 'en-US',
+ locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }],
+ }
+ const runtime = setup(undefined, {
+ meta: expanded,
+ resources: { ...resources, 'ja-JP': { common: {} } },
+ })
+ assert.equal(runtime.registry.resolve('unknown'), 'en-US')
+ await runtime.setPreference('ja-JP')
+ assert.equal(runtime.t('common:sample'), '中文')
+ assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称')
+})
+
+test('delayed save responses cannot overwrite a newer server revision from another tab', async () => {
+ const data = new Map()
+ const events = []
+ const storage = {
+ get: (k) => data.get(k),
+ set: (k, v) => {
+ data.set(k, v)
+ events.push([k, v])
+ },
+ }
+ const a = setup(storage),
+ b = setup(storage)
+ a.setAccount(7, 'zh-CN', '0')
+ b.setAccount(7, 'zh-CN', '0')
+ let release
+ let server = { locale: 'zh-CN', revision: '0' }
+ const delayed = a.setPreference('en-US', {
+ save: async () => {
+ server = { locale: 'en-US', revision: '1' }
+ const response = { ...server }
+ await new Promise((resolve) => {
+ release = resolve
+ })
+ return response
+ },
+ })
+ await Promise.resolve()
+ await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) })
+ a.acceptStorageEvent(key, data.get(key))
+ const writes = events.length
+ release()
+ await delayed
+ assert.deepEqual(server, { locale: 'auto', revision: '2' })
+ assert.equal(a.preference, 'auto')
+ assert.equal(b.preference, 'auto')
+ assert.equal(events.length, writes)
+ assert.deepEqual(JSON.parse(data.get(key)), server)
+})
+
+test('out-of-order storage and profile reads preserve the latest decimal revision', () => {
+ const data = new Map()
+ const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }
+ const runtime = setup(storage)
+ runtime.setAccount(7, 'en-US', '9007199254740993')
+ const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' })
+ data.set(key, old)
+ runtime.acceptStorageEvent(key, old)
+ runtime.setAccount(7, 'zh-CN', '9007199254740992')
+ assert.equal(runtime.preference, 'en-US')
+ assert.equal(runtime.preferenceRevision, '9007199254740993')
+ assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993')
+ const restored = setup(storage)
+ restored.initialize(true)
+ assert.equal(restored.preference, 'en-US')
+ assert.equal(restored.preferenceRevision, '9007199254740993')
+})
+
+test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => {
+ const runtime = setup()
+ runtime.setAccount(7, 'zh-CN', '1')
+ await runtime.setPreference('en-US', {
+ save: async () => {
+ throw Error('timeout')
+ },
+ readBack: async () => ({ locale: 'en-US', revision: '2' }),
+ })
+ assert.equal(runtime.preferenceRevision, '2')
+ await assert.rejects(
+ runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }),
+ /Invalid locale snapshot/
+ )
+ assert.equal(runtime.preference, 'en-US')
+})
+
+test('offline account snapshots, guest choices and API instances are isolated', async () => {
+ const data = new Map()
+ const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }
+ const runtime = setup(storage)
+ await runtime.setPreference('auto')
+ runtime.setAccount(7, 'en-US', '1')
+ const restored = setup(storage)
+ restored.initialize(true)
+ assert.equal(restored.preference, 'en-US')
+ assert.equal(restored.preferenceRevision, '1')
+ restored.setAccount(8, 'zh-CN', '0')
+ restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' }))
+ assert.equal(restored.preference, 'zh-CN')
+ restored.setAccount(null)
+ assert.equal(restored.preference, 'auto')
+ const other = setup(storage, { scope: 'other:api' })
+ other.initialize(true)
+ assert.equal(other.accountId, null)
+ assert.equal(other.preference, 'zh-CN')
+})
+
+test('refreshing the same account does not cancel a pending save', async () => {
+ const runtime = setup()
+ runtime.setAccount(7, 'zh-CN', '0')
+ let finish
+ const pending = runtime.setPreference('en-US', {
+ save: () =>
+ new Promise((resolve) => {
+ finish = resolve
+ }),
+ })
+ await Promise.resolve()
+ runtime.setAccount(7, 'zh-CN', '0')
+ finish({ locale: 'en-US', revision: '1' })
+ await pending
+ assert.equal(runtime.preference, 'en-US')
+ assert.equal(runtime.preferenceRevision, '1')
+})
+
+test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => {
+ const runtime = setup()
+ runtime.setAccount(7, 'zh-CN', '1')
+ await assert.rejects(
+ runtime.setPreference('en-US', {
+ save: async () => {
+ throw Error('timeout')
+ },
+ readBack: async () => ({ locale: 'auto', revision: '3' }),
+ }),
+ /timeout/
+ )
+ assert.equal(runtime.preference, 'auto')
+ assert.equal(runtime.preferenceRevision, '3')
+})
+
+test('invalid profile snapshots leave the current account and its revision intact', () => {
+ const runtime = setup()
+ runtime.setAccount(7, 'en-US', '4')
+ assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/)
+ assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/)
+ assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/)
+ assert.equal(runtime.accountId, '7')
+ assert.equal(runtime.preferenceRevision, '4')
+ assert.equal(runtime.preference, 'en-US')
+})
+
+test('dynamic names keep the database source when an application uses English source catalogs', async () => {
+ const expanded = {
+ ...meta,
+ sourceLocale: 'en-US',
+ locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }],
+ }
+ const runtime = setup(undefined, {
+ meta: expanded,
+ resources: { ...resources, 'ja-JP': { common: {} } },
+ })
+ const translations = { 'en-US': 'Users' }
+ await runtime.setPreference('en-US')
+ assert.equal(runtime.resolveText('用户管理', translations), 'Users')
+ await runtime.setPreference('ja-JP')
+ assert.equal(runtime.t('common:sample'), 'English')
+ assert.equal(runtime.resolveText('用户管理', translations), '用户管理')
+})
+
+test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => {
+ const warn = ctx.mock.method(console, 'warn', () => {})
+ const runtime = setup(undefined, {
+ appVersion: '2.0.0',
+ resources: {
+ ...resources,
+ 'en-US': { common: { translationUnavailable: 'Text unavailable' } },
+ },
+ })
+ const t = runtime.engine.getFixedT('en-US', 'layout')
+ const options = { name: 'Private name' }
+ assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name')
+ assert.equal(t('missing', options), 'Text unavailable')
+ assert.equal(warn.mock.callCount(), 1)
+ assert.deepEqual(warn.mock.calls[0].arguments, [
+ 'Missing translation',
+ { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' },
+ ])
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs
index f4548fc52..b6223a13d 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs
@@ -63,7 +63,7 @@ test('third language is configured, not a two-language branch', async () => {
})
test('save failure leaves active language and preference intact', async () => {
const runtime = setup()
- runtime.setAccount(1, 'zh-CN')
+ runtime.setAccount(1, 'zh-CN', '0')
await assert.rejects(
runtime.setPreference('en-US', {
save: async () => {
@@ -76,7 +76,7 @@ test('save failure leaves active language and preference intact', async () => {
})
test('an old save cannot overwrite a new account', async () => {
const runtime = setup()
- runtime.setAccount(1, 'zh-CN')
+ runtime.setAccount(1, 'zh-CN', '0')
let done
const pending = runtime.setPreference('en-US', {
save: () =>
@@ -85,7 +85,7 @@ test('an old save cannot overwrite a new account', async () => {
}),
})
await Promise.resolve()
- runtime.setAccount(2, 'zh-CN')
+ runtime.setAccount(2, 'zh-CN', '0')
done()
await assert.rejects(pending)
assert.equal(runtime.accountId, '2')
@@ -94,7 +94,7 @@ test('an old save cannot overwrite a new account', async () => {
test('guest preference returns after logout; unsupported account preference is retained', async () => {
const runtime = setup()
await runtime.setPreference('en-US')
- runtime.setAccount(1, 'fr-CA')
+ runtime.setAccount(1, 'fr-CA', '0')
assert.equal(runtime.preference, 'fr-CA')
assert.equal(runtime.locale, 'zh-CN')
runtime.setAccount(null)
@@ -113,10 +113,11 @@ test('auto follows changed device locale without changing the preference', async
})
test('preference switches are serialized and recover after failed requests', async () => {
const runtime = setup()
- runtime.setAccount(1)
+ runtime.setAccount(1, 'zh-CN', '0')
const seen = []
const save = async (value) => {
seen.push(value)
+ return { locale: value, revision: String(seen.length) }
}
await Promise.all([
runtime.setPreference('en-US', { save }),
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs
index 1d696f5e0..c357a410b 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs
@@ -1,11 +1,13 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { createRequire } from 'node:module'
+import { fileURLToPath } from 'node:url'
import { test } from 'node:test'
const require = createRequire(import.meta.url)
const Vue = require('vue')
const { i18n, t } = require('./test-runtime.cjs')
+const { loadModule } = require('../support/load-module.cjs')
function component(name) {
const source = readFileSync(
@@ -52,3 +54,28 @@ test('editor tooltips and picker text react without recreating editor content',
vm.$destroy()
await i18n.setPreference('zh-CN')
})
+
+test('import feedback is a text node and preserves literal markup and newlines', () => {
+ const vm = new Vue()
+ const text = 'Row 1: example\nRow 2'
+ let message
+ vm.$alert = (node) => {
+ message = node
+ }
+ component('ExcelImportDialog').methods.handleSuccess.call(vm, { msg: text })
+ assert.equal(message.children.length, 1)
+ assert.equal(message.children[0].tag, undefined)
+ assert.equal(message.children[0].text, text)
+ vm.$destroy()
+})
+
+test('download errors retain server detail and have a translated string fallback', () => {
+ const { getResponseMessage } = loadModule(
+ fileURLToPath(new URL('../../src/utils/errorCode.js', import.meta.url))
+ )
+ assert.equal(getResponseMessage({ code: 403, msg: 'Specific message' }), 'Specific message')
+ assert.equal(typeof getResponseMessage({ code: 403 }), 'string')
+ const fallback = getResponseMessage({ code: 999, msg: ' ' })
+ assert.equal(typeof fallback, 'string')
+ assert.ok(fallback.trim())
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs
new file mode 100644
index 000000000..98a12a0b2
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs
@@ -0,0 +1,58 @@
+import assert from 'node:assert/strict'
+import { createRequire } from 'node:module'
+import { test } from 'node:test'
+import LocaleForms from '../../src/i18n/forms.js'
+import { resolveRuleMessages } from '../../src/i18n/validation.mjs'
+
+const require = createRequire(import.meta.url)
+const elementRequire = createRequire(require.resolve('element-ui/package.json'))
+const ValidatorModule = elementRequire('async-validator')
+const Validator = ValidatorModule.default || ValidatorModule
+
+function errors(rules, model) {
+ return new Promise((resolve) => {
+ new Validator(rules).validate(model, (failures) => resolve(failures || []))
+ })
+}
+
+test('Element UI receives translated error strings on every validation', async () => {
+ let locale = 'zh-CN'
+ const messages = { 'zh-CN': '请输入密钥编号', 'en-US': 'Enter a key ID' }
+ const rule = Object.freeze({ required: true, message: () => messages[locale], trigger: 'blur' })
+ let mixin
+ LocaleForms.install({ mixin: (value) => (mixin = value) })
+ const field = { $options: { name: 'ElFormItem' }, getRules: () => [rule] }
+ mixin.created.call(field)
+ assert.equal((await errors({ kid: field.getRules() }, { kid: '' }))[0].message, messages['zh-CN'])
+ locale = 'en-US'
+ assert.equal((await errors({ kid: field.getRules() }, { kid: '' }))[0].message, messages['en-US'])
+ assert.deepEqual(await errors({ kid: field.getRules() }, { kid: 'primary-2026' }), [])
+ assert.equal(typeof rule.message, 'function')
+ assert.equal(field.getRules()[0].trigger, 'blur')
+})
+
+test('nested and array rules keep validators and values while translating messages', async () => {
+ const pattern = /^[a-z]+$/
+ const validator = (_rule, value, callback) => callback(value === 'kept' ? undefined : 'invalid')
+ const source = {
+ type: 'object',
+ fields: {
+ name: { pattern, message: () => 'Letters only' },
+ tags: { type: 'array', defaultField: { required: true, message: () => 'Enter a tag' } },
+ custom: { validator },
+ },
+ }
+ const normalized = resolveRuleMessages(source)
+ assert.equal(normalized.fields.name.pattern, pattern)
+ assert.equal(normalized.fields.custom.validator, validator)
+ assert.equal(typeof source.fields.name.message, 'function')
+ assert.equal(typeof source.fields.tags.defaultField.message, 'function')
+ const model = { profile: { name: '123', tags: [''], custom: 'kept' } }
+ const before = structuredClone(model)
+ const failures = await errors({ profile: normalized }, model)
+ assert.deepEqual(failures.map((failure) => failure.message).sort(), [
+ 'Enter a tag',
+ 'Letters only',
+ ])
+ assert.deepEqual(model, before)
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs
new file mode 100644
index 000000000..e80dbbbe7
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs
@@ -0,0 +1,90 @@
+import assert from 'node:assert/strict'
+import { test } from 'node:test'
+import { mkdtemp, writeFile, readFile, mkdir, rm } from 'node:fs/promises'
+import { tmpdir } from 'node:os'
+import { join, dirname, sep } from 'node:path'
+import { pathToFileURL } from 'node:url'
+import { createRequire } from 'node:module'
+import { spawnSync } from 'node:child_process'
+import { checkLocaleRegistration } from '../../scripts/check-i18n.mjs'
+
+const require = createRequire(import.meta.url)
+const cli = join(dirname(require.resolve('@x18n/cli/package.json')), 'bin.mjs')
+
+test('host and plugin checks use independent declared language sets', async () => {
+ const root = await mkdtemp(join(tmpdir(), 'ruoyi-plugin-locales-'))
+ const rootUrl = pathToFileURL(root + sep)
+ const write = async (file, text) => {
+ const path = join(root, file)
+ await mkdir(dirname(path), { recursive: true })
+ await writeFile(path, text)
+ }
+ const metadata = (codes) => ({
+ sourceLocale: 'zh-CN',
+ defaultLocale: 'zh-CN',
+ locales: codes.map((code) => ({
+ code,
+ enabled: true,
+ aliases: [],
+ fallback: [],
+ direction: 'ltr',
+ })),
+ })
+ try {
+ for (const file of [
+ 'x18n.config.mjs',
+ 'src/i18n/x18n.config.mjs',
+ 'plugins/ai/x18n.config.mjs',
+ ]) {
+ const original = await readFile(new URL(`../../${file}`, import.meta.url), 'utf8')
+ const finder = new URL('../../scripts/x18n-project.mjs', import.meta.url).href
+ await write(
+ file,
+ original.replace("'../../scripts/x18n-project.mjs'", JSON.stringify(finder))
+ )
+ }
+ await write('src/i18n/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US', 'ja-JP'])))
+ await write('plugins/ai/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US'])))
+ for (const code of ['zh-CN', 'en-US', 'ja-JP'])
+ await write(`src/i18n/locales/${code}/common.json`, JSON.stringify({ greeting: code }))
+ for (const code of ['zh-CN', 'en-US'])
+ await write(`plugins/ai/locales/${code}.json`, JSON.stringify({ greeting: code }))
+ await write('src/example.js', "t('common:greeting')")
+ await write('plugins/ai/views/example.js', "t('plugin.ai:greeting')")
+ const projects = await checkLocaleRegistration(rootUrl)
+ assert.deepEqual(
+ projects.map((project) => project.locales.length),
+ [3, 2]
+ )
+ const check = () => {
+ const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], {
+ encoding: 'utf8',
+ })
+ return { status: result.status, report: JSON.parse(result.stdout) }
+ }
+ const valid = check()
+ assert.equal(valid.status, 0, JSON.stringify(valid.report))
+ assert.deepEqual(
+ valid.report.data.projects.map((project) => [project.name, project.coverage.length]),
+ [
+ ['plugin.ai', 2],
+ ['host', 3],
+ ]
+ )
+ await write(
+ 'plugins/ai/locale-meta.json',
+ JSON.stringify(metadata(['zh-CN', 'en-US', 'ja-JP']))
+ )
+ await assert.rejects(checkLocaleRegistration(rootUrl), /ja-JP/)
+ await write('plugins/ai/locales/ja-JP.json', JSON.stringify({ greeting: '' }))
+ const missing = check()
+ assert.equal(missing.status, 1)
+ assert.ok(
+ missing.report.diagnostics.some(
+ (item) => item.code === 'empty-translation' && item.locale === 'ja-JP'
+ )
+ )
+ } finally {
+ await rm(root, { recursive: true, force: true })
+ }
+})
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs
index 597ce10a1..f7da3e68a 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs
@@ -260,7 +260,9 @@ module.exports = (async () => {
}
const load = createLoader({
'@/i18n': {
- i18n: { headers: { 'Accept-Language': 'zh-CN', 'X-I18n-Version': '1' } },
+ i18n: {
+ headers: { 'Accept-Language': 'zh-CN' },
+ },
t: require('../i18n/test-runtime.cjs').t,
},
axios,
@@ -278,7 +280,6 @@ module.exports = (async () => {
'@/store': { dispatch: async () => {} },
'@/utils/auth': { getToken: () => 'test-main-session' },
'@/utils/time': { getDisplayTimezone: () => 'UTC' },
- '@/utils/errorCode': {},
'@/utils/ruoyi': { tansParams: () => '', blobValidate: () => true },
'@/plugins/cache': {},
'file-saver': { saveAs() {} },
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs
index ae752b52e..74529249a 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs
@@ -91,6 +91,7 @@ const stream = createPluginSseTransport({
shouldEncryptRequest: (_, policy) => policy.active,
serializeParams: (params) => new URLSearchParams(params).toString(),
getTimezone: () => 'Asia/Shanghai',
+ getLocale: () => 'en-US',
origin: 'https://test',
fetchImpl: async (...args) => {
fetched.push(args)
@@ -110,6 +111,7 @@ assert.deepEqual(fetched[0][1].headers, {
Accept: 'text/event-stream',
'X-Plugin-CSRF': 'host-only',
'X-Timezone': 'Asia/Shanghai',
+ 'Accept-Language': 'en-US',
'Last-Event-ID': '4',
})
assert.equal(fetched[0][1].credentials, 'same-origin')
diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs
index dac725e02..93a24ae2a 100644
--- a/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs
@@ -1,3 +1,7 @@
-import { runLogoutTests } from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs'
+import {
+ runLogoutTests,
+ runUserInfoSessionTests,
+} from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs'
runLogoutTests(new URL('../../', import.meta.url), 'vue2')
+runUserInfoSessionTests(new URL('../../', import.meta.url), 'vue2')
diff --git a/ruoyi-fastapi-frontend/vue2/web/x18n.config.mjs b/ruoyi-fastapi-frontend/vue2/web/x18n.config.mjs
index 7b6af0f1c..1369b76ee 100644
--- a/ruoyi-fastapi-frontend/vue2/web/x18n.config.mjs
+++ b/ruoyi-fastapi-frontend/vue2/web/x18n.config.mjs
@@ -1,37 +1,15 @@
-// https://x18n.dev/raw/guide/configuration.md
-import { readFileSync } from 'node:fs'
-import projectResources from './scripts/x18n-project.mjs'
+import { existsSync, readdirSync } from 'node:fs'
-const meta = JSON.parse(
- readFileSync(new URL('./src/i18n/locale-meta.json', import.meta.url), 'utf8')
-)
+// 每个项目单独声明语言,新增宿主语言不会要求插件补齐该语言。
+const plugins = new URL('./plugins/', import.meta.url)
export default {
- sourceLocale: meta.sourceLocale,
- locales: [
- ...new Set([
- meta.sourceLocale,
- ...meta.locales.filter((item) => item.enabled).map((item) => item.code),
- ]),
+ projects: [
+ 'src/i18n',
+ ...readdirSync(plugins, { withFileTypes: true })
+ .filter(
+ (entry) =>
+ entry.isDirectory() && existsSync(new URL(`${entry.name}/x18n.config.mjs`, plugins))
+ )
+ .map((entry) => `plugins/${entry.name}`),
],
- presets: ['i18next'],
- plugins: [projectResources],
- resources: [
- { pattern: 'src/i18n/locales/{locale}/{namespace}.json' },
- { pattern: 'plugins/ai/locales/{locale}.json', namespace: 'plugin.ai' },
- ],
- namespace: { separator: ':', default: 'common' },
- usage: {
- include: ['src/**/*.{js,jsx,ts,tsx,vue,mjs}', 'plugins/ai/**/*.{js,vue}'],
- exclude: ['src/vendor/**', 'src/uni_modules/**', 'src/i18n/locales/**'],
- regex: [
- { extensions: ['js', 'vue'], patterns: [String.raw`\btitleKey\s*:\s*['"]([^'"]+)['"]`] },
- ],
- calls: [{ callee: '$t' }, { callee: 'useI18n', factory: true, returns: ['t'] }],
- },
- checks: {
- 'missing-translation': 'error',
- 'empty-translation': 'error',
- 'unused-key': 'warning',
- 'hard-string': 'warning',
- },
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/package.json b/ruoyi-fastapi-frontend/vue3/mobile/package.json
index ee4cb7dd1..1f972fabb 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/package.json
+++ b/ruoyi-fastapi-frontend/vue3/mobile/package.json
@@ -94,7 +94,7 @@
"@iconify-json/svg-spinners": "1.2.4",
"@types/node": "22.20.5",
"@vue/runtime-core": "3.4.21",
- "@x18n/cli": "0.1.3",
+ "@x18n/cli": "0.1.14",
"autoprefixer": "10.6.1",
"postcss": "8.5.30",
"prettier": "3.9.10",
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml b/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml
index 7d1fc2981..1338ef46c 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml
+++ b/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml
@@ -130,8 +130,8 @@ importers:
specifier: 3.4.21
version: 3.4.21
'@x18n/cli':
- specifier: 0.1.3
- version: 0.1.3(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)
+ specifier: 0.1.14
+ version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)
autoprefixer:
specifier: 10.6.1
version: 10.6.1(postcss@8.5.30)
@@ -3178,23 +3178,23 @@ packages:
resolution: {integrity: sha512-2BBCMQvSNGSKvxm+W4dDWAtrG5xeTCkBZ4LqLVO8tqm62Vo994YUn9w2/A7G+HeBALG5pARwLb5cHjQPUUEigw==}
engines: {node: ^20.19.0 || >=22.12.0}
- '@x18n/builtins@0.1.3':
- resolution: {integrity: sha512-/T2q1xQ513oZ19VjGLmXVZjxAdzDahDZ4Ssh0IbAVlcOpSSfgZkRgo5uh8JAdQSPxtWBTKHslOYxSptWJq9j7w==}
+ '@x18n/builtins@0.1.14':
+ resolution: {integrity: sha512-ezxyuOAK+YsAL4PbVPyZTOpwsZp1Qoo2vIr8MJQivcQyC80GAaxbpQvmRExikhnThH/OyienjaGRceUsDBYQ6g==}
- '@x18n/cli@0.1.3':
- resolution: {integrity: sha512-aOG1FJ1tJsnnjU3O13CktETY1GLW6FRmsw9KC5Mv35vEhah54O2+JAs0HBrqcmwADZAe7xwm6ZNY4DcaaV+BAQ==}
+ '@x18n/cli@0.1.14':
+ resolution: {integrity: sha512-b38DwR0ZUWujNNIsVE/tRQ4tud5wACIyui4dN578T85r8iH5VvfxNjBj7m8LYOwxNwVGOOheenskVItRvVQEQw==}
engines: {node: '>=22'}
hasBin: true
- '@x18n/core@0.1.3':
- resolution: {integrity: sha512-u4lYzCPwuEctDenT6ZlvElj3LJvR23PJ+XCgWfqhNfgDSrPmippljekba9Hfcl2jBhaWx0SiE63A/wWVVoY4wQ==}
+ '@x18n/core@0.1.14':
+ resolution: {integrity: sha512-gQWKzyX2B9Ppl3AG6Fcls+bshqUJMhfbgtzbFeKlDKNE6IS/w7VSHkm/NLEnLEfxTenwFFQAAPL5NO7i/Ke0Fw==}
- '@x18n/node@0.1.3':
- resolution: {integrity: sha512-ALZVZ8jMblM552yC/ERZXLcmXxNjha1l4OqYUhkcZXibRhKwNqw5k2PvgdN1hcHVoC9DnS02zhyc7Cqbtm/O3w==}
+ '@x18n/node@0.1.14':
+ resolution: {integrity: sha512-Q5W9mjap2fL3CeDmbPrgH11KuKLju3LplAtHvmH6iPttNKgy1JkwOyuKjAr2dpgErRYJOEHhpY4ySZ3j0JNyag==}
engines: {node: '>=22'}
- '@x18n/ui@0.1.3':
- resolution: {integrity: sha512-X7c1MZd9Q5p0hflDYTkvEpZsD9twjvzBfauEDEF8kiz2qcig2uM8jEiieMboEA/yd5ikNc4uS9b2Q7MGcFyaGg==}
+ '@x18n/ui@0.1.14':
+ resolution: {integrity: sha512-5JH91Lli5V66oYk26ebaaEUN6vdhAibWSAX30wxFZLdy952jvKkwzOwQMJlO9b7ftHU/lZneYNH/8+0fH2ZCaQ==}
engines: {node: '>=22'}
abab@2.0.6:
@@ -10194,10 +10194,10 @@ snapshots:
transitivePeerDependencies:
- '@types/node'
- '@x18n/builtins@0.1.3(typescript@5.9.3)':
+ '@x18n/builtins@0.1.14(typescript@5.9.3)':
dependencies:
'@vue/compiler-sfc': 3.5.44
- '@x18n/core': 0.1.3(typescript@5.9.3)
+ '@x18n/core': 0.1.14(typescript@5.9.3)
json5: 2.2.3
jsonc-parser: 3.3.1
oxc-parser: 0.155.0
@@ -10207,12 +10207,12 @@ snapshots:
- '@typescript-eslint/types'
- typescript
- '@x18n/cli@0.1.3(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)':
+ '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)':
dependencies:
- '@x18n/builtins': 0.1.3(typescript@5.9.3)
- '@x18n/core': 0.1.3(typescript@5.9.3)
- '@x18n/node': 0.1.3(typescript@5.9.3)
- '@x18n/ui': 0.1.3(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)
+ '@x18n/builtins': 0.1.14(typescript@5.9.3)
+ '@x18n/core': 0.1.14(typescript@5.9.3)
+ '@x18n/node': 0.1.14(typescript@5.9.3)
+ '@x18n/ui': 0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)
cac: 7.1.0
devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8)
nostics: 1.3.0
@@ -10225,17 +10225,17 @@ snapshots:
- srvx
- typescript
- '@x18n/core@0.1.3(typescript@5.9.3)':
+ '@x18n/core@0.1.14(typescript@5.9.3)':
dependencies:
nostics: 1.3.0
valibot: 1.5.0(typescript@5.9.3)
transitivePeerDependencies:
- typescript
- '@x18n/node@0.1.3(typescript@5.9.3)':
+ '@x18n/node@0.1.14(typescript@5.9.3)':
dependencies:
- '@x18n/builtins': 0.1.3(typescript@5.9.3)
- '@x18n/core': 0.1.3(typescript@5.9.3)
+ '@x18n/builtins': 0.1.14(typescript@5.9.3)
+ '@x18n/core': 0.1.14(typescript@5.9.3)
chokidar: 6.0.0
ignore: 7.0.14
jiti: 2.7.0
@@ -10246,12 +10246,12 @@ snapshots:
- '@typescript-eslint/types'
- typescript
- '@x18n/ui@0.1.3(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)':
+ '@x18n/ui@0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)':
dependencies:
'@devframes/agentic': 1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6)
'@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@5.9.3))
- '@x18n/builtins': 0.1.3(typescript@5.9.3)
- '@x18n/core': 0.1.3(typescript@5.9.3)
+ '@x18n/builtins': 0.1.14(typescript@5.9.3)
+ '@x18n/core': 0.1.14(typescript@5.9.3)
devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8)
valibot: 1.5.0(typescript@5.9.3)
transitivePeerDependencies:
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/App.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/App.vue
index e88d24d09..2e854bc13 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/App.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/App.vue
@@ -5,12 +5,13 @@ import { useConfigStore } from '@/store'
import { getCurrentInstance } from 'vue'
import { onLaunch, onShow } from '@dcloudio/uni-app'
-import { refreshDeviceLocale } from '@/i18n'
+import { i18n, refreshDeviceLocale } from '@/i18n'
import { refreshDeviceTimezone } from '@/utils/time'
const { proxy } = getCurrentInstance()
onLaunch(() => {
+ i18n.initialize(Boolean(getToken()))
initApp()
})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/components/LanguageSelect/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/components/LanguageSelect/index.vue
index 645012673..ab1b46346 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/components/LanguageSelect/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/components/LanguageSelect/index.vue
@@ -15,7 +15,7 @@ import { saveLocale } from '@/i18n/preference'
export default {
name: 'LanguageSelect',
- data: () => ({ busy: false, error: '', languages: i18n.registry.entries }),
+ data: () => ({ busy: false, languages: i18n.registry.entries }),
computed: {
currentLabel() {
return (
@@ -43,7 +43,10 @@ export default {
try {
await saveLocale(value)
} catch {
- uni.showToast({ title: this.$t('common:languageFailed'), icon: 'none' })
+ uni.showToast({
+ title: this.$t('common:languageFailed'),
+ icon: 'none',
+ })
} finally {
this.busy = false
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
index 28d622896..4f30b9b1f 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/adapter.js
@@ -2,7 +2,10 @@ import { setMessageTranslator } from './message.mjs'
import { reactive, toRef } from 'vue'
import { i18n } from './index'
-export const localeState = reactive({ locale: i18n.locale, preference: i18n.preference })
+export const localeState = reactive({
+ locale: i18n.locale,
+ preference: i18n.preference,
+})
i18n.engine.on('languageChanged', (locale) => {
localeState.locale = locale
})
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
index 39b9cada1..56dfdbc1b 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/index.js
@@ -2,6 +2,7 @@ import '@/utils/time' // 原生端须先加载 Intl 兼容实现,再初始化
import '@formatjs/intl-pluralrules/locale-data/zh.js'
import '@formatjs/intl-numberformat/locale-data/zh.js'
import '@formatjs/intl-datetimeformat/locale-data/zh.js'
+import appManifest from '../../package.json'
import { createLocaleRuntime } from './runtime.mjs'
import { meta, resources } from './registry'
import dayjs from 'dayjs'
@@ -10,6 +11,7 @@ import 'dayjs/locale/en'
import config from '@/config'
export const i18n = createLocaleRuntime({
+ appVersion: appManifest.version,
meta,
resources,
storage: {
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
index c27f81908..23564cac0 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locale-meta.json
@@ -20,5 +20,8 @@
"fallback": ["zh-CN"],
"dayjs": "en"
}
- ]
+ ],
+ "languageFallbacks": {
+ "en": "en-US"
+ }
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
index 54cf2991d..b591378d5 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/en-US/common.json
@@ -1,4 +1,5 @@
{
+ "translationUnavailable": "Text unavailable",
"language": "Language",
"followDevice": "Follow device",
"save": "Save",
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
index 177446f56..3dec65109 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/locales/zh-CN/common.json
@@ -1,4 +1,5 @@
{
+ "translationUnavailable": "暂无可用文本",
"language": "语言",
"followDevice": "跟随设备",
"save": "保存",
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
index 3b2526b51..eda0db901 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/names.mjs
@@ -6,10 +6,10 @@ export function updateTranslationPatch(patch, original, locale, value) {
return next
}
-/** 兼容旧缓存并保留业务键值,译文只影响显示标签。 */
+/** 保留字典业务键值,译文只影响显示标签。 */
export function localizeDictionary(items, resolveText) {
return items.map((item) => ({
...item,
- label: resolveText(item.originalLabel ?? item.label, item.labelI18n),
+ label: resolveText(item.originalLabel, item.labelI18n),
}))
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
index b303c6cdf..058742cf9 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/preference.js
@@ -10,8 +10,11 @@ import { i18n } from './index'
*/
export function saveLocale(preference) {
return i18n.setPreference(preference, {
- save: (locale) =>
- request({ url: '/system/user/profile/locale', method: 'put', data: { locale } }),
- readBack: async () => (await getInfo()).user?.locale,
+ save: async (locale) =>
+ (await request({ url: '/system/user/profile/locale', method: 'put', data: { locale } })).data,
+ readBack: async () => {
+ const user = (await getInfo()).user
+ return { locale: user?.locale, revision: user?.localeRevision }
+ },
})
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
index 83a07012c..96159e6e7 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/i18n/runtime.mjs
@@ -1,5 +1,22 @@
import { createInstance } from 'i18next'
+// 菜单和字典原字段由后端数据协议固定为简体中文。
+export const DATA_SOURCE_LOCALE = 'zh-CN'
+
+function normalizeRevision(value) {
+ return typeof value === 'string' &&
+ /^(0|[1-9]\d{0,18})$/.test(value) &&
+ (value.length < 19 || value <= '9223372036854775807')
+ ? value
+ : null
+}
+
+function compareRevision(left, right) {
+ if (left === right) return 0
+ if (right === null) return 1
+ return left.length !== right.length ? left.length - right.length : left > right ? 1 : -1
+}
+
/**
* 规范化语言标识,兼容使用下划线的设备语言。
*
@@ -47,9 +64,14 @@ export function createLocaleRegistry(meta, resources) {
aliases.set(code, entry.code)
}
}
+ const languageFallbacks = meta.languageFallbacks || {}
+ for (const [language, target] of Object.entries(languageFallbacks)) {
+ if (!/^[a-z]{2,8}$/.test(language) || !byCode.has(target))
+ throw new Error(`Invalid language fallback: ${language}`)
+ }
function match(value) {
const code = normalizeLocale(value)
- return byCode.has(code) ? code : aliases.get(code)
+ return byCode.has(code) ? code : aliases.get(code) || languageFallbacks[code?.split('-')[0]]
}
return {
entries,
@@ -61,7 +83,14 @@ export function createLocaleRegistry(meta, resources) {
}
return meta.defaultLocale
},
- chain(code) {
+ /**
+ * 按目标语言、配置的回退语言和指定的原文语言生成查找顺序。
+ *
+ * @param {string} code 目标语言标识
+ * @param {string} [sourceLocale] 原文语言,默认取当前应用的词库基准
+ * @returns {string[]} 去重后的语言标识列表
+ */
+ chain(code, sourceLocale = meta.sourceLocale) {
const result = []
const append = (value) => {
if (result.includes(value)) return
@@ -69,7 +98,7 @@ export function createLocaleRegistry(meta, resources) {
for (const fallback of byCode.get(value)?.fallback || []) append(fallback)
}
append(code)
- append(meta.sourceLocale)
+ append(sourceLocale)
return result
},
get: (code) => byCode.get(code),
@@ -80,6 +109,7 @@ export function createLocaleRegistry(meta, resources) {
* 创建当前应用独立的国际化实例,隔离账号和访客的语言偏好。
*
* @param {Object} options 当前应用的语言、存储和设备适配配置
+ * @param {string} [options.appVersion] 记录缺词诊断时使用的应用版本
* @returns {Object} 翻译、语言切换与偏好管理接口
*/
export function createLocaleRuntime({
@@ -87,17 +117,39 @@ export function createLocaleRuntime({
resources,
storage,
scope,
+ appVersion,
deviceLocales = () => [],
onChange = () => {},
}) {
const registry = createLocaleRegistry(meta, resources)
const engine = createInstance()
let account = null
+ let revision = null
let generation = 0
let preference = meta.defaultLocale
let queue = Promise.resolve()
- const storageKey = () => `${scope}:locale:v1:${account === null ? 'guest' : `user:${account}`}`
+ const accountKey = `${scope}:locale:account`
+ const guestKey = `${scope}:locale:v1:guest`
+ const snapshotKey = () => `${scope}:locale:v2:user:${account}`
const validPreference = (value) => (value === 'auto' ? value : normalizeLocale(value))
+ function parseSnapshot(value) {
+ const locale = validPreference(value?.locale)
+ const version = normalizeRevision(value?.revision)
+ return locale && version !== null ? { locale, revision: version } : null
+ }
+ function readSnapshot(raw) {
+ try {
+ return parseSnapshot(JSON.parse(raw))
+ } catch {
+ return null
+ }
+ }
+ function requireSnapshot(value) {
+ const snapshot = parseSnapshot(value)
+ if (!snapshot) throw new Error('Invalid locale snapshot')
+ return snapshot
+ }
+ const reportedMissingKeys = new Set()
engine.init({
resources,
lng: meta.defaultLocale,
@@ -110,18 +162,46 @@ export function createLocaleRuntime({
interpolation: { escapeValue: false },
returnNull: false,
returnEmptyString: false,
+ appendNamespaceToMissingKey: true,
+ parseMissingKeyHandler(qualifiedKey, defaultValue, options) {
+ const locale = options.lng || engine.language
+ const warningKey = `${locale}:${qualifiedKey}`
+ if (!reportedMissingKeys.has(warningKey)) {
+ reportedMissingKeys.add(warningKey)
+ const [namespace, key] = qualifiedKey.split(':')
+ // 插值参数可能包含业务数据,诊断只记录词条位置和版本。
+ console.warn('Missing translation', { namespace, key, locale, version: appVersion })
+ }
+ return (
+ defaultValue ??
+ engine.t('common:translationUnavailable', { lng: locale, defaultValue: '—' })
+ )
+ },
})
- function commit(value, persist = true) {
+ function applyPreference(value) {
preference = value
const code = registry.resolve(value, deviceLocales())
- // 各端均同步打包当前语言及回退词库,切换时可直接取词。
engine.changeLanguage(code)
- if (persist) storage.set(storageKey(), value)
onChange(code, registry.get(code))
engine.emit('preferenceChanged', value)
}
function restore() {
- commit(validPreference(storage.get(storageKey())) || meta.defaultLocale, false)
+ const snapshot = account === null ? null : readSnapshot(storage.get(snapshotKey()))
+ revision = snapshot?.revision ?? null
+ const value = account === null ? validPreference(storage.get(guestKey)) : snapshot?.locale
+ applyPreference(value || meta.defaultLocale)
+ }
+ function acceptSnapshot(snapshot, persist = true) {
+ // 先读取其他标签页可能已提交的更新,再比较本次回包的 revision。
+ const stored = readSnapshot(storage.get(snapshotKey()))
+ if (stored && compareRevision(stored.revision, revision) > 0) {
+ revision = stored.revision
+ applyPreference(stored.locale)
+ }
+ if (compareRevision(snapshot.revision, revision) <= 0) return
+ revision = snapshot.revision
+ if (persist) storage.set(snapshotKey(), JSON.stringify(snapshot))
+ applyPreference(snapshot.locale)
}
const runtime = {
engine,
@@ -136,11 +216,15 @@ export function createLocaleRuntime({
get accountId() {
return account
},
+ get preferenceRevision() {
+ return revision
+ },
get headers() {
- return { 'Accept-Language': engine.language, 'X-I18n-Version': '1' }
+ return { 'Accept-Language': engine.language }
},
initialize(hasSession = false) {
- const previous = hasSession ? storage.get(`${scope}:locale:account`) : null
+ generation++
+ const previous = hasSession ? storage.get(accountKey) : null
account =
previous === null || previous === undefined || previous === '' ? null : String(previous)
restore()
@@ -149,14 +233,22 @@ export function createLocaleRuntime({
* 切换账号并使旧账号尚未完成的语言切换失效。
*
* @param {string|number|null} id 当前账号标识,null 表示访客
- * @param {string} value 服务端返回的语言偏好
+ * @param {string} [value] 账号快照中的语言偏好
+ * @param {string} [serverRevision] 账号快照的十进制版本号
*/
- setAccount(id, value = meta.defaultLocale) {
- generation++
- account = id === null || id === undefined ? null : String(id)
- storage.set(`${scope}:locale:account`, account || '')
- if (account === null) restore()
- else commit(validPreference(value) || meta.defaultLocale)
+ setAccount(id, value, serverRevision) {
+ if (id === undefined || id === '') throw new Error('Missing locale account')
+ const next = id === null ? null : String(id)
+ const snapshot =
+ next === null ? null : requireSnapshot({ locale: value, revision: serverRevision })
+ if (next !== account) {
+ generation++
+ revision = null
+ }
+ account = next
+ storage.set(accountKey, account || '')
+ if (snapshot) acceptSnapshot(snapshot)
+ else restore()
},
/**
* 串行保存语言偏好,确认保存成功后再更新界面。
@@ -169,37 +261,66 @@ export function createLocaleRuntime({
const canonical = validPreference(value)
if (!canonical) return Promise.reject(new Error('Invalid locale preference'))
const epoch = generation
- const expectedAccount = account
const run = async () => {
if (generation !== epoch) throw new Error('Locale account changed')
// 保存账号偏好前,先确认有效语言的资源已经加载。
const code = registry.resolve(canonical, deviceLocales())
if (!engine.hasResourceBundle(code, 'common')) throw new Error('Missing locale resources')
- if (expectedAccount !== null) {
- if (!save) throw new Error('A preference save callback is required')
- try {
- await save(canonical)
- } catch (error) {
- if (!readBack || (await readBack()) !== canonical) throw error
- }
+ if (account === null) {
+ storage.set(guestKey, canonical)
+ applyPreference(canonical)
+ return
+ }
+ if (!save) throw new Error('A preference save callback is required')
+ let saved
+ let saveError
+ try {
+ saved = await save(canonical)
+ } catch (error) {
+ if (generation !== epoch || !readBack) throw error
+ saveError = error
+ saved = await readBack()
}
if (generation !== epoch) throw new Error('Locale account changed')
- commit(canonical)
+ const snapshot = requireSnapshot(saved)
+ acceptSnapshot(snapshot)
+ if (saveError && snapshot.locale !== canonical) throw saveError
}
const result = queue.then(run)
queue = result.catch(() => {})
return result
},
refreshDeviceLocale() {
- if (preference === 'auto') commit(preference, false)
+ if (preference === 'auto') applyPreference(preference)
},
acceptStorageEvent(key, value) {
- const canonical = validPreference(value)
- if (key === storageKey() && canonical) commit(canonical, false)
+ if (account === null) {
+ if (key === guestKey) {
+ const locale = validPreference(value)
+ if (locale) applyPreference(locale)
+ }
+ return
+ }
+ if (key !== snapshotKey()) return
+ const snapshot = readSnapshot(value)
+ if (!snapshot) return
+ acceptSnapshot(snapshot, false)
+ // 跨标签的并发写入可能乱序,离线快照始终保留已知的最新版本。
+ const stored = readSnapshot(storage.get(snapshotKey()))
+ if (!stored || compareRevision(revision, stored.revision) > 0) {
+ storage.set(snapshotKey(), JSON.stringify({ locale: preference, revision }))
+ }
},
+ /**
+ * 根据当前语言选择菜单或字典译名,回退到数据库原字段。
+ *
+ * @param {string} original 数据库原名
+ * @param {Object} [translations] 按语言标识保存的译名
+ * @returns {string} 当前界面使用的名称
+ */
resolveText(original, translations = {}) {
- for (const code of registry.chain(engine.language)) {
- if (code === meta.sourceLocale) return original
+ for (const code of registry.chain(engine.language, DATA_SOURCE_LOCALE)) {
+ if (code === DATA_SOURCE_LOCALE) return original
if (typeof translations?.[code] === 'string' && translations[code])
return translations[code]
}
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts b/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
index fba6ae0a1..f23550266 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/main.ts
@@ -2,7 +2,6 @@ import { refreshNavigation } from '@/i18n/navigation'
import LocalePlugin from '@/i18n/adapter'
import LanguageSelect from '@/components/LanguageSelect/index.vue'
import { i18n } from '@/i18n'
-import { getToken } from '@/utils/auth'
// @ts-nocheck
import { createSSRApp } from 'vue'
import App from './App.vue'
@@ -18,7 +17,6 @@ export function createApp() {
app.mixin({ onShow: refreshNavigation })
i18n.engine.on('languageChanged', refreshNavigation)
app.component('LanguageSelect', LanguageSelect)
- i18n.initialize(Boolean(getToken()))
app.config.globalProperties.useDict = useDict
install(app)
return {
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
index f5d1e48dd..15ca934f2 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/login.vue
@@ -207,6 +207,7 @@ function loginSuccess(result) {
.then((res) => {
proxy.$tab.reLaunch('/pages/index')
})
+ .catch(() => {})
}
onLoad(() => {
diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/index.vue b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/index.vue
index d47b23324..ecd1093f3 100644
--- a/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/mobile/src/pages/mine/info/index.vue
@@ -98,7 +98,9 @@
$t('mobile:profile.createdAt')
}}
- {{ formatBusinessTime(user.createTime) || '-' }}
+ {{
+ formatDisplayTime(user.createTime, $locale.locale) || '-'
+ }}
@@ -107,7 +109,7 @@
diff --git a/ruoyi-fastapi-frontend/vue3/web/package.json b/ruoyi-fastapi-frontend/vue3/web/package.json
index b98670f36..45df0aed5 100644
--- a/ruoyi-fastapi-frontend/vue3/web/package.json
+++ b/ruoyi-fastapi-frontend/vue3/web/package.json
@@ -67,8 +67,8 @@
"devDependencies": {
"@vitejs/plugin-vue": "6.0.10",
"@vue/compiler-sfc": "3.5.44",
- "@x18n/builtins": "0.1.3",
- "@x18n/cli": "0.1.3",
+ "@x18n/builtins": "0.1.14",
+ "@x18n/cli": "0.1.14",
"esbuild": "0.28.2",
"less": "4.9.1",
"prettier": "3.9.10",
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/README.md b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/README.md
index bd20ebcf4..06106c583 100644
--- a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/README.md
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/README.md
@@ -84,3 +84,14 @@ pnpm run build:prod
```
若只修改文档,不需要执行前端构建。
+
+## 国际化
+
+本插件通过 `i18n.js` 导出的 `t` / `useI18n` 读取独立 i18next 实例。
+`locale-meta.json` 声明本插件的语言集合、默认语言和回退链,词库位于 `locales/`。
+宿主切换语言时插件重新匹配;宿主新增语言不要求本插件同步新增,网络请求仍使用宿主语言。
+
+应用的 `pnpm run i18n:check` 会发现本插件的 `x18n.config.mjs`,按插件声明的语言检查词库。
+也可以在应用目录运行 `pnpm exec x18n --root plugins/ai check` 单独检查插件。
+新增插件语言时同步更新本插件元数据、词库和 `i18n.js` 中的导入。
+会话内卸载时调用 `removePluginLocales()`,重新启用时调用 `registerPluginLocales()`;两者不修改宿主或其他插件资源。
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/i18n.js b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/i18n.js
new file mode 100644
index 000000000..a1070c29e
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/i18n.js
@@ -0,0 +1,9 @@
+import { createPluginI18n } from '@/i18n/adapter'
+import meta from './locale-meta.json'
+import zh from './locales/zh-CN.json'
+import en from './locales/en-US.json'
+
+const namespace = 'plugin.ai'
+const resources = { 'zh-CN': { [namespace]: zh }, 'en-US': { [namespace]: en } }
+export const pluginI18n = createPluginI18n(meta, resources, namespace)
+export const { t, useI18n, registerPluginLocales, removePluginLocales } = pluginI18n
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locale-meta.json b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locale-meta.json
new file mode 100644
index 000000000..444e85b89
--- /dev/null
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/locale-meta.json
@@ -0,0 +1,25 @@
+{
+ "sourceLocale": "zh-CN",
+ "defaultLocale": "zh-CN",
+ "locales": [
+ {
+ "code": "zh-CN",
+ "nativeName": "简体中文",
+ "enabled": true,
+ "direction": "ltr",
+ "aliases": ["zh", "zh-Hans"],
+ "fallback": []
+ },
+ {
+ "code": "en-US",
+ "nativeName": "English",
+ "enabled": true,
+ "direction": "ltr",
+ "aliases": ["en"],
+ "fallback": ["zh-CN"]
+ }
+ ],
+ "languageFallbacks": {
+ "en": "en-US"
+ }
+}
diff --git a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
index 89adfb27d..12ea9d3b3 100644
--- a/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/plugins/ai/views/chat/components/AiMessage.vue
@@ -9,11 +9,11 @@
@click="toggleReasoning"
>
- {{ $t('plugin.ai:reasoningProcess') }}
+ {{ t('plugin.ai:reasoningProcess') }}
{{ $t('plugin.ai:thinking') }}{{ t('plugin.ai:thinking') }}
+
+
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/components/FileUpload/index.vue b/ruoyi-fastapi-frontend/vue3/web/src/components/FileUpload/index.vue
index fecceda26..b4df0c423 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/components/FileUpload/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/src/components/FileUpload/index.vue
@@ -65,7 +65,7 @@
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue b/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
index 6fc8ad416..5a04859b5 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
@@ -23,6 +23,7 @@
import { computed } from 'vue'
import { updateTranslationPatch } from '@/i18n/names.mjs'
import { meta } from '@/i18n/registry'
+import { DATA_SOURCE_LOCALE } from '@/i18n/runtime.mjs'
const props = defineProps({
modelValue: { type: Object, default: () => ({}) },
@@ -30,9 +31,9 @@ const props = defineProps({
})
const emit = defineEmits(['update:modelValue'])
const sourceLanguage =
- meta.locales.find((entry) => entry.code === meta.sourceLocale)?.nativeName || meta.sourceLocale
+ meta.locales.find((entry) => entry.code === DATA_SOURCE_LOCALE)?.nativeName || DATA_SOURCE_LOCALE
const translationLocales = computed(() =>
- meta.locales.filter((entry) => entry.enabled && entry.code !== meta.sourceLocale)
+ meta.locales.filter((entry) => entry.enabled && entry.code !== DATA_SOURCE_LOCALE)
)
function valueFor(code) {
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/components/PluginFrame/index.vue b/ruoyi-fastapi-frontend/vue3/web/src/components/PluginFrame/index.vue
index 3fb12b753..d07d0758d 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/components/PluginFrame/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/src/components/PluginFrame/index.vue
@@ -46,7 +46,7 @@
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/components/LocaleTextFields/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/components/LocaleTextFields/index.vue
index e3904b0b3..52f509ae2 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/components/LocaleTextFields/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/components/LocaleTextFields/index.vue
@@ -1,22 +1,40 @@
-
-
- {{
- $t('common:translations.sourceHint', { locale: sourceLanguage })
- }}
-
-
+
+ {{
+ expanded
+ ? $t('common:translations.hide')
+ : hasTranslation
+ ? $t('common:translations.show')
+ : $t('common:translations.add')
+ }}
+
+
-
+ @input="update(entry.code, $event)"
+ >
+ {{ entry.nativeName }}
+
+ {{ $t('common:translations.fallback') }}
+
@@ -24,21 +42,21 @@
import { meta } from '@/i18n/registry'
import { DATA_SOURCE_LOCALE } from '@/i18n/runtime.mjs'
+const locales = meta.locales.filter((entry) => entry.enabled && entry.code !== DATA_SOURCE_LOCALE)
+
export default {
name: 'LocaleTextFields',
props: {
value: { type: Object, default: () => ({}) },
patch: { type: Object, default: () => ({}) },
+ maxlength: { type: Number, required: true },
+ },
+ data() {
+ return { locales, expanded: locales.some((entry) => this.value?.[entry.code]) }
},
computed: {
- sourceLanguage() {
- return (
- meta.locales.find((locale) => locale.code === DATA_SOURCE_LOCALE)?.nativeName ||
- DATA_SOURCE_LOCALE
- )
- },
- locales() {
- return meta.locales.filter((locale) => locale.enabled && locale.code !== DATA_SOURCE_LOCALE)
+ hasTranslation() {
+ return this.locales.some((entry) => this.fieldValue(entry.code))
},
},
methods: {
@@ -48,9 +66,31 @@ export default {
: this.value?.[locale] || ''
},
update(locale, value) {
- // 只发送编辑过的语言;清空显式删除翻译,未编辑的条目交由服务端保留。
- this.$emit('input', { ...this.patch, [locale]: value.trim() ? value : null })
+ const next = { ...this.patch }
+ const translation = value.trim() ? value : ''
+ if (translation === (this.value?.[locale] || '')) delete next[locale]
+ else next[locale] = translation || null
+ this.$emit('input', next)
},
},
}
+
+
diff --git a/ruoyi-fastapi-frontend/vue2/web/src/components/SizeSelect/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/components/SizeSelect/index.vue
index b3c406f1f..1eda30009 100644
--- a/ruoyi-fastapi-frontend/vue2/web/src/components/SizeSelect/index.vue
+++ b/ruoyi-fastapi-frontend/vue2/web/src/components/SizeSelect/index.vue
@@ -24,17 +24,15 @@
+
+
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue b/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
index 5a04859b5..e8f1f3866 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/src/components/LocaleNameInput/index.vue
@@ -1,26 +1,46 @@
-
- {{
- $t('system:translations.sourceHint', { language: sourceLanguage })
- }}
-
-
-
-
+
+ {{
+ expanded
+ ? $t('system:translations.hide')
+ : hasTranslation
+ ? $t('system:translations.show')
+ : $t('system:translations.add')
+ }}
+
+
+
+ {{ entry.nativeName }}
+
+ {{ $t('system:translations.optional') }}
+
+
+
+
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/i18n/index.js b/ruoyi-fastapi-frontend/vue3/web/src/i18n/index.js
index 2e75aa0bc..4f8676588 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/i18n/index.js
+++ b/ruoyi-fastapi-frontend/vue3/web/src/i18n/index.js
@@ -1,5 +1,5 @@
import appManifest from '../../package.json'
-import { createLocaleRuntime } from './runtime.mjs'
+import { createLocaleRuntime, DATA_SOURCE_LOCALE } from './runtime.mjs'
import { meta, resources } from './registry'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn.js'
@@ -34,6 +34,8 @@ export const i18n = createLocaleRuntime({
}
},
})
+export const sourceLanguage =
+ i18n.registry.get(DATA_SOURCE_LOCALE)?.nativeName || DATA_SOURCE_LOCALE
export const t = i18n.t
export const resolveRouteTitle = (route) => i18n.resolveRouteTitle(route)
export const refreshDeviceLocale = () => i18n.refreshDeviceLocale()
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/system.json b/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/system.json
index 4576129ca..1b5f08437 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/system.json
+++ b/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/en-US/system.json
@@ -1,8 +1,11 @@
{
"translations": {
"label": "{{language}} translation",
- "optional": "Optional; falls back to the original name",
- "sourceHint": "The original name is maintained in {{language}}. Other translations are optional."
+ "optional": "Clear a translation to use the original text.",
+ "add": "Add translation",
+ "hide": "Hide translations",
+ "show": "Show translations",
+ "search": "Search original ({{language}})"
},
"parameterNameIsRequired": "Parameter name is required",
"parameterKeyIsRequired": "Parameter key is required",
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/system.json b/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/system.json
index 0dc6a4f40..68146bd9d 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/system.json
+++ b/ruoyi-fastapi-frontend/vue3/web/src/i18n/locales/zh-CN/system.json
@@ -1,8 +1,11 @@
{
"translations": {
"label": "{{language}}译文",
- "optional": "可选,留空时使用原名称",
- "sourceHint": "原始名称使用{{language}}维护,其他语言译文为可选。"
+ "optional": "清空译名后将显示原文。",
+ "add": "添加译名",
+ "hide": "收起译名",
+ "show": "查看译名",
+ "search": "按{{language}}原文搜索"
},
"parameterNameIsRequired": "参数名称不能为空",
"parameterKeyIsRequired": "参数键名不能为空",
diff --git a/ruoyi-fastapi-frontend/vue3/web/src/layout/components/Navbar.vue b/ruoyi-fastapi-frontend/vue3/web/src/layout/components/Navbar.vue
index ab493480c..06d9a453a 100644
--- a/ruoyi-fastapi-frontend/vue3/web/src/layout/components/Navbar.vue
+++ b/ruoyi-fastapi-frontend/vue3/web/src/layout/components/Navbar.vue
@@ -31,7 +31,7 @@
+
-
-
+
+
+