From 206bbab9b454a73d427cb4ff083c9676b7f6f256 Mon Sep 17 00:00:00 2001 From: jhfnetboy Date: Sun, 14 Jun 2026 15:11:14 +0700 Subject: [PATCH] =?UTF-8?q?feat(portal):=20finish=20i18n=20wiring=20?= =?UTF-8?q?=E2=80=94=20operator=20dashboard=20+=20admin=20role=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app/operator/page.tsx: full i18n wiring of the operator dashboard (operatorDashboard ns); keep #309 Quick Actions (operatorHub) + add type=button - app/admin/page.tsx: map API role.name via t(roleNames.) with raw fallback - locales: +operatorDashboard (27) +roleNames (7); 632 keys, en/zh in parity Completes #305 review suggestion (type=button) and the operator/admin i18n gaps. Verified: type-check 0, i18n:check (632), lint clean, next build pass. --- aastar-frontend/app/admin/page.tsx | 4 +- aastar-frontend/app/operator/page.tsx | 67 ++++++++++++++---------- aastar-frontend/lib/i18n/locales/en.json | 38 ++++++++++++++ aastar-frontend/lib/i18n/locales/zh.json | 38 ++++++++++++++ 4 files changed, 118 insertions(+), 29 deletions(-) diff --git a/aastar-frontend/app/admin/page.tsx b/aastar-frontend/app/admin/page.tsx index 7cc8eee..b7693fd 100644 --- a/aastar-frontend/app/admin/page.tsx +++ b/aastar-frontend/app/admin/page.tsx @@ -178,7 +178,9 @@ export default function AdminPage() { className="rounded-xl border border-gray-100 dark:border-gray-700 p-4" >
-

{role.name}

+

+ {t(`roleNames.${role.name}`, { defaultValue: role.name })} +

{ if (err.response?.status === 401) router.push("/auth/login"); - else setError("Failed to load operator data"); + else setError(t("operatorDashboard.loadError")); }) .finally(() => setLoading(false)); }, [router]); @@ -125,7 +125,7 @@ export default function OperatorPage() {

- Operator Portal + {t("operatorDashboard.title")}

{error && ( @@ -137,6 +137,7 @@ export default function OperatorPage() { {/* Quick Actions — entry points to the operator write flows */}