Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: correct changelog log interpolation (#20019)

p0nyab1a634c2292
diff --git a/frontend/src/react/components/task-run-log/TaskRunLogViewer.i18n.test.ts b/frontend/src/react/components/task-run-log/TaskRunLogViewer.i18n.test.ts
new file mode 100644
index 0000000000..0198c42c02
--- /dev/null
+++ b/frontend/src/react/components/task-run-log/TaskRunLogViewer.i18n.test.ts
@@ -0,0 +1,41 @@
+import i18next from "i18next";
+import { describe, expect, test } from "vitest";
+import enUS from "@/react/locales/en-US.json";
+import esES from "@/react/locales/es-ES.json";
+import jaJP from "@/react/locales/ja-JP.json";
+import viVN from "@/react/locales/vi-VN.json";
+import zhCN from "@/react/locales/zh-CN.json";
+
+const LOCALES = {
+ "en-US": enUS,
+ "zh-CN": zhCN,
+ "es-ES": esES,
+ "ja-JP": jaJP,
+ "vi-VN": viVN,
+} as const;
+
+describe("TaskRunLogViewer locale interpolation", () => {
+ test.each(
+ Object.entries(LOCALES)
+ )("interpolates summary and replica labels in %s", (locale, translation) => {
+ const i18n = i18next.createInstance();
+
+ void i18n.init({
+ resources: {
+ [locale]: { translation },
+ },
+ lng: locale,
+ interpolation: {
+ escapeValue: false,
+ },
+ initImmediate: false,
+ });
+
+ expect(
+ i18n.t("task-run.log-viewer.summary", { sections: 2, entries: 3 })
+ ).not.toContain("{");
+ expect(i18n.t("task-run.log-viewer.replica-n", { n: 2 })).not.toContain(
+ "{"
+ );
+ });
+});
diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.json
index e7932e15d7..a0aba0bb95 100644
--- a/frontend/src/react/locales/en-US.json
+++ b/frontend/src/react/locales/en-US.json
@@ -3022,8 +3022,8 @@
"task-run.log-viewer.collapse-all": "Collapse all",
"task-run.log-viewer.expand-all": "Expand all",
"task-run.log-viewer.multiple-replicas-notice": "Server restart detected during execution. Logs are grouped by replica.",
- "task-run.log-viewer.replica-n": "Replica #{n}",
- "task-run.log-viewer.summary": "{sections} sections · {entries} entries",
+ "task-run.log-viewer.replica-n": "Replica #{{n}}",
+ "task-run.log-viewer.summary": "{{sections}} sections · {{entries}} entries",
"task-run.status.enqueued": "Waiting for execution.",
"task-run.status.enqueued-with-rollout-time": "Waiting to execute after {{time}}.",
"task-run.status.waiting-max-tasks-per-rollout": "Waiting for other tasks to finish. Maximum running tasks limit per rollout has been reached. Last report at {{time}}.",
diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.json
index 9948e88312..474d43a2c8 100644
--- a/frontend/src/react/locales/es-ES.json
+++ b/frontend/src/react/locales/es-ES.json
@@ -3022,8 +3022,8 @@
"task-run.log-viewer.collapse-all": "Contraer todo",
"task-run.log-viewer.expand-all": "Expandir todo",
"task-run.log-viewer.multiple-replicas-notice": "Se detectó un reinicio del servidor durante la ejecución. Los registros están agrupados por réplica.",
- "task-run.log-viewer.replica-n": "Réplica #{n}",
- "task-run.log-viewer.summary": "{sections} secciones · {entries} entradas",
+ "task-run.log-viewer.replica-n": "Réplica #{{n}}",
+ "task-run.log-viewer.summary": "{{sections}} secciones · {{entries}} entradas",
"task-run.status.enqueued": "Esperando a ser ejecutada.",
"task-run.status.enqueued-with-rollout-time": "Esperando para ejecutar después de {{time}}.",
"task-run.status.waiting-max-tasks-per-rollout": "Esperando a que terminen otras tareas. Se ha alcanzado el límite máximo de tareas en ejecución por despliegue. Último informe a las {{time}}.",
diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.json
index 39d6eeb0bb..2cd33d278b 100644
--- a/frontend/src/react/locales/ja-JP.json
+++ b/frontend/src/react/locales/ja-JP.json
@@ -3022,8 +3022,8 @@
"task-run.log-viewer.collapse-all": "すべて折りたたむ",
"task-run.log-viewer.expand-all": "すべて展開",
"task-run.log-viewer.multiple-replicas-notice": "実行中にサーバーの再起動が検出されました。ログはレプリカごとにグループ化されています。",
- "task-run.log-viewer.replica-n": "レプリカ #{n}",
- "task-run.log-viewer.summary": "{sections} セクション · {entries} エントリ",
+ "task-run.log-viewer.replica-n": "レプリカ #{{n}}",
+ "task-run.log-viewer.summary": "{{sections}} セクション · {{entries}} エントリ",
"task-run.status.enqueued": "実行を待っています。",
"task-run.status.enqueued-with-rollout-time": "{{time}} の後に実行される予定です。",
"task-run.status.waiting-max-tasks-per-rollout": "他のタスクが完了するのを待っています。ロールアウトごとの最大実行タスク数制限に達しました。最後の報告は {{time}} です。",
diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.json
index 400aba6517..c13ce44bbe 100644
--- a/frontend/src/react/locales/vi-VN.json
+++ b/frontend/src/react/locales/vi-VN.json
@@ -3022,8 +3022,8 @@
"task-run.log-viewer.collapse-all": "Thu gọn tất cả",
"task-run.log-viewer.expand-all": "Mở rộng tất cả",
"task-run.log-viewer.multiple-replicas-notice": "Phát hiện khởi động lại máy chủ trong quá trình thực thi. Nhật ký được nhóm theo bản sao.",
- "task-run.log-viewer.replica-n": "Bản sao #{n}",
- "task-run.log-viewer.summary": "{sections} phần · {entries} mục",
+ "task-run.log-viewer.replica-n": "Bản sao #{{n}}",
+ "task-run.log-viewer.summary": "{{sections}} phần · {{entries}} mục",
"task-run.status.enqueued": "Đang chờ thực thi.",
"task-run.status.enqueued-with-rollout-time": "Đang chờ thực thi sau {{time}}.",
"task-run.status.waiting-max-tasks-per-rollout": "Đang chờ các tác vụ khác hoàn thành. Đã đạt đến giới hạn số lượng tác vụ đang chạy tối đa cho mỗi lần triển khai. Báo cáo gần nhất lúc {{time}}.",
diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.json
index 30740fa870..82b0dbe192 100644
--- a/frontend/src/react/locales/zh-CN.json
+++ b/frontend/src/react/locales/zh-CN.json
@@ -3022,8 +3022,8 @@
"task-run.log-viewer.collapse-all": "全部收起",
"task-run.log-viewer.expand-all": "全部展开",
"task-run.log-viewer.multiple-replicas-notice": "检测到执行期间服务重启,日志按副本分组显示。",
- "task-run.log-viewer.replica-n": "副本 #{n}",
- "task-run.log-viewer.summary": "{sections} 个分组 · {entries} 条记录",
+ "task-run.log-viewer.replica-n": "副本 #{{n}}",
+ "task-run.log-viewer.summary": "{{sections}} 个分组 · {{entries}} 条记录",
"task-run.status.enqueued": "等待执行。",
"task-run.status.enqueued-with-rollout-time": "等待执行,{{time}} 后执行。",
"task-run.status.waiting-max-tasks-per-rollout": "正在等待其他任务完成。已达到每次发布的最大运行任务数限制。上次报告时间:{{time}}。",