Skip to content

UI: localize Overview and login gate labels#61054

Merged
sallyom merged 4 commits into
openclaw:mainfrom
rubensfox20:fix/overview-i18n-hardcoded-links
Apr 20, 2026
Merged

UI: localize Overview and login gate labels#61054
sallyom merged 4 commits into
openclaw:mainfrom
rubensfox20:fix/overview-i18n-hardcoded-links

Conversation

@rubensfox20

Copy link
Copy Markdown
Contributor

Summary

  • Problem: the Overview screen still had several hardcoded English labels in buttons, placeholders, and docs-link metadata even when a non-English locale was selected.
  • Why it matters: users saw mixed-language UI on the first screen of the Control UI, which weakens the value of existing locale support.
  • What changed: moved those Overview-only hardcoded labels into locale keys and wired overview.ts to read them through t(...).
  • What did NOT change (scope boundary): no routing, no behavior changes, and no i18n work outside the Overview screen.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Root Cause (if applicable)

  • Root cause: some Overview strings were still embedded directly in ui/src/ui/views/overview.ts instead of going through locale files.
  • Missing detection / guardrail: locale coverage exists, but there was no guardrail preventing these labels from staying hardcoded in the view.
  • Contributing context (if known): this PR intentionally keeps the scope to one screen so the i18n cleanup stays reviewable.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file:
    • ui/src/i18n/test/translate.test.ts
  • Scenario the test should lock in:
    • locale lookups for the newly added Overview keys resolve correctly.
  • Why this is the smallest reliable guardrail:
    • the change is isolated to locale keys plus one Overview view.
  • Existing test that already covers this (if any):
    • ui/src/i18n/test/translate.test.ts
  • If no new test is added, why not:
    • existing i18n coverage plus successful UI build were sufficient for this scoped change.

User-visible / Behavior Changes

  • The Overview screen no longer shows those hardcoded English labels when pt-BR is selected.

Diagram (if applicable)

N/A

Security Impact (required)

  • New permissions/capabilities? (Yes/No): No
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): No
  • Command/tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: Windows 10
  • Runtime/container: local Node/pnpm dev environment
  • Model/provider: N/A
  • Integration/channel (if any): Control UI Overview screen
  • Relevant config (redacted): N/A

Steps

  1. Switch the Control UI locale away from English.
  2. Open the Overview screen.
  3. Inspect docs-link labels, token/password visibility labels, and the password placeholder.

Expected

  • Those Overview labels should come from locale files instead of staying hardcoded in English.

Actual

  • The Overview screen now uses locale-backed strings for those labels.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Validation:

pnpm --dir ui build
pnpm test ui/src/i18n/test/translate.test.ts -- --project ui

Human Verification (required)

  • Verified scenarios:
    • reviewed the Overview diff to ensure only hardcoded labels were moved to locale keys
    • confirmed local build passes
    • confirmed targeted UI translation test passes
  • Edge cases checked:
    • preserved existing docs URLs and behavior
    • preserved token/password visibility behavior while localizing only labels
  • What you did not verify:
    • full browser walkthrough of every locale on the Overview screen

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps:

Risks and Mitigations

  • Risk: other screens may still contain hardcoded strings.
    • Mitigation: this PR intentionally scopes the cleanup to the Overview screen only.

@greptile-apps

greptile-apps Bot commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR moves hardcoded English labels from the Overview screen into locale keys and wires overview.ts to use t(...) — a clean, well-scoped i18n fix.

  • The auth failed branch (authHintKind === \"failed\") at lines 143–146 in ui/src/ui/views/overview.ts still renders hardcoded English strings for the docs link title and visible text, even though the corresponding overview.connection.authDocsTitle / authDocsLink keys were added to both locale files in this same PR and are correctly used in the nearby \"required\" branch.

Confidence Score: 4/5

Safe to merge after fixing the one missed hardcoded string in the auth-failed branch.

One P1 finding: the auth-failed docs link title and text remain hardcoded in English despite the matching locale keys being added in this PR and correctly used in the parallel auth-required branch, directly contradicting the PR's stated goal.

ui/src/ui/views/overview.ts — auth-failed branch (lines 143–146)

Comments Outside Diff (1)

  1. ui/src/ui/views/overview.ts, line 143-146 (link)

    P1 Hardcoded strings survive in the auth-failed branch

    The authHintKind === "failed" branch still renders hardcoded English for the docs link title and visible text, so non-English locales (including the pt-BR locale this PR targets) will always see English here. The keys overview.connection.authDocsTitle and overview.connection.authDocsLink were added to both locale files in this PR and are already used correctly in the "required" branch at lines 128–129.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: ui/src/ui/views/overview.ts
    Line: 143-146
    
    Comment:
    **Hardcoded strings survive in the auth-failed branch**
    
    The `authHintKind === "failed"` branch still renders hardcoded English for the docs link `title` and visible text, so non-English locales (including the pt-BR locale this PR targets) will always see English here. The keys `overview.connection.authDocsTitle` and `overview.connection.authDocsLink` were added to both locale files in this PR and are already used correctly in the `"required"` branch at lines 128–129.
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: ui/src/ui/views/overview.ts
Line: 143-146

Comment:
**Hardcoded strings survive in the auth-failed branch**

The `authHintKind === "failed"` branch still renders hardcoded English for the docs link `title` and visible text, so non-English locales (including the pt-BR locale this PR targets) will always see English here. The keys `overview.connection.authDocsTitle` and `overview.connection.authDocsLink` were added to both locale files in this PR and are already used correctly in the `"required"` branch at lines 128–129.

```suggestion
            title=${t("overview.connection.authDocsTitle")}
            >${t("overview.connection.authDocsLink")}</a
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "UI: localize Overview hardcoded labels" | Re-trigger Greptile

@rubensfox20

Copy link
Copy Markdown
Contributor Author

Good catch — fixed the remaining hardcoded auth-failed docs link in ui/src/ui/views/overview.ts to use the same locale keys as the required-auth branch. Revalidated with:\n\n- pnpm --dir ui build ✅\n- pnpm test ui/src/i18n/test/translate.test.ts -- --project ui

@sallyom
sallyom force-pushed the fix/overview-i18n-hardcoded-links branch from cc03a43 to c75904a Compare April 20, 2026 04:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c75904ade4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ui/src/i18n/locales/en.ts
Comment on lines +201 to +205
showToken: "Show token",
hideToken: "Hide token",
toggleTokenVisibility: "Toggle token visibility",
showPassword: "Show password",
hidePassword: "Hide password",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Regenerate all locale outputs after adding new i18n keys

These new overview keys are only added in en.ts (and manually in pt-BR.ts), but the repo’s locale pipeline expects every shipped locale plus .i18n metadata to stay in sync with English (scripts/control-ui-i18n.ts, enforced in .github/workflows/ci.yml via pnpm ui:i18n:check). As committed, locales like de/es/fr/... are missing these keys, so the i18n drift check will fail and non-pt locales will fall back to English for the new Overview labels.

Useful? React with 👍 / 👎.

@sallyom
sallyom force-pushed the fix/overview-i18n-hardcoded-links branch from 64d01e5 to c75904a Compare April 20, 2026 05:50
@sallyom sallyom changed the title UI: localize Overview hardcoded labels UI: localize Overview and login gate labels Apr 20, 2026
@sallyom

sallyom commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Combined #61062 into this PR because the i18n sync is shared.

@sallyom
sallyom merged commit 54d7728 into openclaw:main Apr 20, 2026
50 of 51 checks passed
@sallyom

sallyom commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

Thanks @rubensfox20!

lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
globalcaos pushed a commit to globalcaos/tinkerclaw that referenced this pull request May 13, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Merged via squash.

Prepared head SHA: 807c79c
Co-authored-by: rubensfox20 <[email protected]>
Co-authored-by: sallyom <[email protected]>
Reviewed-by: @sallyom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants