Skip to content

feat(portal): i18n 收尾 — operator dashboard 全接线 + admin 角色名映射#310

Merged
jhfnetboy merged 1 commit into
masterfrom
feat/portal-i18n-complete
Jun 14, 2026
Merged

feat(portal): i18n 收尾 — operator dashboard 全接线 + admin 角色名映射#310
jhfnetboy merged 1 commit into
masterfrom
feat/portal-i18n-complete

Conversation

@jhfnetboy

Copy link
Copy Markdown
Member

改动

说明

  • 技术串(地址/合约函数名/单位/数字)不接线
  • 验证:type-check 0、i18n:check 632 key、lint 干净、next build 通过
  • 至此运营门户(deploy/manage/dashboard)+ Feature/aastar management portal #269 四页 i18n 全覆盖

- 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.<name>) 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.
@jhfnetboy jhfnetboy requested a review from fanhousanbu as a code owner June 14, 2026 08:11
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@clestons clestons left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: feat(portal): operator dashboard i18n 收尾 + admin roleNames 映射

Verdict: APPROVE — 2-round (pure i18n wiring + role name mapping, no business logic / auth / contracts). No blocking findings.

What was verified

type="button" fix — Both Quick Actions buttons now carry type="button", addressing the Low suggestion from #309. ✅

operatorDashboard namespace (27 keys) — Full i18n coverage for app/operator/page.tsx: title, loadError, status badges (spoBadge, v4OperatorBadge), metric cards (gtokenBalance, spoStake, spBalance, configured/notConfigured, exchangeRate, v4PaymasterEth), SPO registration instructions, contractAddresses, spoOperatorsTitle/v4OperatorsTitle, noneRegistered. EN/ZH symmetric. ✅

Split prefix/suffix patternregisterSpoStep2Prefix/registerSpoStep2Suffix, deployV4Step1Prefix/deployV4Step1Suffix, deployV4Step2Prefix/deployV4Step2Suffix correctly wrap inline <code> elements without embedding markup in translation strings. ✅

roleNames namespace (7 keys)app/admin/page.tsx uses t(\roleNames.${role.name}`, { defaultValue: role.name })`. Unknown role names fall back to the original string — zero data loss on schema evolution. EN maps technical aliases correctly ("SPO" and "SPO Operator" both → "SPO Operator"; "Admin" and "Protocol Admin" both → "Protocol Admin"). ✅

EN/ZH parity — 34 new keys per locale (27 + 7), symmetric structure. 632 total keys, i18n:check CI guard passed. ✅

Import orderinguseTranslation moved before @heroicons/react imports; cosmetic cleanup, no functional effect. ✅

No regressionsoperatorHub (4 keys, #309), operatorDeploy/operatorManage/rolePage/communityPage/adminPage/salePage namespaces (prior PRs) untouched. ✅

@jhfnetboy jhfnetboy merged commit 741035c into master Jun 14, 2026
11 of 14 checks passed
@jhfnetboy jhfnetboy deleted the feat/portal-i18n-complete branch June 14, 2026 09:48
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants