Skip to content

feat(i18n): add Catalan (ca) locale support for Control UI - #139033

Closed
jcorrius wants to merge 26 commits into
openclaw:mainfrom
jcorrius:feat/i18n-catalan
Closed

jcorrius wants to merge 26 commits into
openclaw:mainfrom
jcorrius:feat/i18n-catalan

Conversation

@jcorrius

@jcorrius jcorrius commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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 the ca locale entry (canonical locale data; the locale refresh workflow derives its translation targets from this)
  • scripts/lib/control-ui-i18n-config.ts: add the ca "Catalan" language label used by the i18n scripts (de992f0)
  • ui/src/i18n/lib/registry.ts: register ca in the lazy locale registry (the Locale type 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 the languages.ca label ("Català (Catalan)") for the settings language picker
  • ui/src/i18n/lib/registry.test.ts: cover ca/ca-ES browser-language resolution
  • ui/src/e2e/locale-offline-retry.e2e.test.ts: derive the expected locale count from SUPPORTED_LOCALES instead of a hardcoded 20
  • ui/config/control-ui-locales.ts: skip addWatchFile for absent translation memory so the dev server can serve a memory-less locale
  • ui/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 guide
  • docs/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 serialized control-ui-locale-refresh workflow translates after merge and publishes the generated artifacts through an isolated automation PR. Until that refresh lands ca.tm.jsonl, the runtime intentionally bootstraps Catalan from the English catalog (the source-only locale flow from #131015).

Glossary

Key terminology decisions following Softcatalà:

English Catalan
Gateway Passarel·la
Skills Habilitats
Plugins Connectors
Settings Configuració
Workspace Espai de treball
Automations Automatitzacions
Tasks Tasques
Channels Canals
Memory Memòria

User Impact

The Control UI offers Català in the settings language picker and resolves ca/ca-ES browser 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.ts invariants ("keeps … localized in shipped locale bundles") previously failed for ca on 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 the checks-ui lane is expected green on this head. Sibling PR #166002 (Hebrew) carries the identical scoping with all checks-ui shards green in CI (run 37440413878). If #163442 merges first, the test-scoping commit drops out on rebase.

The checks-ui-e2e composer-recovery failure on a previous head was inherited from a stale main merge; the current head merges current main (which includes the chat-outbox-recovery fixes from #162428) and the previously failing test passes locally on this head.

Evidence

  • pnpm ui:i18n:verify passes on head 89e5935feea (raw-copy baseline: 87 entries; source catalog: 10,380 keys).
  • Memory layout driving the scoping: ui/src/i18n/.i18n/ contains exactly 20 *.tm.jsonl files (no ca.tm.jsonl), so memoryBackedLocales equals the 20 locales whose invariants pass on main today — a verified no-op relative to main, with ca excluded until its memory lands.
  • The translate.test.ts scoping 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 all checks-ui shards green; this head's CI re-runs the lane.
  • Local vitest runs do not complete on this Windows environment (the run-vitest wrapper stalls before any output, twice, including with a 600s no-output budget — a previously documented local limitation), so lane-level proof is deferred to this head's CI run.
  • 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.
  • Runtime proof (console, network, terminal, document language): see "Real behavior proof" below.

Real behavior proof

Captured on head cbed9ea0793 (the runtime-relevant head; de992f0f325 and 89e5935feea only add the scripts label, the test scoping, and docs) through the mock-Gateway Playwright E2E harness (startControlUiE2eServer({ source: true }) + installMockGateway), navigating to /settings/appearance and 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)

[proof] source dev server: http://127.0.0.1:59101/
[proof] diagnostics written to .proof-ca-139033
[proof] PASSED: all checks green

All six runtime checks passed:

documentLangSwitchedToCa:   true  (<html lang> switched en -> ca after selecting Català)
catalanModuleRequestedOnce: true  (exactly one lazy locale-chunk request)
catalanModuleStatusOk:      true  (HTTP 200)
noConsoleErrors:            true  (0 console errors across both scenarios)
noPageErrors:               true  (uncaught page errors: [])
navigatorCaEsResolvesToCa:  true  (ca-ES browser locale -> <html lang="ca"> on first load)

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:

GET http://127.0.0.1:59101/src/i18n/locales/ca.ts -> 200

Console evidence — absent translation memory bootstraps cleanly

Catalan has no ca.tm.jsonl, so it bootstraps from English. The existsSync guard around addWatchFile (ui/config/control-ui-locales.ts) prevents the Vite dev server from failing on the absent memory path. Captured browser console across both scenarios:

console errors: 0
page errors:    []
entries:        [vite] connecting... / [vite] connected. / Lit dev-mode notice /
               Lit update-scheduling notices (warnings only, no errors)

Document language evidence

  • Picker selection: document.documentElement.lang changed en -> ca; picker value ca.
  • Browser language: a ca-ES browser 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):

runtime-before-en

After selecting Català (<html lang> changed from en to ca):

runtime-after-ca

Català (Catalan) option in the dropdown:

runtime-dropdown-ca

ca-ES browser locale on first load:

runtime-browser-ca-ES

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-e2e runs ui/src/e2e/locale-offline-retry.e2e.test.ts, which opens /settings/appearance, selects every registered locale (including ca) via #settings-language wa-select, and asserts document.documentElement.lang matches. The runtime diagnostics above were captured through the same harness (startControlUiE2eServer({ source: true }) + installMockGateway).

Remaining follow-up

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/
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: S labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 3:30 AM ET / 07:30 UTC (Revision 28).

ClawSweeper review

What this changes

Adds 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
Reviewed head: 89e5935feea914dc86e457f93531ff8184c423af

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with convincing browser proof and resolved prior findings; exact-head CI remains ordinary landing validation.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Captured browser diagnostics exercise the production locale registry and Vite loader through Settings → Appearance: Català selection loads its module once with HTTP 200, applies lang=ca, and ca-ES resolves correctly without console or page errors. Prepared before/after images were inspected, and subsequent commits preserve the runtime path. Existing preference storage format and write behavior remain unchanged.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Captured browser diagnostics exercise the production locale registry and Vite loader through Settings → Appearance: Català selection loads its module once with HTTP 200, applies lang=ca, and ca-ES resolves correctly without console or page errors. Prepared before/after images were inspected, and subsequent commits preserve the runtime path. Existing preference storage format and write behavior remain unchanged.
Evidence reviewed 8 items Pinned introduced change: Inspected the complete merge-base-to-head diff. The branch adds Catalan wiring, glossary and documentation, guards absent translation-memory watching, and adjusts existing locale tests; no dependency, permission, publishing, or authentication changes are introduced.
Prior finding resolved: Compared the previously reviewed head with this head. The three English-inequality assertions now use memoryBackedLocales; every registered locale still loads before filtering, and generated memory automatically restores localization assertions. The earlier documentation finding is also resolved.
Established source-only contribution contract: The fully read UI policy assigns translation memory to the post-merge refresh. The already-merged #131015 establishes intentional English bootstrap while memory is absent. The loader retains fatal validation for existing empty or malformed memory, and the refresh matrix derives from canonical locale configuration.
Findings None None.
Security None None.

How this fits together

Control 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
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +87, Tests +14, Docs +1, Other +2. Total +104 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 88 1 +87
Tests 3 18 4 +14
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 1 +2
Total 11 112 8 +104

Review metrics

Metric Value Why it matters
Language selection 1 locale added; 0 new configuration knobs Catalan uses the existing language preference and lazy translation pipeline.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #139031
Summary: This PR implements the paired Catalan request; the standalone assertion repair overlaps only part of its change.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Captured browser diagnostics exercise the production locale registry and Vite loader through Settings → Appearance: Català selection loads its module once with HTTP 200, applies lang=ca, and ca-ES resolves correctly without console or page errors. Prepared before/after images were inspected, and subsequent commits preserve the runtime path. Existing preference storage format and write behavior remain unchanged.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Adds a bounded language option through the established Control UI localization flow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Captured browser diagnostics exercise the production locale registry and Vite loader through Settings → Appearance: Català selection loads its module once with HTTP 200, applies lang=ca, and ca-ES resolves correctly without console or page errors. Prepared before/after images were inspected, and subsequent commits preserve the runtime path. Existing preference storage format and write behavior remain unchanged.
  • proof: sufficient: Contributor real behavior proof is sufficient. Captured browser diagnostics exercise the production locale registry and Vite loader through Settings → Appearance: Català selection loads its module once with HTTP 200, applies lang=ca, and ca-ES resolves correctly without console or page errors. Prepared before/after images were inspected, and subsequent commits preserve the runtime path. Existing preference storage format and write behavior remain unchanged.

Evidence

What I checked:

  • Pinned introduced change: Inspected the complete merge-base-to-head diff. The branch adds Catalan wiring, glossary and documentation, guards absent translation-memory watching, and adjusts existing locale tests; no dependency, permission, publishing, or authentication changes are introduced. (89e5935feea9)
  • Prior finding resolved: Compared the previously reviewed head with this head. The three English-inequality assertions now use memoryBackedLocales; every registered locale still loads before filtering, and generated memory automatically restores localization assertions. The earlier documentation finding is also resolved. (ui/src/i18n/test/translate.test.ts:26, 89e5935feea9)
  • Established source-only contribution contract: The fully read UI policy assigns translation memory to the post-merge refresh. The already-merged fix(ui): bootstrap source-only locales #131015 establishes intentional English bootstrap while memory is absent. The loader retains fatal validation for existing empty or malformed memory, and the refresh matrix derives from canonical locale configuration. (ui/AGENTS.md:105, 89e5935feea9)
  • Still necessary on current main: Current main’s registry has no Catalan entry. The existing picker consumes that registry, so this branch supplies a distinct missing language rather than a parallel localization mechanism. (ui/src/i18n/lib/registry.ts:7, b512d67d0608)
  • Latest release check: The registry retrieved from v2026.9.8 also lacks Catalan. Local retrieval of that release blob failed with HTTP 403; the read-only GitHub contents endpoint supplied the source successfully. (ui/src/i18n/lib/registry.ts:7, fc23bc864e45)
  • Captured browser behavior and inspected visual proof: The supplied PR-body snapshot records a real Vite browser run through the repository’s mock-Gateway harness: selecting Català changes document language to ca, exactly one Catalan module request returns HTTP 200, ca-ES resolves to ca on first load, and console/page errors are absent. Inspected all four prepared images, including English-before, Català-after, and the dropdown. The comparison with the capture head shows only a scripts language label and test changes afterward. Raw linked diagnostic downloads were blocked at release-assets.githubusercontent.com; this reviewer limitation does not invalidate the captured diagnostic output. (ui/config/control-ui-locales.ts:146, cbed9ea0793e)

Likely related people:

  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (27 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T10:21:29.950Z sha a90bc28 :: needs changes before merge. :: none
  • reviewed 2026-09-29T06:53:19.223Z sha c5aeaa1 :: needs changes before merge. :: [P2] Exclude pending source-only locales from translated-bundle assertions | [P3] Document Catalan in the Control UI language list
  • reviewed 2026-09-29T07:14:33.885Z sha e65dadc :: needs changes before merge. :: [P2] Limit translated-bundle assertions to generated locales | [P3] Update the documented Control UI language list
  • reviewed 2026-10-02T10:24:32.085Z sha b302df5 :: needs changes before merge. :: [P2] Limit translated-bundle assertions to memory-backed locales | [P3] Add Catalan to the documented Control UI language list
  • reviewed 2026-10-02T11:04:09.882Z sha db7351f :: needs changes before merge. :: [P2] Limit translated-bundle assertions to memory-backed locales | [P3] Add Catalan to the documented Control UI language list
  • reviewed 2026-10-05T07:55:19.272Z sha 231cf32 :: needs changes before merge. :: [P2] Limit translated-bundle assertions to memory-backed locales | [P3] Add Catalan to the documented Control UI language list
  • reviewed 2026-10-06T07:15:09.536Z sha 4c49023 :: needs real behavior proof before merge. :: [P2] Limit translated-bundle assertions to memory-backed locales | [P3] Add Catalan to the documented Control UI language list
  • reviewed 2026-10-07T06:58:31.495Z sha cbed9ea :: needs changes before merge. :: [P2] Limit translated-bundle assertions to memory-backed locales

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 5, 2026
- 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.
@jcorrius

jcorrius commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Behavior proof (detailed)

Setup

  • Branch: feat/i18n-catalan at 80e3d1d3 (merged with main)
  • Dev server: cd ui && pnpm run dev → http://localhost:5173
  • Test tool: Playwright (chromium headless)
  • Viewport: 1280×900

Test 1: URL parameter ?lang=ca

Input: Navigate to http://localhost:5173/?lang=ca

Check Result Status
HTML lang attribute <html lang="ca"> ✅
Page renders Login screen visible ✅
English bootstrap "Gateway", "OpenClaw" text visible ✅
Catalan translations Not visible (expected — no ca.tm.jsonl) ✅
No console errors Clean ✅

Test 2: Browser locale ca-ES

Input: Playwright context with locale: 'ca-ES', navigate to http://localhost:5173/

Check Result Status
HTML lang attribute <html lang="ca"> ✅
Catalan detected from browser Yes ✅

Test 3: Default (no locale)

Input: Navigate to http://localhost:5173/ (no ?lang param)

Check Result Status
HTML lang attribute <html lang="ca"> ✅ (browser default was ca-ES from test 2)

Why English text is expected

The ca.tm.jsonl translation memory is intentionally absent (per P1 finding). The locale loader bootstraps from the English catalog when translation memory is missing — this is the designed behavior. Translations are generated post-merge via:

node --import tsx scripts/control-ui-i18n.ts translate --locale ca

Screenshots

Three screenshots captured at 1280×900:

  1. proof-ca-locale.png — ?lang=ca showing login screen with <html lang="ca">
proof-ca-locale
  1. proof-en-locale.png — default locale
proof-en-locale
  1. proof-browser-ca.png — browser locale ca-ES
proof-browser-ca

Verification

# Reproduce locally
cd ui && pnpm run dev
# Open http://localhost:5173/?lang=ca in browser
# Check: document.documentElement.lang === "ca"
# Check: page renders without errors
# Check: text is English (bootstrap from en.ts, no ca translations yet)

Confirmed behaviors

  • ✅ Registry-to-picker path: ca locale registered in registry.ts, detected by resolveNavigatorLocale()
  • ✅ Catalan browser detection: ca-ES browser locale → <html lang="ca">
  • ✅ URL parameter detection: ?lang=ca → <html lang="ca">
  • ✅ English bootstrap: absent ca.tm.jsonl → English fallback, no crash, no empty-memory error
  • ✅ Display name: ca: "Català (Catalan)" added to en.ts languages block

@jcorrius

jcorrius commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 5, 2026
@jcorrius

jcorrius commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 5, 2026
jcorrius added a commit to jcorrius/openclaw that referenced this pull request Oct 2, 2026
…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).
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Oct 2, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Oct 5, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 6, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 7, 2026
@jcorrius

jcorrius commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Oct 7, 2026
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.
@jcorrius

jcorrius commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 7, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Thanks @jcorrius! The Catalan registration and glossary landed in #189708, with your co-author credit and the wiring updated for current main. Generated translations will follow the existing locale-refresh pipeline; closing this in favor of the merged replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Catalan (ca) language support to Control UI

2 participants