Files
openclaw/tsconfig.scripts.json
Hüseyin DurnaandAyaan Zaidi ea75d12e21 fix(ui): localize core configuration labels and help (#137192)
Closes #137190

## What Problem This Solves

Fixes an issue where users selecting a non-English Control UI language would still see core Settings labels and help in English when matching translations were available.

## Why This Change Was Made

The shared hint resolver now uses active-locale copy and retains current Gateway text when a translation is missing. The existing source catalog includes core hint labels and help under path-, field-, and source-specific keys. Catalog value operations stay separate from core imports so ordinary Vite configuration loading works. Development reloads use a fresh loader namespace and watch imported source files. Check and locale-refresh inputs cover the catalog owner and core metadata producers.

## User Impact

Available core translations reach Settings forms and search. Direct and wildcard lookup, non-copy metadata, and dynamic plugin text retain their existing behavior. No generated locale data or settings changes ship in this PR.

## Evidence

Verified with production-built Control UI and an isolated real Gateway: Turkish label/help and Settings search fail on pinned main, then pass on the candidate. English restoration, missing translations, dynamic Telegram metadata, and refresh controls pass. Matching build-only Turkish fixtures establish the conditional translation. A same-process Vite reload replaces the source key and drops stale translated copy after the English source changes.

Focused UI, browser, hint-resolution, catalog, sync-plan, and CI-scope tests pass. The corrected scope selector passes all 253 tests across six scope suites, including the existing negative control for unrelated configuration defaults. Keyless locale verification, targeted lint, and workflow checks pass. Independent browser acceptance exercised the user flows; source/catalog properties have separate evidence. The two Playwright-driving server suites now explicitly use Node: their prior jsdom setup failures were reproduced, then all 125 unchanged browser tests passed. An ordered follow-up reproduced fake timers leaking from an earlier tool-stream test into composer setup; producer-owned cleanup then passed the same four selected tests without changing assertions or timeouts.

The scripts typecheck now includes the existing virtual-locale declaration, which is needed by the shared form helper’s translation import. The prior hosted UI shard passed, including composer. Full compiler validation runs in CI.

## Compatibility

Existing translation-memory fields and the generated locale format stay unchanged. The new catalog-values module moves existing readers and materialization logic. New core entries use the same generated format; missing entries fall back to current Gateway text until the existing locale publisher fills them. The full Gateway schema and hint metadata match the baseline. No runtime-state migration is needed.

Thanks @husodrn46 for the original implementation and reproduction.

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-09-09 06:59:59 +05:30

25 lines
644 B
JSON

{
"extends": "./tsconfig.json",
"compilerOptions": {
// Lifecycle hooks and compatibility shims must stay executable by plain Node.
"allowJs": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"tsBuildInfoFile": ".artifacts/tsgo-cache/scripts.tsbuildinfo"
},
"include": [
"scripts/**/*",
"src/**/*.d.ts",
"packages/**/*.d.ts",
"ui/src/i18n/virtual-locale.d.ts"
],
"exclude": [
"node_modules",
"dist",
"**/dist/**",
// E2E clients import built dist artifacts and are validated by Docker runs,
// so they cannot join this source-only program.
"scripts/e2e/**"
]
}