From 575e45f76b52858c10bda17a5ac3fa2a316f7c91 Mon Sep 17 00:00:00 2001 From: nesquena-hermes Date: Thu, 23 Jul 2026 03:12:49 +0000 Subject: [PATCH] polish(#6040): approval-counter CSS cleanup + i18n the pending-count string Fable UX polish pass on the gateway approval counter: - Move the crude inline style (font-size:0.75em;opacity:0.6;margin-top:4px) into a proper .approval-counter rule: 11px, color:var(--muted) (skin-safe vs opacity), margin:0 0 12px (fixes the 0px gap that left it flush against the buttons), tabular-nums for stable digits. - i18n the '1 of N pending' string (was the only hardcoded-English string in an otherwise fully-localized approval card): new approval_pending_count key in en + 14 locales, wired via t() with an English fallback. Co-authored-by: rodboev --- static/i18n.js | 15 +++++++++++++++ static/index.html | 2 +- static/messages.js | 4 +++- static/style.css | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/static/i18n.js b/static/i18n.js index 48a926c1..b35423f8 100644 --- a/static/i18n.js +++ b/static/i18n.js @@ -165,6 +165,7 @@ const LOCALES = { approval_responding: 'Responding\u2026', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Approvals not supported', + approval_pending_count: (n) => `1 of ${n} pending`, clarify_heading: 'Clarification needed', clarify_hint: 'Pick a choice, or type your own answer below.', clarify_other: 'Other', @@ -1925,6 +1926,7 @@ const LOCALES = { approval_responding: 'Rispondendo\u2026', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Approvazioni non supportate', + approval_pending_count: (n) => `1 di ${n} in sospeso`, clarify_heading: 'Chiarimento necessario', clarify_hint: "Scegli un'opzione o scrivi la tua risposta qui sotto.", clarify_other: 'Altro', @@ -3667,6 +3669,7 @@ const LOCALES = { approval_responding: '応答中…', approval_gateway_unsupported: '承認を実行するには新しいゲートウェイが必要です。有効にするには接続されている Hermes ゲートウェイをアップグレードしてください。', approval_gateway_unsupported_label: '承認はサポートされていません', + approval_pending_count: (n) => `${n}件中1件保留中`, clarify_heading: '確認が必要', clarify_hint: '選択肢を選ぶか、下に独自の回答を入力してください。', clarify_other: 'その他', @@ -5397,6 +5400,7 @@ const LOCALES = { approval_responding: 'Отвечаю…', approval_gateway_unsupported: 'Для подтверждений нужен более новый Gateway. Обновите подключённый Hermes Gateway, чтобы включить их.', approval_gateway_unsupported_label: 'Одобрение не поддерживается', + approval_pending_count: (n) => `1 из ${n} в ожидании`, untitled: 'Без названия', n_messages: (n) => `${n} сообщений`, load_older_messages: '↑ Прокрутите вверх или нажмите, чтобы загрузить ранние сообщения', @@ -7107,6 +7111,7 @@ const LOCALES = { approval_responding: 'Respondiendo…', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Las aprobaciones no son compatibles', + approval_pending_count: (n) => `1 de ${n} pendientes`, clarify_heading: 'Se necesita aclaración', clarify_hint: 'Elige una opción o escribe tu propia respuesta abajo.', clarify_other: 'Otra', @@ -8795,6 +8800,7 @@ const LOCALES = { approval_responding: 'Antwortet\u2026', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Genehmigungen nicht unterstützt', + approval_pending_count: (n) => `1 von ${n} ausstehend`, clarify_heading: 'Klärung erforderlich', clarify_hint: 'Wähle eine Option oder schreibe deine eigene Antwort unten.', clarify_other: 'Andere', @@ -10477,6 +10483,7 @@ const LOCALES = { approval_responding: '处理中…', approval_gateway_unsupported: '批准操作需要更新版本的网关。请升级已连接的Hermes网关以实现此功能。', approval_gateway_unsupported_label: '不支持批准', + approval_pending_count: (n) => `${n} 个待处理中的第 1 个`, clarify_heading: '需要澄清', clarify_hint: '请选择一个选项,或在下方输入你自己的回答。', clarify_other: '其他', @@ -12182,6 +12189,7 @@ const LOCALES = { approval_responding: '正在回應……', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: '不支援核准', + approval_pending_count: (n) => `${n} 個待處理中的第 1 個`, clarify_heading: '需要釐清', clarify_hint: '請選擇一個選項,或在下方輸入回答。', clarify_other: '其他', @@ -13832,6 +13840,7 @@ const LOCALES = { approval_responding: 'Respondendo…', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Aprovações não suportadas', + approval_pending_count: (n) => `1 de ${n} pendentes`, clarify_heading: 'Esclarecimento necessário', clarify_hint: 'Escolha uma opção ou digite sua resposta abaixo.', clarify_other: 'Outro', @@ -15460,6 +15469,7 @@ const LOCALES = { approval_responding: '응답 중\u2026', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: '승인이 지원되지 않음', + approval_pending_count: (n) => `${n}개 중 1개 대기 중`, clarify_heading: '확인 필요', clarify_hint: '선택지를 고르거나 아래에 직접 입력하세요.', clarify_other: '기타', @@ -17212,6 +17222,7 @@ const LOCALES = { approval_responding: 'Réponse en cours\u2026', approval_gateway_unsupported: 'Les approbations nécessitent une passerelle plus récente. Mettez à niveau la passerelle Hermes connectée pour activer cette fonctionnalité.', approval_gateway_unsupported_label: 'Approbations non prises en charge', + approval_pending_count: (n) => `1 sur ${n} en attente`, clarify_heading: 'Clarification nécessaire', clarify_hint: 'Choisissez une option ou saisissez votre propre réponse ci-dessous.', clarify_other: 'Autre', @@ -19980,6 +19991,7 @@ const LOCALES = { approval_desc_prefix: 'Byl zjištěn nebezpečný příkaz', approval_gateway_unsupported: 'Schválení vyžadují novější gateway. Upgradujte připojený Hermes gateway.', approval_gateway_unsupported_label: 'Schválení nejsou podporována', + approval_pending_count: (n) => `1 z ${n} čeká`, approval_heading: 'Požadováno schválení', approval_responding: 'Reakce\u2026', auto_compress_label: 'Automatická komprese', @@ -20629,6 +20641,7 @@ const LOCALES = { approval_responding: 'Yanıt veriliyor\u2026', approval_gateway_unsupported: 'Approvals require a newer gateway. Upgrade the connected Hermes gateway to enable this.', approval_gateway_unsupported_label: 'Onaylar desteklenmiyor', + approval_pending_count: (n) => `${n} bekleyenden 1'i`, clarify_heading: 'Açıklama gerekli', clarify_hint: 'Bir seçim yapın veya kendi cevabınızı aşağıya yazın.', clarify_other: 'Diğer', @@ -22373,6 +22386,7 @@ const LOCALES = { approval_responding: 'Odpowiadanie…', approval_gateway_unsupported: 'Zatwierdzenia wymagają nowszej bramy. Zaktualizuj połączoną bramę Hermes, aby włączyć tę funkcję.', approval_gateway_unsupported_label: 'Zatwierdzenia nie są obsługiwane', + approval_pending_count: (n) => `1 z ${n} oczekujących`, clarify_heading: 'Wymagane wyjaśnienie', clarify_hint: 'Wybierz opcję lub wpisz własną odpowiedź poniżej.', clarify_other: 'Inne', @@ -25467,6 +25481,7 @@ const LOCALES = { approval_gateway_unsupported: 'Phê duyệt cần gateway mới hơn. Hãy nâng cấp Hermes gateway đang kết nối để bật tính năng này.', approval_gateway_unsupported_label: 'Không hỗ trợ phê duyệt', + approval_pending_count: (n) => `1 trong ${n} đang chờ`, approval_skip_all: '⚡ Bỏ qua tất cả trong phiên này', approval_skip_all_title: 'Bỏ qua mọi yêu cầu phê duyệt cho phiên này', checkpoint_title: 'Checkpoint', diff --git a/static/index.html b/static/index.html index 98afb48d..8e9568de 100644 --- a/static/index.html +++ b/static/index.html @@ -496,7 +496,7 @@
- +