From a9b020156ceb2a453190dbf2602e46469b9fa397 Mon Sep 17 00:00:00 2001 From: a20070322 <1031839775@qq.com> Date: Sun, 28 Apr 2024 13:34:56 +0800 Subject: [PATCH] i18n: pages dispatch fix --- .../en_US/pages/dispatch/logReadView.ts | 86 ++++----- .../zh-CN/pages/dispatch/logReadView.ts | 85 ++++----- web-vue/src/pages/dispatch/status.vue | 166 +++++++++++++++--- 3 files changed, 227 insertions(+), 110 deletions(-) diff --git a/web-vue/src/i18n/locales/en_US/pages/dispatch/logReadView.ts b/web-vue/src/i18n/locales/en_US/pages/dispatch/logReadView.ts index 3db4c245d..fecaf2e66 100644 --- a/web-vue/src/i18n/locales/en_US/pages/dispatch/logReadView.ts +++ b/web-vue/src/i18n/locales/en_US/pages/dispatch/logReadView.ts @@ -1,44 +1,46 @@ export default { - "c": {}, - "p": { - "node": "Node", - "chooseNode": "Please select a node", - "searchKeyword": "Search keyword", - "keywordHighlight": "Keyword highlight, supports regex (using regex may affect performance, please use it appropriately)", - "keywordRegex": "Keyword, supports regex", - "showFirstNLines": "Show first N lines", - "showLastNLines": "Show last N lines", - "regexReference": "Regex syntax reference", - "matchLinesWithNumbers": "Match lines containing numbers", - "matchLinesWithAorB": "Match lines containing a or b", - "exception": "Exception", - "matchLinesWithException": "Match lines containing exceptions", - "syntaxReference": "Syntax reference", - "searchMode": "Search mode", - "searchModeDescription": "Search mode. By default, it views the last N lines of the file. Searching from the start means searching from the specified line downwards. Searching from the end means searching upwards from the end of the file for N lines.", - "searchFromEnd": "Search from the end", - "searchFromStart": "Search from the start", - "firstNFileLines": "First N lines of the file", - "lastNFileLines": "Last N lines of the file", - "searchConfigReference": "Search configuration reference", - "searchFromEndExample1": "Search from the end, first 0 lines of the file, last 3 lines of the file", - "searchLastNLines": "Search within the last 3 lines of the file", - "searchFromStartExample1": "Search from the start, first 0 lines of the file, last 3 lines of the file", - "searchLineRange1": "Search within lines 3 - 2147483647 of the file", - "searchFromEndExample2": "Search from the end, first 2 lines of the file, last 3 lines of the file", - "searchLineRange2": "Search within lines 1 - 2 of the file", - "searchFromEndExample3": "Search from the end, first 100 lines of the file, last 100 lines of the file", - "searchLineRange3": "Search within lines 1 - 100 of the file", - "searchFromStartExample2": "Search from the start, first 2 lines of the file, last 3 lines of the file", - "searchLineRange4": "Search within lines 2 - 2 of the file", - "searchFromEndExample4": "Search from the end, first 20 lines of the file, last 3 lines of the file", - "searchLineRange5": "Search within lines 17 - 20 of the file", - "searchFromStartExample3": "Search from the start, first 20 lines of the file, last 3 lines of the file", - "searchLineRange6": "Search within lines 3 - 20 of the file", - "searchReference": "Search reference", - "error": "Error", - "checkWsProxy": "Please check if the ws proxy is enabled", - "sessionClosed": "The session has been closed", - "fileNotReadable": "The current file is not readable. You need to configure readable file authorization." + c: {}, + p: { + node: 'Node', + chooseNode: 'Please select a node', + searchKeyword: 'Search keyword', + keywordHighlight: + 'Keyword highlight, supports regex (using regex may affect performance, please use it appropriately)', + keywordRegex: 'Keyword, supports regex', + showFirstNLines: 'Show first N lines', + showLastNLines: 'Show last N lines', + regexReference: 'Regex syntax reference', + matchLinesWithNumbers: 'Match lines containing numbers', + matchLinesWithAorB: 'Match lines containing a or b', + exception: 'Exception', + matchLinesWithException: 'Match lines containing exceptions', + syntaxReference: 'Syntax reference', + searchMode: 'Search mode', + searchModeDescription: + 'Search mode. By default, it views the last N lines of the file. Searching from the start means searching from the specified line downwards. Searching from the end means searching upwards from the end of the file for N lines.', + searchFromEnd: 'Search from the end', + searchFromStart: 'Search from the start', + firstNFileLines: 'First N lines of the file', + lastNFileLines: 'Last N lines of the file', + searchConfigReference: 'Search configuration reference', + searchFromEndExample1: 'Search from the end, first 0 lines of the file, last 3 lines of the file', + searchLastNLines: 'Search within the last 3 lines of the file', + searchFromStartExample1: 'Search from the start, first 0 lines of the file, last 3 lines of the file', + searchLineRange1: 'Search within lines 3 - 2147483647 of the file', + searchFromEndExample2: 'Search from the end, first 2 lines of the file, last 3 lines of the file', + searchLineRange2: 'Search within lines 1 - 2 of the file', + searchFromEndExample3: 'Search from the end, first 100 lines of the file, last 100 lines of the file', + searchLineRange3: 'Search within lines 1 - 100 of the file', + searchFromStartExample2: 'Search from the start, first 2 lines of the file, last 3 lines of the file', + searchLineRange4: 'Search within lines 2 - 2 of the file', + searchFromEndExample4: 'Search from the end, first 20 lines of the file, last 3 lines of the file', + searchLineRange5: 'Search within lines 17 - 20 of the file', + searchFromStartExample3: 'Search from the start, first 20 lines of the file, last 3 lines of the file', + searchLineRange6: 'Search within lines 3 - 20 of the file', + searchReference: 'Search reference', + error: 'Error', + checkWsProxy: 'Please check if the ws proxy is enabled', + sessionClosed: 'The session has been closed', + fileNotReadable: 'The current file is not readable. You need to configure readable file authorization.' } -} \ No newline at end of file +} diff --git a/web-vue/src/i18n/locales/zh-CN/pages/dispatch/logReadView.ts b/web-vue/src/i18n/locales/zh-CN/pages/dispatch/logReadView.ts index 4ed431503..809983f58 100644 --- a/web-vue/src/i18n/locales/zh-CN/pages/dispatch/logReadView.ts +++ b/web-vue/src/i18n/locales/zh-CN/pages/dispatch/logReadView.ts @@ -1,44 +1,45 @@ export default { - "c": {}, - "p": { - "node": "节点", - "chooseNode": "请选择节点", - "searchKeyword": "搜关键词", - "keywordHighlight": "关键词高亮,支持正则(正则可能影响性能请酌情使用)", - "keywordRegex": "关键词,支持正则", - "showFirstNLines": "显示前N行", - "showLastNLines": "显示后N行", - "regexReference": "正则语法参考", - "matchLinesWithNumbers": "匹配包含数字的行", - "matchLinesWithAorB": "匹配包含 a 或者 b 的行", - "exception": "异常", - "matchLinesWithException": "匹配包含 异常 的行", - "syntaxReference": "语法参考", - "searchMode": "搜索模式", - "searchModeDescription": "搜索模式,默认查看文件最后多少行,从头搜索指从指定行往下搜索,从尾搜索指从文件尾往上搜索多少行", - "searchFromEnd": "从尾搜索", - "searchFromStart": "从头搜索", - "firstNFileLines": "文件前N行", - "lastNFileLines": "文件后N行", - "searchConfigReference": "搜索配置参考", - "searchFromEndExample1": "从尾搜索、文件前0行、文件后3行", - "searchLastNLines": "在文件最后 3 行中搜索", - "searchFromStartExample1": "从头搜索、文件前0行、文件后3行", - "searchLineRange1": "在文件第 3 - 2147483647 行中搜索", - "searchFromEndExample2": "从尾搜索、文件前2行、文件后3行", - "searchLineRange2": "在文件第 1 - 2 行中搜索", - "searchFromEndExample3": "从尾搜索、文件前100行、文件后100行", - "searchLineRange3": "在文件第 1 - 100 行中搜索", - "searchFromStartExample2": "从头搜索、文件前2行、文件后3行", - "searchLineRange4": "在文件第 2 - 2 行中搜索", - "searchFromEndExample4": "从尾搜索、文件前20行、文件后3行", - "searchLineRange5": "在文件第 17 - 20 行中搜索", - "searchFromStartExample3": "从头搜索、文件前20行、文件后3行", - "searchLineRange6": "在文件第 3 - 20 行中搜索", - "searchReference": "搜索参考", - "error": "错误", - "checkWsProxy": "请检查是否开启 ws 代理", - "sessionClosed": "会话已经关闭", - "fileNotReadable": "当前文件不可读,需要配置可读文件授权" + c: {}, + p: { + node: '节点', + chooseNode: '请选择节点', + searchKeyword: '搜关键词', + keywordHighlight: '关键词高亮,支持正则(正则可能影响性能请酌情使用)', + keywordRegex: '关键词,支持正则', + showFirstNLines: '显示前N行', + showLastNLines: '显示后N行', + regexReference: '正则语法参考', + matchLinesWithNumbers: '匹配包含数字的行', + matchLinesWithAorB: '匹配包含 a 或者 b 的行', + exception: '异常', + matchLinesWithException: '匹配包含 异常 的行', + syntaxReference: '语法参考', + searchMode: '搜索模式', + searchModeDescription: + '搜索模式,默认查看文件最后多少行,从头搜索指从指定行往下搜索,从尾搜索指从文件尾往上搜索多少行', + searchFromEnd: '从尾搜索', + searchFromStart: '从头搜索', + firstNFileLines: '文件前N行', + lastNFileLines: '文件后N行', + searchConfigReference: '搜索配置参考', + searchFromEndExample1: '从尾搜索、文件前0行、文件后3行', + searchLastNLines: '在文件最后 3 行中搜索', + searchFromStartExample1: '从头搜索、文件前0行、文件后3行', + searchLineRange1: '在文件第 3 - 2147483647 行中搜索', + searchFromEndExample2: '从尾搜索、文件前2行、文件后3行', + searchLineRange2: '在文件第 1 - 2 行中搜索', + searchFromEndExample3: '从尾搜索、文件前100行、文件后100行', + searchLineRange3: '在文件第 1 - 100 行中搜索', + searchFromStartExample2: '从头搜索、文件前2行、文件后3行', + searchLineRange4: '在文件第 2 - 2 行中搜索', + searchFromEndExample4: '从尾搜索、文件前20行、文件后3行', + searchLineRange5: '在文件第 17 - 20 行中搜索', + searchFromStartExample3: '从头搜索、文件前20行、文件后3行', + searchLineRange6: '在文件第 3 - 20 行中搜索', + searchReference: '搜索参考', + error: '错误', + checkWsProxy: '请检查是否开启 ws 代理', + sessionClosed: '会话已经关闭', + fileNotReadable: '当前文件不可读,需要配置可读文件授权' } -} \ No newline at end of file +} diff --git a/web-vue/src/pages/dispatch/status.vue b/web-vue/src/pages/dispatch/status.vue index a617a72d5..bc9d71fd6 100644 --- a/web-vue/src/pages/dispatch/status.vue +++ b/web-vue/src/pages/dispatch/status.vue @@ -32,14 +32,25 @@
{{ $tl('p.currentStatus') }} {{ statusMap[data.status] || $tl('c.unknown') }} - {{ statusMap[data.status] || $tl('c.unknown') }} - {{ statusMap[data.status] || $tl('c.unknown') }} + {{ + statusMap[data.status] || $tl('c.unknown') + }} + {{ + statusMap[data.status] || $tl('c.unknown') + }} {{ statusMap[data.status] || $tl('c.unknown') }}
{{ $tl('p.statusDescription') }}{{ data.statusMsg || '-' }}
- {{ $tl('p.refresh') }} + {{ + $tl('p.refresh') + }} - + @@ -93,19 +114,37 @@ - + @@ -140,7 +179,15 @@ " /> - {{ $tl('p.unbind') }} + + {{ $tl('p.unbind') }} + @@ -160,25 +207,81 @@ - - + + - - + + - - + +