From 262980d612e0eefea5ea8be2383d04e5bf834cb6 Mon Sep 17 00:00:00 2001 From: TyperBody Date: Fri, 25 Sep 2026 18:07:11 +0800 Subject: [PATCH] fix(web): add missing common.next/previous pagination keys The bot session monitor paging controls use `common.next` and `common.previous`, but those keys never existed in any locale. They were only rendered because of the hardcoded `defaultValue: 'Next'`/`'Previous'`. Removing those fallbacks (previous commit) made i18next render the raw key name, so the Playwright smoke tests could no longer find the "Next" button. Add `common.previous` and `common.next` to all 8 locales (reusing each language's existing `guidedTour.previous`/`next` wording) and re-align the locale key order with the `en-US` reference. Verified locally: - scripts/check-i18n.mjs passes for all locales - every t('...') key referenced by BotSessionMonitor.tsx now exists in en-US - tests/e2e/bot-session-tool-timeline.spec.ts: 13/13 passed (including the two request-recovery cases that failed in CI) - prettier / tsc / eslint clean --- web/src/i18n/locales/en-US.ts | 2 ++ web/src/i18n/locales/es-ES.ts | 2 ++ web/src/i18n/locales/ja-JP.ts | 2 ++ web/src/i18n/locales/ru-RU.ts | 2 ++ web/src/i18n/locales/th-TH.ts | 2 ++ web/src/i18n/locales/vi-VN.ts | 2 ++ web/src/i18n/locales/zh-Hans.ts | 2 ++ web/src/i18n/locales/zh-Hant.ts | 2 ++ 8 files changed, 16 insertions(+) diff --git a/web/src/i18n/locales/en-US.ts b/web/src/i18n/locales/en-US.ts index c9388cc4f..f448dfd83 100644 --- a/web/src/i18n/locales/en-US.ts +++ b/web/src/i18n/locales/en-US.ts @@ -307,6 +307,8 @@ const enUS = { customValue: 'Custom', loadFailed: 'Failed to load. Please try again.', search: 'Search', + previous: 'Previous', + next: 'Next', login: 'Login', logout: 'Logout', accountOptions: 'Settings', diff --git a/web/src/i18n/locales/es-ES.ts b/web/src/i18n/locales/es-ES.ts index 34ae4b818..41b813442 100644 --- a/web/src/i18n/locales/es-ES.ts +++ b/web/src/i18n/locales/es-ES.ts @@ -307,6 +307,8 @@ const esES = { customValue: 'Personalizado', loadFailed: 'No se pudo cargar. Inténtalo de nuevo.', search: 'Buscar', + previous: 'Anterior', + next: 'Siguiente', login: 'Iniciar sesión', logout: 'Cerrar sesión', accountOptions: 'Configuración', diff --git a/web/src/i18n/locales/ja-JP.ts b/web/src/i18n/locales/ja-JP.ts index d1b629b4b..78a7778f0 100644 --- a/web/src/i18n/locales/ja-JP.ts +++ b/web/src/i18n/locales/ja-JP.ts @@ -303,6 +303,8 @@ const jaJP = { customValue: 'カスタム', loadFailed: '読み込みに失敗しました。再試行してください。', search: '検索', + previous: '前へ', + next: '次へ', login: 'ログイン', logout: 'ログアウト', accountOptions: 'システム設定', diff --git a/web/src/i18n/locales/ru-RU.ts b/web/src/i18n/locales/ru-RU.ts index fd686b2a7..faa6bf053 100644 --- a/web/src/i18n/locales/ru-RU.ts +++ b/web/src/i18n/locales/ru-RU.ts @@ -306,6 +306,8 @@ const ruRU = { customValue: 'Свой вариант', loadFailed: 'Не удалось загрузить. Попробуйте ещё раз.', search: 'Поиск', + previous: 'Назад', + next: 'Далее', login: 'Войти', logout: 'Выйти', accountOptions: 'Настройки', diff --git a/web/src/i18n/locales/th-TH.ts b/web/src/i18n/locales/th-TH.ts index 794632ca4..f4f83777c 100644 --- a/web/src/i18n/locales/th-TH.ts +++ b/web/src/i18n/locales/th-TH.ts @@ -301,6 +301,8 @@ const thTH = { customValue: 'กำหนดเอง', loadFailed: 'โหลดไม่สำเร็จ โปรดลองอีกครั้ง', search: 'ค้นหา', + previous: 'ขั้นตอนก่อนหน้า', + next: 'ถัดไป', login: 'เข้าสู่ระบบ', logout: 'ออกจากระบบ', accountOptions: 'การตั้งค่า', diff --git a/web/src/i18n/locales/vi-VN.ts b/web/src/i18n/locales/vi-VN.ts index 48a0b896b..48307dc34 100644 --- a/web/src/i18n/locales/vi-VN.ts +++ b/web/src/i18n/locales/vi-VN.ts @@ -304,6 +304,8 @@ const viVN = { customValue: 'Tùy chỉnh', loadFailed: 'Không tải được. Vui lòng thử lại.', search: 'Tìm kiếm', + previous: 'Bước trước', + next: 'Tiếp theo', login: 'Đăng nhập', logout: 'Đăng xuất', accountOptions: 'Cài đặt', diff --git a/web/src/i18n/locales/zh-Hans.ts b/web/src/i18n/locales/zh-Hans.ts index 86037b1c8..3a22387e2 100644 --- a/web/src/i18n/locales/zh-Hans.ts +++ b/web/src/i18n/locales/zh-Hans.ts @@ -287,6 +287,8 @@ const zhHans = { customValue: '自定义', loadFailed: '加载失败,请重试。', search: '搜索', + previous: '上一步', + next: '下一步', login: '登录', logout: '退出登录', accountOptions: '系统设置', diff --git a/web/src/i18n/locales/zh-Hant.ts b/web/src/i18n/locales/zh-Hant.ts index 487b24cd2..652c1ab70 100644 --- a/web/src/i18n/locales/zh-Hant.ts +++ b/web/src/i18n/locales/zh-Hant.ts @@ -283,6 +283,8 @@ const zhHant = { customValue: '自訂', loadFailed: '載入失敗,請重試。', search: '搜尋', + previous: '上一步', + next: '下一步', login: '登入', logout: '登出', accountOptions: '系統設定',