Skip to content

fix: complete dashboard i18n coverage#6271

Merged
houko merged 8 commits into
librefang:mainfrom
pavver:feat/web-i18n-coverage
Jun 23, 2026
Merged

fix: complete dashboard i18n coverage#6271
houko merged 8 commits into
librefang:mainfrom
pavver:feat/web-i18n-coverage

Conversation

@pavver

@pavver pavver commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR improves dashboard localization coverage for English, Ukrainian, and Chinese.

It adds CI-friendly checks that verify dashboard i18n key coverage, locale parity, CLDR plural forms, dead locale keys, conflicting fallback strings, and unaudited user-facing hardcoded literals. The hardcoded-text coverage now catches rendered JSX expression strings and user-facing object fields/variables, while filtering technical strings such as CSS classes, imports, storage keys, console messages, and keyboard shortcuts.

The PR also routes the hardcoded strings found by those checks through i18n and adds the corresponding translations to en.json, uk.json, and zh.json.

Substantive Changes

  • Added broader dashboard i18n coverage in en-locale-coverage.test.ts.
  • Added detection for unaudited user-facing string literals rendered through JSX expressions.
  • Added detection for user-facing object properties and variables such as labels, hints, descriptions, titles, messages, placeholders, and tooltips.
  • Kept technical strings out of the hardcoded-text audit with narrow filters for styling, imports, storage keys, console logging, technical IDs, and keyboard shortcuts.
  • Localized additional dashboard UI strings found by the expanded audit:
    • scheduler trigger presets
    • shared pill status labels
    • provider tier labels
    • MCP taint policy actions
    • workflow detected parameter descriptions
    • pending operator review banner text
    • generated workflow image alt text
    • agent status aria labels
    • analytics chart/table fallback labels
    • channel QR login status text
  • Added the new keys to English, Ukrainian, and Chinese locales.
  • Added CLDR-compatible plural forms for the pending operator review strings.
  • Updated affected tests to match the localized behavior.

Verification

  • npm test
    • 85 test files passed
    • 838 tests passed
  • npm run typecheck
    • passed
  • vitest run src/lib/__tests__/locale-parity.test.ts src/lib/__tests__/en-locale-coverage.test.ts
    • 2 test files passed
    • 10 tests passed
  • npm run lint
    • exited successfully
    • existing warnings remain, no errors

Out Of Scope

  • This does not claim perfect translation quality review for Chinese or Ukrainian.
  • This does not fully audit server/API error strings that may be surfaced by the frontend at runtime.
  • This does not localize generated markdown/export text unless it is clearly rendered through dashboard UI paths covered by the tests.

@github-actions github-actions Bot added size/XL 1000+ lines changed no-rust-required This task does not require Rust knowledge labels Jun 22, 2026
@pavver pavver changed the title Feat/web i18n coverage fix: complete dashboard i18n coverage Jun 22, 2026
@houko
houko merged commit 8623160 into librefang:main Jun 23, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/XL 1000+ lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants