From 2b7396dcc5a7314c7d199decc886b3f98317d5db Mon Sep 17 00:00:00 2001 From: a20070322 <1031839775@qq.com> Date: Thu, 9 May 2024 14:57:46 +0800 Subject: [PATCH 1/2] i18n: pages/layout --- web-vue/src/i18n/hooks/useI18nPage.ts | 8 +- web-vue/src/i18n/locales/en_US/index.ts | 4 +- .../i18n/locales/en_US/pages/layout/about.ts | 85 +++++ .../locales/en_US/pages/layout/content-tab.ts | 10 + .../locales/en_US/pages/layout/default-bg.ts | 4 + .../en_US/pages/layout/default-index.ts | 8 + .../i18n/locales/en_US/pages/layout/index.ts | 25 ++ .../locales/en_US/pages/layout/ipAccess.ts | 7 + .../locales/en_US/pages/layout/loading.ts | 4 + .../locales/en_US/pages/layout/management.ts | 4 + .../en_US/pages/layout/my-workspace.ts | 12 + .../locales/en_US/pages/layout/overview.ts | 68 ++++ .../locales/en_US/pages/layout/side-menu.ts | 8 + .../locales/en_US/pages/layout/user-log.ts | 64 ++++ web-vue/src/i18n/locales/zh-CN/index.ts | 4 +- .../i18n/locales/zh-CN/pages/layout/about.ts | 39 +++ .../locales/zh-CN/pages/layout/content-tab.ts | 10 + .../locales/zh-CN/pages/layout/default-bg.ts | 4 + .../zh-CN/pages/layout/default-index.ts | 8 + .../i18n/locales/zh-CN/pages/layout/index.ts | 27 ++ .../locales/zh-CN/pages/layout/ipAccess.ts | 7 + .../locales/zh-CN/pages/layout/loading.ts | 4 + .../locales/zh-CN/pages/layout/management.ts | 4 + .../zh-CN/pages/layout/my-workspace.ts | 12 + .../locales/zh-CN/pages/layout/overview.ts | 37 +++ .../locales/zh-CN/pages/layout/side-menu.ts | 8 + .../locales/zh-CN/pages/layout/user-header.ts | 112 +++++++ .../locales/zh-CN/pages/layout/user-log.ts | 35 +++ web-vue/src/pages/layout/about.vue | 63 ++-- web-vue/src/pages/layout/content-tab.vue | 13 +- web-vue/src/pages/layout/default-index.vue | 7 +- web-vue/src/pages/layout/ipAccess.vue | 9 +- web-vue/src/pages/layout/my-workspace.vue | 17 +- web-vue/src/pages/layout/overview.vue | 69 +++-- web-vue/src/pages/layout/side-menu.vue | 9 +- web-vue/src/pages/layout/user-header.vue | 293 ++++++++++-------- web-vue/src/pages/layout/user-log.vue | 71 +++-- web-vue/src/pages/monitor/list.vue | 2 +- web-vue/src/pages/monitor/log.vue | 2 +- web-vue/src/pages/monitor/operate-log.vue | 2 +- 40 files changed, 924 insertions(+), 255 deletions(-) create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/about.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/content-tab.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/default-bg.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/default-index.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/index.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/ipAccess.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/loading.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/management.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/my-workspace.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/overview.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/side-menu.ts create mode 100644 web-vue/src/i18n/locales/en_US/pages/layout/user-log.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/about.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/content-tab.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/default-bg.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/default-index.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/index.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/ipAccess.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/loading.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/management.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/my-workspace.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/overview.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/side-menu.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/user-header.ts create mode 100644 web-vue/src/i18n/locales/zh-CN/pages/layout/user-log.ts diff --git a/web-vue/src/i18n/hooks/useI18nPage.ts b/web-vue/src/i18n/hooks/useI18nPage.ts index c97f05452..971b2f8f7 100644 --- a/web-vue/src/i18n/hooks/useI18nPage.ts +++ b/web-vue/src/i18n/hooks/useI18nPage.ts @@ -16,9 +16,13 @@ import { useI18n } from 'vue-i18n' */ export const useI18nPage = (pagePath: string) => { const { t: $t } = useI18n() - const $tPage = $t(pagePath) as T + // $t(pagePath) as T + const $tl = (key: string, ...args: any[]) => { + const arg = [...args] + return $t(`${pagePath}.${key}`, arg) as T + } return { $t, - $tPage + $tl } } diff --git a/web-vue/src/i18n/locales/en_US/index.ts b/web-vue/src/i18n/locales/en_US/index.ts index 2363ed2bf..22cba2492 100644 --- a/web-vue/src/i18n/locales/en_US/index.ts +++ b/web-vue/src/i18n/locales/en_US/index.ts @@ -15,6 +15,7 @@ import dispatch from './pages/dispatch' import docker from './pages/docker' import fileManager from './pages/file-manager' import monitor from './pages/monitor' +import layout from './pages/layout' export default { pages: { 404: page404, @@ -23,6 +24,7 @@ export default { dispatch, docker, fileManager, - monitor + monitor, + layout } } diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/about.ts b/web-vue/src/i18n/locales/en_US/pages/layout/about.ts new file mode 100644 index 000000000..f261f5bf9 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/about.ts @@ -0,0 +1,85 @@ +export default { + c: {}, + p: { + openSourceIsNotFree: 'Open source is not equivalent to free', + contactUsForAuthorization: 'If you modify Jpom based on secondary development', + nameCopyright: ', name, copyright, etc.', + legalRisks: 'Please contact us for authorization, otherwise there will be legal risks.', + pursueLegalAction: + 'We have the right to sue all illegal income from teams or individuals who破坏open source and profit from it, and we also welcome you to provide us with clues of infringement.', + modifyCopyrightRisks: 'Unauthorized modification or deletion of copyright information has legal risks', + respectOpenSourceAgreement: + 'Please respect the open source agreement and do not modify the version information without authorization, otherwise you may bear legal responsibility.', + supportOpenSource: 'Support open source', + supportUs: + 'Jpom is an open source software. If you use this project and feel good about it, or want to support us to continue developing, you can support us in the following ways:', + recommendToFriends: 'Recommend or share it to your friends:', + donationSponsorship: + 'Make a one-time donation sponsorship through the following QR code to buy the author a cup of coffee ☕️', + prioritySupport: + 'Join our technical communication group to get priority answers to all your questions by paying a fee', + enterpriseVersion: 'Choose an enterprise version or purchase authorization:', + oneTimeDonation: 'One-time donation sponsorship', + wechatAppreciation: 'WeChat appreciation', + scanToSupport: 'Scan to support the long-term development of open source projects', + alipayTransfer: 'Alipay transfer', + scanToTransfer: 'Scan to transfer to support the long-term development of open source projects', + contactUs: 'Contact us', + notePurpose: 'Please note the purpose when contacting', + noteExample: 'Note example:', + paidCommunity: 'Paid community', + enterpriseServices: 'Enterprise services', + advertising: 'Advertising', + cooperationInquiry: 'Cooperation inquiry', + freeCommunity: 'Free community', + email: 'Email:', + wechat: 'WeChat:', + wechatQRCode: 'WeChat QR code', + openSourceLicense: 'Open source license', + softwareAcknowledgment: 'Software acknowledgment', + usedOpenSourceSoftware: + 'The following open source software is used in Jpom. We sincerely thank them for making Jpom more perfect with their open source contributions', + alphabeticalOrder: 'The ranking is sorted in alphabetical order a-z', + moreRelatedDependencies: 'There are more related dependent open source components', + openSourceIsNotFree_1: 'Open source is not the same as free', + contactUsForAuthorization_1: 'If you modify Jpom based on secondary development', + nameCopyright_1: ', name, copyright, etc.', + legalRisks_1: 'Please contact us for authorization, otherwise there will be legal risks.', + pursueLegalAction_1: + 'We have the right to sue all illegal income of individuals or teams who damage open source and profit from it. We also welcome anyone who can provide us with clues of infringement.', + modifyCopyrightRisks_1: 'Unauthorized modification or deletion of copyright information has legal risks', + respectOpenSourceAgreement_1: + 'Please respect the open source agreement and do not modify the version information without authorization, otherwise you may bear legal responsibilities.', + supportOpenSource_1: 'Support open source', + supportUs_1: + 'Jpom is an open source software. If you use this project and feel good about it, or want to support us to continue developing, you can support us in the following ways:', + recommendToFriends_1: 'Recommend or share it with your friends:', + donationSponsorship_1: + 'Make a one-time donation sponsorship through the following QR code to buy the author a cup of coffee ☕️', + prioritySupport_1: + 'Join our technical communication group by paying a fee to get priority answers to all your questions', + enterpriseVersion_1: 'Choose an enterprise version or purchase authorization:', + oneTimeDonation_1: 'One-time donation sponsorship', + wechatAppreciation_1: 'WeChat appreciation', + scanToSupport_1: 'Scan the QR code to support the long-term development of the open source project', + alipayTransfer_1: 'Alipay transfer', + scanToTransfer_1: 'Scan the QR code to transfer to support the long-term development of the open source project', + contactUs_1: 'Contact us', + notePurpose_1: 'Please note the purpose when contacting', + noteExample_1: 'Note example:', + paidCommunity_1: 'Paid community', + enterpriseServices_1: 'Enterprise services', + advertising_1: 'Advertising', + cooperationInquiry_1: 'Cooperation inquiry', + freeCommunity_1: 'Free community', + email_1: 'Email:', + wechat_1: 'WeChat:', + wechatQRCode_1: 'WeChat QR code', + openSourceLicense_1: 'Open source license', + softwareAcknowledgment_1: 'Software acknowledgment', + usedOpenSourceSoftware_1: + 'The following open source software is used in Jpom. We sincerely thank them for their open source contributions, which make Jpom more perfect.', + alphabeticalOrder_1: 'The ranking is sorted in alphabetical order from a to z', + moreRelatedDependencies_1: 'There are more related dependent open source components' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/content-tab.ts b/web-vue/src/i18n/locales/en_US/pages/layout/content-tab.ts new file mode 100644 index 000000000..dda8761e4 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/content-tab.ts @@ -0,0 +1,10 @@ +export default { + c: {}, + p: { + closeOthers: 'Close others', + closeLeft: 'Close left', + closeRight: 'Close right', + cannotClose: 'Cannot close', + operationSuccess: 'Operation successful' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/default-bg.ts b/web-vue/src/i18n/locales/en_US/pages/layout/default-bg.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/default-bg.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/default-index.ts b/web-vue/src/i18n/locales/en_US/pages/layout/default-index.ts new file mode 100644 index 000000000..d0b196bd1 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/default-index.ts @@ -0,0 +1,8 @@ +export default { + c: {}, + p: {}, + projectMaintenance: { + clickToCollapseLeftMenu: 'Click to collapse the left menu bar', + projectOperation: 'Project operation' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/index.ts b/web-vue/src/i18n/locales/en_US/pages/layout/index.ts new file mode 100644 index 000000000..8fc56e3bf --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/index.ts @@ -0,0 +1,25 @@ +import about from './about.ts' +import contentTab from './content-tab.ts' +import defaultBg from './default-bg.ts' +import defaultIndex from './default-index.ts' +import ipAccess from './ipAccess.ts' +import loading from './loading.ts' +import management from './management.ts' +import myWorkspace from './my-workspace.ts' +import overview from './overview.ts' +import sideMenu from './side-menu.ts' +import userLog from './user-log.ts' + +export default { + about, + contentTab, + defaultBg, + defaultIndex, + ipAccess, + loading, + management, + myWorkspace, + overview, + sideMenu, + userLog +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/ipAccess.ts b/web-vue/src/i18n/locales/en_US/pages/layout/ipAccess.ts new file mode 100644 index 000000000..18fe7f0db --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/ipAccess.ts @@ -0,0 +1,7 @@ +export default { + c: {}, + p: { + k1: 'You do not have permission to access', + k2: 'Access denied' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/loading.ts b/web-vue/src/i18n/locales/en_US/pages/layout/loading.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/loading.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/management.ts b/web-vue/src/i18n/locales/en_US/pages/layout/management.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/management.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/my-workspace.ts b/web-vue/src/i18n/locales/en_US/pages/layout/my-workspace.ts new file mode 100644 index 000000000..b5fdc590c --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/my-workspace.ts @@ -0,0 +1,12 @@ +export default { + c: {}, + p: { + workspaceName: 'My Workspace', + workspaceNote: 'Please enter a workspace note, or use the default name if left blank', + confirm: 'Confirm', + originalName: 'Original Name:', + sortDrag: 'Long press to drag and sort', + save: 'Save', + resetName: 'Restore Default Name' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/overview.ts b/web-vue/src/i18n/locales/en_US/pages/layout/overview.ts new file mode 100644 index 000000000..72bd42258 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/overview.ts @@ -0,0 +1,68 @@ +export default { + c: { + unknown: 'Unknown', + operationLog: 'Operation log', + unknown_1: 'Unknown', + operationLog_1: 'Operation Log' + }, + p: { + welcome: 'Welcome [', + systemUsage: '] You are using this system', + manageWorkspaces: 'You can manage {{ (myWorkspaceList && myWorkspaceList.length) || 0 }} workspaces', + demoAccount: 'Demo account', + superuser: 'Super administrator', + admin: 'Administrator', + normalUser: 'Normal user', + refreshData: 'Refresh data', + systemInfo: 'About the system', + dataStatistics: 'Data statistics', + relatedDataStatistics: 'Current workspace related data statistics', + buildLog: 'Build log', + triggeredBuilds: 'Current workspace build records triggered by you', + notYetBuilt: 'You have not built yet', + loginLog: 'Login log', + notYetLoggedIn: 'You have not logged in yet', + allOperationLog: 'All your operation logs in the system', + notYetPerformedOperations: 'You have not performed any operations yet', + openSourceInfo: 'About open source software', + logicNode: 'Logic node', + nodeProject: 'Node project', + nodeScript: 'Node script', + projectDistribution: 'Project distribution', + terminal: 'Terminal', + script: 'Script', + localScript: 'Local script', + node: 'Node', + cluster: 'Cluster', + dynamicFile: 'Dynamic file', + welcome_1: 'Welcome [', + systemUsage_1: '] You are using this system', + manageWorkspaces_1: 'You can manage {{ (myWorkspaceList && myWorkspaceList.length) || 0 }} workspaces', + demoAccount_1: 'Demo Account', + superuser_1: 'Superuser', + admin_1: 'Admin', + normalUser_1: 'Normal User', + refreshData_1: 'Refresh Data', + systemInfo_1: 'System Info', + dataStatistics_1: 'Data Statistics', + relatedDataStatistics_1: 'Related Data Statistics for the Current Workspace', + buildLog_1: 'Build Log', + triggeredBuilds_1: 'Build Records Triggered by You in the Current Workspace', + notYetBuilt_1: 'You Have Not Built Yet', + loginLog_1: 'Login Log', + notYetLoggedIn_1: 'You Have Not Logged In Yet', + allOperationLog_1: 'All Your Operation Logs in the System', + notYetPerformedOperations_1: 'You Have Not Performed Any Operations Yet', + openSourceInfo_1: 'Open Source Information', + logicNode_1: 'Logic Node', + nodeProject_1: 'Node Project', + nodeScript_1: 'Node Script', + projectDistribution_1: 'Project Distribution', + terminal_1: 'Terminal', + script_1: 'Script', + localScript_1: 'Local Script', + node_1: 'Node', + cluster_1: 'Cluster', + dynamicFile_1: 'Dynamic File' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/side-menu.ts b/web-vue/src/i18n/locales/en_US/pages/layout/side-menu.ts new file mode 100644 index 000000000..c8812f106 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/side-menu.ts @@ -0,0 +1,8 @@ +export default { + c: {}, + p: { + managementSystem: 'System management', + functionManagement: 'Function management', + invalidRouting: 'Invalid routing, unable to jump' + } +} diff --git a/web-vue/src/i18n/locales/en_US/pages/layout/user-log.ts b/web-vue/src/i18n/locales/en_US/pages/layout/user-log.ts new file mode 100644 index 000000000..8cc1865f9 --- /dev/null +++ b/web-vue/src/i18n/locales/en_US/pages/layout/user-log.ts @@ -0,0 +1,64 @@ +export default { + c: { + function: 'Function', + method: 'Method', + shortcut: 'Quickly return to the first page by holding Ctrl or Alt/Option and clicking the button', + search: 'Search', + success: 'Success', + failure: 'Failure', + usage: 'Usage', + unused: 'Unused', + unknown: 'Unknown', + function_1: 'Operation function', + method_1: 'Operation method', + shortcut_1: 'Press and hold the Ctrl or Alt/Option key to click the button to quickly return to the first page', + search_1: 'Search', + success_1: 'Success', + failure_1: 'Failure', + usage_1: 'Usage', + unused_1: 'Unused', + unknown_1: 'Unknown' + }, + p: { + operationLog: 'Operation Log', + defaultStatusCode: 'The default status code of 200 indicates successful execution', + partialStatusCode: 'Some operation status codes may be 0', + statusCode0: 'Most operations with a status code of 0 have no operation result or are executed asynchronously', + loginLog: 'Login Log', + username: 'Username', + loginIp: 'Login IP', + operator: 'Operator', + node: 'Node', + dataName: 'Data Name', + workspaceName: 'Workspace Name', + statusCode: 'Status Code', + operationTime: 'Operation Time', + userId: 'User ID', + userName: 'User Name', + browser: 'Browser', + successFlag: 'Success Flag', + mfaUsage: 'MFA Usage', + resultDescription: 'Result Description', + loginTime: 'Login Time', + operationLog_1: 'Operation log', + defaultStatusCode_1: 'The default status code of 200 indicates successful execution', + partialStatusCode_1: 'Some operation status codes may be 0', + statusCode0_1: 'Most operations with a status code of 0 have no operation results or are executed asynchronously', + loginLog_1: 'Login log', + username_1: 'Username', + loginIp_1: 'Login IP', + operator_1: 'Operator', + node_1: 'Node', + dataName_1: 'Data name', + workspaceName_1: 'Workspace name', + statusCode_1: 'Status code', + operationTime_1: 'Operation time', + userId_1: 'User ID', + userName_1: 'User name', + browser_1: 'Browser', + successFlag_1: 'Whether successful', + mfaUsage_1: 'Whether to use MFA', + resultDescription_1: 'Result description', + loginTime_1: 'Login time' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/index.ts b/web-vue/src/i18n/locales/zh-CN/index.ts index 2363ed2bf..22cba2492 100644 --- a/web-vue/src/i18n/locales/zh-CN/index.ts +++ b/web-vue/src/i18n/locales/zh-CN/index.ts @@ -15,6 +15,7 @@ import dispatch from './pages/dispatch' import docker from './pages/docker' import fileManager from './pages/file-manager' import monitor from './pages/monitor' +import layout from './pages/layout' export default { pages: { 404: page404, @@ -23,6 +24,7 @@ export default { dispatch, docker, fileManager, - monitor + monitor, + layout } } diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/about.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/about.ts new file mode 100644 index 000000000..429aeb6ea --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/about.ts @@ -0,0 +1,39 @@ +export default { + c: {}, + p: { + openSourceIsNotFree: '开源不等同于免费', + contactUsForAuthorization: '如果您基于 Jpom 二次开发修改了', + nameCopyright: '、名称、版权等', + legalRisks: '请找我们授权,否则会有法律风险。', + pursueLegalAction: '我们有权利追诉破坏开源并因此获利的团队个人的全部违法所得,也欢迎给我们提供侵权线索。', + modifyCopyrightRisks: '擅自修改或者删除版权信息有法律风险', + respectOpenSourceAgreement: '请尊重开源协议,不要擅自修改版本信息,否则可能承担法律责任。', + supportOpenSource: '支持开源', + supportUs: '是一款开源软件您使用这个项目并感觉良好,或是想支持我们继续开发,您可以通过如下方式支持我们:', + recommendToFriends: '并向您的朋友推荐或分享:', + donationSponsorship: '通过以下二维码进行一次性捐款赞助,请作者喝一杯咖啡☕️', + prioritySupport: '付费加入我们的技术交流群优先解答您所有疑问', + enterpriseVersion: '选择企业版本或者购买授权:', + oneTimeDonation: '一次性捐款赞助', + wechatAppreciation: '微信赞赏', + scanToSupport: '扫码赞赏支持开源项目长期发展', + alipayTransfer: '支付宝转账', + scanToTransfer: '扫码转账支持开源项目长期发展', + contactUs: '联系我们', + notePurpose: '联系时请备注来意', + noteExample: '备注示例:', + paidCommunity: '付费社群', + enterpriseServices: '企业服务', + advertising: '广告投放', + cooperationInquiry: '合作咨询', + freeCommunity: '免费社群', + email: '邮箱:', + wechat: '微信:', + wechatQRCode: '微信二维码', + openSourceLicense: '开源协议', + softwareAcknowledgment: '软件致谢', + usedOpenSourceSoftware: '中使用了如下开源软件,我们衷心感谢有了他们的开源 Jpom 才能更完善', + alphabeticalOrder: '排名按照字母 a-z 排序', + moreRelatedDependencies: '还有更多相关依赖开源组件' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/content-tab.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/content-tab.ts new file mode 100644 index 000000000..9e2013bec --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/content-tab.ts @@ -0,0 +1,10 @@ +export default { + c: {}, + p: { + closeOthers: '关闭其他', + closeLeft: '关闭左侧', + closeRight: '关闭右侧', + cannotClose: '不能关闭了', + operationSuccess: '操作成功' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/default-bg.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/default-bg.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/default-bg.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/default-index.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/default-index.ts new file mode 100644 index 000000000..e7471f115 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/default-index.ts @@ -0,0 +1,8 @@ +export default { + c: {}, + p: {}, + projectMaintenance: { + clickToCollapseLeftMenu: '点击可以折叠左侧菜单栏', + projectOperation: '项目运维' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/index.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/index.ts new file mode 100644 index 000000000..bb4408fcd --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/index.ts @@ -0,0 +1,27 @@ +import about from './about.ts' +import contentTab from './content-tab.ts' +import defaultBg from './default-bg.ts' +import defaultIndex from './default-index.ts' +import ipAccess from './ipAccess.ts' +import loading from './loading.ts' +import management from './management.ts' +import myWorkspace from './my-workspace.ts' +import overview from './overview.ts' +import sideMenu from './side-menu.ts' +import userHeader from './user-header.ts' +import userLog from './user-log.ts' + +export default { + about, + contentTab, + defaultBg, + defaultIndex, + ipAccess, + loading, + management, + myWorkspace, + overview, + sideMenu, + userHeader, + userLog +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/ipAccess.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/ipAccess.ts new file mode 100644 index 000000000..19ca2477c --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/ipAccess.ts @@ -0,0 +1,7 @@ +export default { + c: {}, + p: { + k1: '您没有权限访问', + k2: '禁止访问' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/loading.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/loading.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/loading.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/management.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/management.ts new file mode 100644 index 000000000..2f04c22d7 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/management.ts @@ -0,0 +1,4 @@ +export default { + c: {}, + p: {} +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/my-workspace.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/my-workspace.ts new file mode 100644 index 000000000..8327095ca --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/my-workspace.ts @@ -0,0 +1,12 @@ +export default { + c: {}, + p: { + workspaceName: '我的工作空间', + workspaceNote: '请输入工作空间备注,留空使用默认的名称', + confirm: '确定', + originalName: '原始名:', + sortDrag: '长按可以拖动排序', + save: '保存', + resetName: '恢复默认名称' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/overview.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/overview.ts new file mode 100644 index 000000000..05fbd9192 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/overview.ts @@ -0,0 +1,37 @@ +export default { + c: { + unknown: '未知', + operationLog: '操作日志' + }, + p: { + welcome: '欢迎【', + systemUsage: '】您使用本系统', + manageWorkspaces: '可以管理{{ (myWorkspaceList && myWorkspaceList.length) || 0 }}个工作空间', + demoAccount: '演示账号', + superuser: '超级管理员', + admin: '管理员', + normalUser: '普通用户', + refreshData: '刷新数据', + systemInfo: '关于系统', + dataStatistics: '数据统计', + relatedDataStatistics: '当前工作空间关联数据统计', + buildLog: '构建日志', + triggeredBuilds: '当前工作空间您触发的构建记录', + notYetBuilt: '您还未构建', + loginLog: '登录日志', + notYetLoggedIn: '您还未登录过', + allOperationLog: '系统中您所有操作日志', + notYetPerformedOperations: '您还未执行操作', + openSourceInfo: '关于开源软件', + logicNode: '逻辑节点', + nodeProject: '节点项目', + nodeScript: '节点脚本', + projectDistribution: '项目分发', + terminal: '终端', + script: '脚本', + localScript: '本地脚本', + node: '节点', + cluster: '集群', + dynamicFile: '动态文件' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/side-menu.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/side-menu.ts new file mode 100644 index 000000000..b87175c87 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/side-menu.ts @@ -0,0 +1,8 @@ +export default { + c: {}, + p: { + managementSystem: '系统管理', + functionManagement: '功能管理', + invalidRouting: '路由无效,无法跳转' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/user-header.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/user-header.ts new file mode 100644 index 000000000..db4d20b7a --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/user-header.ts @@ -0,0 +1,112 @@ +export default { + c: { + unConfigured: '未配置', + bracketRight: '】', + bracketLeft: '【', + securityManagement: '安全管理', + operationLog: '操作日志', + oldPassword: '请输入原密码', + newPassword: '请输入新密码', + confirmPassword: '请输入确认密码', + verificationCode: '验证码', + twoStepVerificationCode: '两步验证码', + twoStepVerificationApp: '两步验证应用', + nickname: '昵称', + emailAddress: '邮箱地址', + emailVerificationCode: '邮箱验证码', + dingNotificationAddress: '钉钉通知地址', + enterpriseWeChatNotificationAddress: '企业微信通知地址', + lightTheme: '浅色', + darkTheme: '深色', + securityReminder: '安全提醒', + nicknameLength: '昵称长度为2-10', + passwordLength: '密码长度为6-20', + systemPrompt: '系统提示', + confirm: '确认', + cancel: '取消', + logoutSuccess: '退出登录成功' + }, + p: { + workspaceName: '工作空间名称:', + groupName: '【分组名:', + clusterName: '集群名称:', + switchWorkspace: '切换工作空间', + switchCluster: '切换集群', + userProfile: '用户资料', + personalConfiguration: '个性配置', + logout: '退出登录', + switchAccount: '切换账号', + completeLogout: '彻底退出', + changePassword: '修改密码', + originalPassword: '原密码', + newPassword: '新密码', + confirmPassword: '确认密码', + confirmReset: '确认重置', + twoStepVerification: '两步验证', + prompt: '提示', + mfaKey: '绑定成功后将不再显示,强烈建议保存此二维码或者下面的 MFA key', + pleaseScanQRCodeAndBindToken: '请使用应用扫码绑定令牌,然后输入验证码确认绑定才生效', + currentStatus: '当前状态', + opening: '开启中', + closing: '关闭中', + qrCode: '二维码', + confirmBind: '确认绑定', + confirmClose: '确认关闭', + enableMFA: '开启 MFA', + editUserProfile: '修改用户资料', + temporaryToken: '临时token', + permanentToken: '长期token', + sendVerificationCode: '发送验证码', + personalConfigArea: '个性配置区', + theseConfigsOnlyEffectiveInCurrentBrowser: '下列配置信息仅在当前浏览器生效', + clearingBrowserCacheWillRestoreDefaults: '清空浏览器缓存配置将恢复默认', + menuConfig: '菜单配置', + yes: '是', + no: '否', + expandMultipleAtOnce: '同时展开多个', + fullScreenLog: '全屏日志', + fullScreen: '全屏', + notFullScreen: '非全屏', + viewLogInFullScreen: '全屏查看日志', + contentTheme: '内容主题', + followSystem: '跟随系统', + contentAreaThemeSwitch: '内容区域主题切换', + menuTheme: '菜单主题', + leftMenuThemeSwitch: '左边菜单栏主题切换', + compactMode: '紧凑模式', + compact: '紧凑', + loose: '宽松', + fontSpacingAdjustment: '字体间距调整', + onlyEffectiveInDarkMode: '仅在深色模式生效', + language: '语言', + chinese: '中文', + forYourAccountSecurityTheSystemRequiresTwoStepVerificationToBeEnabledToEnsureAccountSafety: + '为了您的账号安全系统要求必须开启两步验证来确保账号的安全性', + enableImmediately: '立即开启', + nickname: '请输入昵称', + twoStepVerificationCode: '请输入两步验证码', + verificationCode6: '验证码 6 为纯数字', + closeOperationGuide: '关闭页面操作引导、导航', + openOperationGuide: '开启页面操作引导、导航', + multipleMenusExpand: '可以同时展开多个菜单', + singleMenuExpand: '同时只能展开一个菜单', + autoExpandContent: '页面内容自动撑开出现屏幕滚动条', + fullScreen_1: '页面全屏,高度 100%。局部区域可以滚动', + scrollableContent: '页面内容会出现滚动条', + hiddenScrollbar: '隐藏滚动条。纵向滚动方式提醒:滚轮,横行滚动方式:Shift+滚轮', + logDialogFullScreen: '日志弹窗会全屏打开', + logDialogNonFullScreen: '日志弹窗会非全屏打开', + compactMode_1: '页面启用紧凑模式', + looseMode: '页面启用宽松模式', + resetOperationGuideSuccess: '重置页面操作引导、导航成功', + quitConfirmation: '真的要彻底退出系统么?彻底退出将退出登录和清空浏览器缓存', + switchAccountConfirmation: '真的要退出并切换账号登录么?', + quitSystemConfirmation: '真的要退出系统么?', + passwordsNotMatch: '两次密码不一致...', + emailAddress: '请输入邮箱地址', + clusterNotConfigured: '还未配置集群地址,不能切换集群', + verificationCodeRequired: '需要输入验证码,确认绑定后才生效奥', + disableTwoStepVerificationConfirmation: + '确定要关闭两步验证吗?关闭后账号安全性将受到影响,关闭后已经存在的 mfa key 将失效' + } +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/layout/user-log.ts b/web-vue/src/i18n/locales/zh-CN/pages/layout/user-log.ts new file mode 100644 index 000000000..5404c8408 --- /dev/null +++ b/web-vue/src/i18n/locales/zh-CN/pages/layout/user-log.ts @@ -0,0 +1,35 @@ +export default { + c: { + function: '操作功能', + method: '操作方法', + shortcut: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页', + search: '搜索', + success: '成功', + failure: '失败', + usage: '使用', + unused: '未使用', + unknown: '未知' + }, + p: { + operationLog: '操作日志', + defaultStatusCode: '默认状态码为 200 表示执行成功', + partialStatusCode: '部分操作状态码可能为 0', + statusCode0: '状态码为 0 的操作大部分为没有操作结果或者异步执行', + loginLog: '登录日志', + username: '用户名', + loginIp: '登录IP', + operator: '操作者', + node: '节点', + dataName: '数据名称', + workspaceName: '工作空间名', + statusCode: '状态码', + operationTime: '操作时间', + userId: '用户ID', + userName: '用户名称', + browser: '浏览器', + successFlag: '是否成功', + mfaUsage: '是否使用MFA', + resultDescription: '结果描述', + loginTime: '登录时间' + } +} diff --git a/web-vue/src/pages/layout/about.vue b/web-vue/src/pages/layout/about.vue index 70cd088b9..4013e0800 100644 --- a/web-vue/src/pages/layout/about.vue +++ b/web-vue/src/pages/layout/about.vue @@ -21,38 +21,40 @@ - -

Jpom 是一款开源软件您使用这个项目并感觉良好,或是想支持我们继续开发,您可以通过如下方式支持我们:

+ +

Jpom {{ $tl('p.supportUs') }}

  • - Star 并向您的朋友推荐或分享: Gitee / + Star {{ $tl('p.recommendToFriends') }} Gitee / Github
  • -
  • 通过以下二维码进行一次性捐款赞助,请作者喝一杯咖啡☕️
  • -
  • 付费加入我们的技术交流群优先解答您所有疑问
  • +
  • {{ $tl('p.donationSponsorship') }}
  • +
  • {{ $tl('p.prioritySupport') }}
  • - 选择企业版本或者购买授权:企业服务 + {{ $tl('p.enterpriseVersion') + }}企业服务
- + @@ -74,7 +76,8 @@ - + + @@ -92,7 +95,7 @@ diff --git a/web-vue/src/pages/layout/my-workspace.vue b/web-vue/src/pages/layout/my-workspace.vue index eda87fe5a..0c91f6dde 100644 --- a/web-vue/src/pages/layout/my-workspace.vue +++ b/web-vue/src/pages/layout/my-workspace.vue @@ -2,7 +2,7 @@
- + @@ -10,13 +10,13 @@ @@ -27,7 +27,7 @@ - + @@ -37,8 +37,8 @@ - 保存 - 恢复默认名称 + {{ $tl('p.save') }} + {{ $tl('p.resetName') }} @@ -65,6 +65,9 @@ export default { this.init() }, methods: { + $tl(key, ...args) { + return this.$t(`pages.layout.myWorkspace.${key}`, ...args) + }, onDrop(dropResult) { this.myWorkspaceList = dropApplyDrag(this.myWorkspaceList, dropResult).map((item, index) => { return { ...item, sort: index } diff --git a/web-vue/src/pages/layout/overview.vue b/web-vue/src/pages/layout/overview.vue index f5d060676..ca69277b1 100644 --- a/web-vue/src/pages/layout/overview.vue +++ b/web-vue/src/pages/layout/overview.vue @@ -1,24 +1,24 @@