From 00c071c27a0a871712ebbfa465e65729e3721d1d Mon Sep 17 00:00:00 2001 From: "Crane.z" <1481445951@qq.com> Date: Sun, 20 Sep 2026 11:18:17 +0800 Subject: [PATCH] fix(i18n): correct missing message keys --- .../chen/framework/console/QueryConsole.java | 10 +++++----- .../framework/datasource/base/BaseActionHandler.java | 2 +- .../dameng/DMActionHandler.java | 12 ++++++------ backend/web/src/main/resources/i18n/chen.properties | 5 +++++ .../web/src/main/resources/i18n/chen_en.properties | 5 +++++ .../web/src/main/resources/i18n/chen_es.properties | 5 +++++ .../web/src/main/resources/i18n/chen_ja.properties | 5 +++++ .../web/src/main/resources/i18n/chen_ko.properties | 5 +++++ .../src/main/resources/i18n/chen_pt_BR.properties | 5 +++++ .../web/src/main/resources/i18n/chen_ru.properties | 5 +++++ .../web/src/main/resources/i18n/chen_vi.properties | 5 +++++ .../web/src/main/resources/i18n/chen_zh.properties | 5 +++++ .../src/main/resources/i18n/chen_zh_TW.properties | 5 +++++ 13 files changed, 62 insertions(+), 12 deletions(-) diff --git a/backend/framework/src/main/java/org/jumpserver/chen/framework/console/QueryConsole.java b/backend/framework/src/main/java/org/jumpserver/chen/framework/console/QueryConsole.java index ca79d9ad..339bd453 100644 --- a/backend/framework/src/main/java/org/jumpserver/chen/framework/console/QueryConsole.java +++ b/backend/framework/src/main/java/org/jumpserver/chen/framework/console/QueryConsole.java @@ -145,7 +145,7 @@ public QueryConsole( this.consoleMode = consoleMode; this.titleSequence = generateConsoleName(consoleMode); this.setTitle(String.format( - MessageUtils.get(consoleMode ? "Console" : "Query") + "-%d", + (consoleMode ? "Console" : MessageUtils.get("Query")) + "-%d", this.titleSequence )); this.datasource = datasource; @@ -1009,15 +1009,15 @@ public void onSQLFile(String filename) { return; } if (!Files.exists(filePath, LinkOption.NOFOLLOW_LINKS)) { - this.getConsoleLogger().error("%s: %s", MessageUtils.get("msg.error.file_not_found"), filename); + this.getConsoleLogger().error("%s: %s", MessageUtils.get("FileNotFoundError"), filename); return; } if (!Files.isRegularFile(filePath, LinkOption.NOFOLLOW_LINKS)) { - this.getConsoleLogger().error("%s: %s", MessageUtils.get("msg.error.file_not_file"), filename); + this.getConsoleLogger().error("%s: %s", MessageUtils.get("FileNotRegularError"), filename); return; } if (!Files.isReadable(filePath)) { - this.getConsoleLogger().error("%s: %s", MessageUtils.get("msg.error.file_not_readable"), filename); + this.getConsoleLogger().error("%s: %s", MessageUtils.get("FileNotReadableError"), filename); return; } @@ -1031,7 +1031,7 @@ public void onSQLFile(String filename) { sql = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8); } } catch (IOException | SecurityException e) { - this.getConsoleLogger().error("%s: %s", MessageUtils.get("msg.error.file_read_error"), e.getMessage()); + this.getConsoleLogger().error("%s: %s", MessageUtils.get("FileReadError"), e.getMessage()); return; } this.onSQL(sql); diff --git a/backend/framework/src/main/java/org/jumpserver/chen/framework/datasource/base/BaseActionHandler.java b/backend/framework/src/main/java/org/jumpserver/chen/framework/datasource/base/BaseActionHandler.java index 32c11fd6..d9d9c8b2 100644 --- a/backend/framework/src/main/java/org/jumpserver/chen/framework/datasource/base/BaseActionHandler.java +++ b/backend/framework/src/main/java/org/jumpserver/chen/framework/datasource/base/BaseActionHandler.java @@ -235,7 +235,7 @@ private Object runTargetMethod(String methodName, TreeNode node) throws Reflecti public EventEmitter onDatasourceProperties(TreeNode node) { - var dialog = new DetailDialog(node.getKey(), MessageUtils.get("DatasourceProperties")); + var dialog = new DetailDialog(node.getKey(), MessageUtils.get("DatabaseProperties")); dialog.setWidth("50%"); var info = SessionManager.getCurrentSession().getDatasource().getInfo(); dialog.addItem(DetailItem.builder() diff --git a/backend/modules/src/main/java/org.jumpserver.chen.modules/dameng/DMActionHandler.java b/backend/modules/src/main/java/org.jumpserver.chen.modules/dameng/DMActionHandler.java index 376e5c19..428c17f8 100644 --- a/backend/modules/src/main/java/org.jumpserver.chen.modules/dameng/DMActionHandler.java +++ b/backend/modules/src/main/java/org.jumpserver.chen.modules/dameng/DMActionHandler.java @@ -18,19 +18,19 @@ public class DMActionHandler extends BaseActionHandler { public List getSchemaActions(TreeNode node) { return List.of( Action.builder() - .label(MessageUtils.get("action.refresh")) + .label(MessageUtils.get("Refresh")) .key("refresh_node") .divided(true) .icon("el-icon-refresh") .build(), Action.builder() - .label(MessageUtils.get("action.new_query")) + .label(MessageUtils.get("NewQuery")) .key("new_query") .icon("el-icon-search") .build() , Action.builder() - .label(MessageUtils.get("action.show_properties")) + .label(MessageUtils.get("ShowProperties")) .key("show_properties") .icon("fa fa-align-justify") .build() @@ -41,17 +41,17 @@ public List getSchemaActions(TreeNode node) { public List getTableActions(TreeNode node) { return List.of( Action.builder() - .label(MessageUtils.get("action.new_query")) + .label(MessageUtils.get("NewQuery")) .key("new_query") .icon("el-icon-search") .build(), Action.builder() - .label(MessageUtils.get("action.view_data")) + .label(MessageUtils.get("ViewData")) .key("view_data") .icon("el-icon-view") .build(), Action.builder() - .label(MessageUtils.get("action.show_properties")) + .label(MessageUtils.get("ShowProperties")) .key("show_properties") .icon("fa fa-align-justify") .build() diff --git a/backend/web/src/main/resources/i18n/chen.properties b/backend/web/src/main/resources/i18n/chen.properties index b335a457..0d8b2648 100644 --- a/backend/web/src/main/resources/i18n/chen.properties +++ b/backend/web/src/main/resources/i18n/chen.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=Failed to load SQL hints FailedToLoadSqlRelationMetadata=Failed to load SQL relation metadata FailedToLoadTableMetadata=Failed to load table metadata FetchError=Error while fetching data +FileNotFoundError=File not found +FileNotReadableError=File is not readable +FileNotRegularError=Not a regular file +FileReadError=Failed to read file Format=Format FormatHotKey=Format (Ctrl + L) GetChildrenFailed=Failed to load children of %s @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Properties +Query=Query QueryOkRows=Query OK, %d rows discovered QueryUnsupported=This SQL is not supported by Query because Chen cannot parse it with Druid. Use Console to draft and run it. Refresh=Refresh diff --git a/backend/web/src/main/resources/i18n/chen_en.properties b/backend/web/src/main/resources/i18n/chen_en.properties index b335a457..0d8b2648 100644 --- a/backend/web/src/main/resources/i18n/chen_en.properties +++ b/backend/web/src/main/resources/i18n/chen_en.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=Failed to load SQL hints FailedToLoadSqlRelationMetadata=Failed to load SQL relation metadata FailedToLoadTableMetadata=Failed to load table metadata FetchError=Error while fetching data +FileNotFoundError=File not found +FileNotReadableError=File is not readable +FileNotRegularError=Not a regular file +FileReadError=Failed to read file Format=Format FormatHotKey=Format (Ctrl + L) GetChildrenFailed=Failed to load children of %s @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Properties +Query=Query QueryOkRows=Query OK, %d rows discovered QueryUnsupported=This SQL is not supported by Query because Chen cannot parse it with Druid. Use Console to draft and run it. Refresh=Refresh diff --git a/backend/web/src/main/resources/i18n/chen_es.properties b/backend/web/src/main/resources/i18n/chen_es.properties index 20ec1e5a..9ee605ea 100644 --- a/backend/web/src/main/resources/i18n/chen_es.properties +++ b/backend/web/src/main/resources/i18n/chen_es.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=No se pudieron cargar las sugerencias SQL FailedToLoadSqlRelationMetadata=No se pudieron cargar los metadatos de relaciones SQL FailedToLoadTableMetadata=No se pudieron cargar los metadatos de la tabla FetchError=Falló la obtención de datos +FileNotFoundError=Archivo no encontrado +FileNotReadableError=No se puede leer el archivo +FileNotRegularError=No es un archivo normal +FileReadError=No se pudo leer el archivo Format=Formato. FormatHotKey=Formatear (Ctrl + L). GetChildrenFailed=No se pudieron cargar los nodos secundarios de %s @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Atributos +Query=Consulta QueryOkRows=Consulta correcta, %d filas encontradas QueryUnsupported=Query no admite este SQL porque Chen no puede analizarlo con Druid. Use Console para redactarlo y ejecutarlo. Refresh=Actualizar diff --git a/backend/web/src/main/resources/i18n/chen_ja.properties b/backend/web/src/main/resources/i18n/chen_ja.properties index 953f3903..57e807fe 100644 --- a/backend/web/src/main/resources/i18n/chen_ja.properties +++ b/backend/web/src/main/resources/i18n/chen_ja.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=SQL ヒントの読み込みに失敗しました FailedToLoadSqlRelationMetadata=SQL リレーションメタデータの読み込みに失敗しました FailedToLoadTableMetadata=テーブルメタデータの読み込みに失敗しました FetchError=データの取得に失敗しました +FileNotFoundError=ファイルが見つかりません +FileNotReadableError=ファイルを読み取れません +FileNotRegularError=通常ファイルではありません +FileReadError=ファイルの読み取りに失敗しました Format=フォーマット FormatHotKey=フォーマット (Ctrl + L) GetChildrenFailed=%s の子ノードの読み込みに失敗しました @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=プロパティ +Query=クエリ QueryOkRows=クエリ成功、%d 行を取得しました QueryUnsupported=Chen が Druid で解析できないため、Query ではこの SQL を実行できません。Console で作成して実行してください。 Refresh=リフレッシュ diff --git a/backend/web/src/main/resources/i18n/chen_ko.properties b/backend/web/src/main/resources/i18n/chen_ko.properties index a0f164be..1fc1e1ee 100644 --- a/backend/web/src/main/resources/i18n/chen_ko.properties +++ b/backend/web/src/main/resources/i18n/chen_ko.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=SQL 힌트를 불러오지 못했습니다 FailedToLoadSqlRelationMetadata=SQL 릴레이션 메타데이터를 불러오지 못했습니다 FailedToLoadTableMetadata=테이블 메타데이터를 불러오지 못했습니다 FetchError=데이터를 가져오는 데 실패했습니다 +FileNotFoundError=파일을 찾을 수 없습니다 +FileNotReadableError=파일을 읽을 수 없습니다 +FileNotRegularError=일반 파일이 아닙니다 +FileReadError=파일을 읽지 못했습니다 Format=형식 FormatHotKey=형식화 (Ctrl + L) GetChildrenFailed=%s의 하위 노드를 불러오지 못했습니다 @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=속성 +Query=쿼리 QueryOkRows=쿼리 성공, %d개 행을 찾았습니다 QueryUnsupported=Chen이 Druid로 이 SQL을 구문 분석할 수 없어 Query에서 지원하지 않습니다. Console에서 작성하고 실행하세요. Refresh=갱신 diff --git a/backend/web/src/main/resources/i18n/chen_pt_BR.properties b/backend/web/src/main/resources/i18n/chen_pt_BR.properties index bc1fe99d..1904148c 100644 --- a/backend/web/src/main/resources/i18n/chen_pt_BR.properties +++ b/backend/web/src/main/resources/i18n/chen_pt_BR.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=Falha ao carregar as dicas SQL FailedToLoadSqlRelationMetadata=Falha ao carregar metadados de relações SQL FailedToLoadTableMetadata=Falha ao carregar metadados da tabela FetchError=Falha ao obter os dados +FileNotFoundError=Arquivo não encontrado +FileNotReadableError=O arquivo não pode ser lido +FileNotRegularError=Não é um arquivo regular +FileReadError=Falha ao ler o arquivo Format=Formato FormatHotKey=Formatar (Ctrl + L) GetChildrenFailed=Falha ao carregar os filhos de %s @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Propriedades +Query=Consulta QueryOkRows=Consulta OK, %d linhas encontradas QueryUnsupported=O Query não oferece suporte a este SQL porque o Chen não consegue analisá-lo com o Druid. Use o Console para redigir e executar. Refresh=Atualizar diff --git a/backend/web/src/main/resources/i18n/chen_ru.properties b/backend/web/src/main/resources/i18n/chen_ru.properties index 691ec69d..9ea606ca 100644 --- a/backend/web/src/main/resources/i18n/chen_ru.properties +++ b/backend/web/src/main/resources/i18n/chen_ru.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=Не удалось загрузить подсказки S FailedToLoadSqlRelationMetadata=Не удалось загрузить метаданные отношений SQL FailedToLoadTableMetadata=Не удалось загрузить метаданные таблицы FetchError=Не удалось получить данные +FileNotFoundError=Файл не найден +FileNotReadableError=Файл недоступен для чтения +FileNotRegularError=Объект не является обычным файлом +FileReadError=Не удалось прочитать файл Format=Формат FormatHotKey=Форматировать (Ctrl + L) GetChildrenFailed=Не удалось загрузить дочерние узлы %s @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Свойства +Query=Запрос QueryOkRows=Запрос выполнен, найдено строк: %d QueryUnsupported=Query не поддерживает этот SQL, потому что Chen не может разобрать его через Druid. Используйте Console, чтобы составить и выполнить его. Refresh=Обновить diff --git a/backend/web/src/main/resources/i18n/chen_vi.properties b/backend/web/src/main/resources/i18n/chen_vi.properties index a16adbd5..ef6b654d 100644 --- a/backend/web/src/main/resources/i18n/chen_vi.properties +++ b/backend/web/src/main/resources/i18n/chen_vi.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=Tải gợi ý SQL thất bại FailedToLoadSqlRelationMetadata=Tải metadata quan hệ SQL thất bại FailedToLoadTableMetadata=Tải metadata bảng thất bại FetchError=Lấy dữ liệu thất bại +FileNotFoundError=Không tìm thấy tệp +FileNotReadableError=Không thể đọc tệp +FileNotRegularError=Không phải là tệp thông thường +FileReadError=Không đọc được tệp Format=Định dạng FormatHotKey=Định dạng (Ctrl + L) GetChildrenFailed=Tải nút con của %s thất bại @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=This statement cannot be estimated Plan.UnboundParameter=Statements with unbound parameters cannot be estimated Plan.UnsupportedDatabase=Execution plan is not implemented for this datasource Properties=Thuộc tính +Query=Truy vấn QueryOkRows=Truy vấn thành công, tìm thấy %d hàng QueryUnsupported=Query không hỗ trợ SQL này vì Chen không phân tích được bằng Druid. Hãy dùng Console để soạn và chạy. Refresh=Làm mới diff --git a/backend/web/src/main/resources/i18n/chen_zh.properties b/backend/web/src/main/resources/i18n/chen_zh.properties index a2ce172d..9834e2dd 100644 --- a/backend/web/src/main/resources/i18n/chen_zh.properties +++ b/backend/web/src/main/resources/i18n/chen_zh.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=加载 SQL 提示失败 FailedToLoadSqlRelationMetadata=加载 SQL 关系元数据失败 FailedToLoadTableMetadata=加载表元数据失败 FetchError=获取数据失败 +FileNotFoundError=文件不存在 +FileNotReadableError=文件不可读 +FileNotRegularError=路径不是普通文件 +FileReadError=读取文件失败 Format=格式 FormatHotKey=格式化 (Ctrl + L) GetChildrenFailed=获取 %s 的子节点失败 @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=此语句无法估算执行计划 Plan.UnboundParameter=包含未绑定参数的语句无法估算执行计划 Plan.UnsupportedDatabase=当前数据源尚未实现执行计划 Properties=属性 +Query=查询 QueryOkRows=查询成功,发现 %d 行 QueryUnsupported=Query 不支持此 SQL,因为 Chen 无法用 Druid 解析。请使用 Console 编写并执行。 Refresh=刷新 diff --git a/backend/web/src/main/resources/i18n/chen_zh_TW.properties b/backend/web/src/main/resources/i18n/chen_zh_TW.properties index 2c5e95f5..ebd01ae9 100644 --- a/backend/web/src/main/resources/i18n/chen_zh_TW.properties +++ b/backend/web/src/main/resources/i18n/chen_zh_TW.properties @@ -46,6 +46,10 @@ FailedToLoadSqlHints=載入 SQL 提示失敗 FailedToLoadSqlRelationMetadata=載入 SQL 關聯中繼資料失敗 FailedToLoadTableMetadata=載入資料表中繼資料失敗 FetchError=獲取資料失敗 +FileNotFoundError=找不到檔案 +FileNotReadableError=檔案無法讀取 +FileNotRegularError=路徑不是一般檔案 +FileReadError=讀取檔案失敗 Format=格式 FormatHotKey=格式化 (Ctrl + L) GetChildrenFailed=取得 %s 的子節點失敗 @@ -127,6 +131,7 @@ Plan.StatementCannotBeEstimated=此語句無法估算執行計畫 Plan.UnboundParameter=包含未繫結參數的語句無法估算執行計畫 Plan.UnsupportedDatabase=目前資料來源尚未實作執行計畫 Properties=屬性 +Query=查詢 QueryOkRows=查詢成功,發現 %d 行 QueryUnsupported=Query 不支援此 SQL,因為 Chen 無法用 Druid 解析。請使用 Console 編寫並執行。 Refresh=刷新