From b57cafed94ee8092105f749ffe5c412c783137a5 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Mon, 18 May 2026 10:17:15 +0200 Subject: [PATCH] i18n(clients): replace English fallbacks with proper translation keys Pulls every hard-coded English label/title in the Clients page and its four modals through the i18n layer so localized panels stop leaking English. New keys live under pages.clients (auth, hysteriaAuth, uuid, flow, flowNone, reverseTag, reverseTagPlaceholder, telegramId, telegramIdPlaceholder, created, updated, ipLimit) plus refresh at the root and toasts.bulkDeletedMixed / bulkCreatedMixed for partial-failure toasts. Also switches the add-client modal's primary button from "Add" to "Create" for consistency with other create flows. The bulk-add Random/Random+Prefix/... email-method options stay hard-coded by request - they're identifier-shaped strings. --- .../src/pages/clients/ClientBulkAddModal.vue | 16 ++-- .../src/pages/clients/ClientFormModal.vue | 42 ++++----- .../src/pages/clients/ClientInfoModal.vue | 38 ++++---- frontend/src/pages/clients/ClientQrModal.vue | 12 +-- frontend/src/pages/clients/ClientsPage.vue | 93 +++++++++---------- web/translation/en-US.json | 14 +++ 6 files changed, 111 insertions(+), 104 deletions(-) diff --git a/frontend/src/pages/clients/ClientBulkAddModal.vue b/frontend/src/pages/clients/ClientBulkAddModal.vue index f0debc61..dabbc83f 100644 --- a/frontend/src/pages/clients/ClientBulkAddModal.vue +++ b/frontend/src/pages/clients/ClientBulkAddModal.vue @@ -129,7 +129,7 @@ function buildEmails() { async function submit() { if (!Array.isArray(form.inboundIds) || form.inboundIds.length === 0) { - message.error(t('pages.clients.selectInbound') || 'Select one or more inbounds.'); + message.error(t('pages.clients.selectInbound')); return; } const emails = buildEmails(); @@ -159,9 +159,9 @@ async function submit() { else failed++; } if (failed === 0) { - message.success(t('pages.clients.toasts.bulkCreated', { count: ok }) || `${ok} clients created`); + message.success(t('pages.clients.toasts.bulkCreated', { count: ok })); } else { - message.warning(`${ok} created, ${failed} failed`); + message.warning(t('pages.clients.toasts.bulkCreatedMixed', { ok, failed })); } emit('saved'); close(); @@ -172,10 +172,10 @@ async function submit() {