Repository navigation
Conversation
Add Catalan language support following the existing i18n pattern: - Add "ca" to the Locale type union - Register ca in the lazy locale registry - Add ca entry to control-ui-i18n-config.json - Create ca.ts virtual locale export - Create glossary.ca.json with 20 key terms following Softcatalà style guide (e.g. Gateway → Passarel·la, Skills → Habilitats, Plugins → Connectors) - Initialize ca.meta.json and ca.tm.jsonl for translation memory The 6,356 translation keys will be generated via scripts/control-ui-i18n.ts using the glossary as terminology guidance. Softcatalà style guide: https://www.softcatala.org/guia-estil-de-softcatala/tota-la-guia/
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 3:30 AM ET / 07:30 UTC (Revision 28). ClawSweeper reviewWhat this changesAdds Catalan to Control UI language selection and browser-language detection, supplies translation terminology, and supports English bootstrap copy until generated translations arrive. Merge readiness✅ Ready for maintainer review Keep open: Catalan remains absent from current main, the previously reported test and documentation blockers are fixed, and the supplied runtime proof covers the source-only locale flow. No actionable patch defect remains. Priority: P2 Review scores
Verification
How this fits togetherControl UI localization turns browser-language preferences or an operator’s language selection into lazily loaded interface text. The locale refresh workflow generates translations from the English catalog and language glossaries after source changes merge. flowchart TD
A[Browser language or picker selection] --> B[Supported locale registry]
B --> C[Lazy locale loader]
D[English catalog and Catalan glossary] --> E[Post-merge translation refresh]
E --> F[Generated translation memory]
F --> C
C --> G[Interface text and document language]
D --> C
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +87, Tests +14, Docs +1, Other +2. Total +104 across 11 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Use the existing locale pipeline for Catalan, with generated translations delivered by its isolated post-merge refresh and strict release validation. Do we have a high-confidence way to reproduce the issue? Not applicable to a feature addition; current-main source establishes that Catalan is missing, and captured browser evidence demonstrates the added selection and detection paths. Is this the best way to solve the issue? Yes: the branch extends the existing localization owners and follows the established source-only contribution contract; the earlier assertion blocker has been repaired without weakening checks for memory-backed locales. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b512d67d0608. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (27 earlier review cycles; latest 8 shown)
|
- Remove ca.meta.json and ca.tm.jsonl placeholders (P1): Empty translation memory throws at runtime. Absent memory correctly bootstraps English until post-merge generation. - Add Catalan display name to English catalog (P2): Add 'ca: "Català (Catalan)"' to languages block in en.ts so the language picker renders the proper name. - Update registry test for 22 supported locales (P2): Add ca-ES and ca browser language cases. Add ca to catalog materialization check. Update SUPPORTED_LOCALES length from 21 to 22.
Replace hardcoded 20 with SUPPORTED_LOCALES.length - 1 in locale-offline-retry e2e test so it stays correct when new locales are added.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…k invariants The shipped-locale invariants in translate.test.ts started deriving their locale sweep from SUPPORTED_LOCALES (openclaw#159292), which accidentally broke the source-only locale flow from openclaw#131015: a locale registered before the post-merge control-ui-locale-refresh workflow commits its translation memory intentionally bootstraps from English copy, so the three "localized in shipped locale bundles" tests fail for it. Hold only locales with committed <locale>.tm.jsonl memory to those invariants. The exemption derives from the memory file's presence, so it retires itself once the refresh workflow lands translations and cannot hide a regression for any memory-backed locale. Unblocks the Catalan locale PR (openclaw#139033).
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Same change as openclaw#163442 (same author); drops out on rebase if openclaw#163442 merges first. Source-only locales bootstrap from English until the post-merge locale refresh commits their translation memory, so the English-inequality invariants cannot hold for them yet.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|



What Problem This Solves
Catalan-speaking operators have no localized UI experience in the OpenClaw Control panel. This PR adds Catalan (ca) locale support following the existing i18n pattern used by 20 other locales.
Closes #139031
Why This Change Was Made
Catalan is spoken by ~10 million people. OpenClaw already supports 20 locales but lacks Catalan.
Summary of changes
scripts/lib/control-ui-i18n-config.json: register thecalocale entry (canonical locale data; the locale refresh workflow derives its translation targets from this)scripts/lib/control-ui-i18n-config.ts: add theca"Catalan" language label used by the i18n scripts (de992f0)ui/src/i18n/lib/registry.ts: registercain the lazy locale registry (theLocaletype derives from the registry)ui/src/i18n/locales/ca.ts: new lazy-module adapter (virtual:openclaw-control-ui-locale/ca)ui/src/i18n/locales/en.ts: add thelanguages.calabel ("Català (Catalan)") for the settings language pickerui/src/i18n/lib/registry.test.ts: coverca/ca-ESbrowser-language resolutionui/src/e2e/locale-offline-retry.e2e.test.ts: derive the expected locale count fromSUPPORTED_LOCALESinstead of a hardcoded 20ui/config/control-ui-locales.ts: skipaddWatchFilefor absent translation memory so the dev server can serve a memory-less localeui/src/i18n/test/translate.test.ts: scope the three localized-bundle invariants to locales with committed translation memory (memoryBackedLocales) — the same change as test(i18n): exempt source-only bootstrap locales from English-fallback invariants #163442 (same author; drops out on rebase if test(i18n): exempt source-only bootstrap locales from English-fallback invariants #163442 merges first). Source-only locales bootstrap from English until the post-merge refresh, so English-inequality assertions cannot hold for them yet (89e5935)ui/src/i18n/.i18n/glossary.ca.json: Catalan glossary with 20 key terms following the Softcatalà style guidedocs/web/control-ui/settings.md: add Catalan to the documented language-support list, noting the temporary English bootstrap and that Catalan docs translations do not exist yet (cbed9ea)Per the contributor flow in
ui/AGENTS.md, this source PR intentionally does not include generated translation memory or locale metadata: the serializedcontrol-ui-locale-refreshworkflow translates after merge and publishes the generated artifacts through an isolated automation PR. Until that refresh landsca.tm.jsonl, the runtime intentionally bootstraps Catalan from the English catalog (the source-only locale flow from #131015).Glossary
Key terminology decisions following Softcatalà:
User Impact
The Control UI offers Català in the settings language picker and resolves
ca/ca-ESbrowser languages to the Catalan locale. Until the post-merge locale refresh lands the generated translations, Catalan intentionally displays the English bootstrap copy; once the refresh merges its generated PR, the UI displays in Catalan. The documented language-support list (docs/web/control-ui/settings.md) now includes Catalan with this bootstrap note.CI status note
The three
translate.test.tsinvariants ("keeps … localized in shipped locale bundles") previously failed forcaon this branch because they swept every registered locale, including intentional English-bootstrap locales awaiting the post-merge refresh. This branch now incorporates the #163442 scoping (byte-identical change, same author): the invariants cover only locales with committed translation memory, so thechecks-uilane is expected green on this head. Sibling PR #166002 (Hebrew) carries the identical scoping with allchecks-uishards green in CI (run 37440413878). If #163442 merges first, the test-scoping commit drops out on rebase.The
checks-ui-e2ecomposer-recovery failure on a previous head was inherited from a stalemainmerge; the current head merges currentmain(which includes the chat-outbox-recovery fixes from #162428) and the previously failing test passes locally on this head.Evidence
pnpm ui:i18n:verifypasses on head89e5935feea(raw-copy baseline: 87 entries; source catalog: 10,380 keys).ui/src/i18n/.i18n/contains exactly 20*.tm.jsonlfiles (noca.tm.jsonl), somemoryBackedLocalesequals the 20 locales whose invariants pass onmaintoday — a verified no-op relative tomain, withcaexcluded until its memory lands.translate.test.tsscoping is byte-identical to test(i18n): exempt source-only bootstrap locales from English-fallback invariants #163442's diff (same blob hashes) and to the change in feat(i18n): add Hebrew (he) Control UI locale #166002, whose CI has allchecks-uishards green; this head's CI re-runs the lane.ui/src/e2e/composer-recovery-fences.e2e.test.ts— the check that failed on the previous stale head — passes locally on this head via the mock-Gateway harness.Real behavior proof
Captured on head
cbed9ea0793(the runtime-relevant head;de992f0f325and89e5935feeaonly add the scripts label, the test scoping, and docs) through the mock-Gateway Playwright E2E harness (startControlUiE2eServer({ source: true })+installMockGateway), navigating to/settings/appearanceand selecting Català in the language picker (#settings-language wa-select). All data is synthetic (mock Gateway); no private endpoints, credentials, or personal information are present.Terminal output (live run)
All six runtime checks passed:
Network evidence — the Catalan locale chunk loads lazily on selection
Exactly one request for the Catalan locale module, fired only after the operator selects Català, answered by the source dev server:
Console evidence — absent translation memory bootstraps cleanly
Catalan has no
ca.tm.jsonl, so it bootstraps from English. TheexistsSyncguard aroundaddWatchFile(ui/config/control-ui-locales.ts) prevents the Vite dev server from failing on the absent memory path. Captured browser console across both scenarios:Document language evidence
document.documentElement.langchangeden->ca; picker valueca.ca-ESbrowser context resolves to<html lang="ca">on first load.Full machine-readable capture: runtime-diagnostics.json · full terminal log: runtime-terminal-output.log
Screenshots
Before (English default):
After selecting Català (
<html lang>changed fromentoca):Català (Catalan) option in the dropdown:
ca-ESbrowser locale on first load:Earlier picker close-ups from the previous head (same flow): picker-before-en-full.png · picker-after-ca-full.png · picker-after-ca.png · picker-dropdown-ca.png · loader-diagnostics.json
Reproduce
The passing CI lane
checks-ui-e2erunsui/src/e2e/locale-offline-retry.e2e.test.ts, which opens/settings/appearance, selects every registered locale (includingca) via#settings-language wa-select, and assertsdocument.documentElement.langmatches. The runtime diagnostics above were captured through the same harness (startControlUiE2eServer({ source: true })+installMockGateway).Remaining follow-up
control-ui-locale-refreshworkflow generatesca.tm.jsonland the remaininglanguages.calabels for the other locales after merge; onceca.tm.jsonllands, the invariant exemption retires itself.