Skip to content

Add Czech interface translations - #580

Open
ta-dd wants to merge 2 commits into
ompweb-dev:mainfrom
ta-dd:add-czech-interface
Open

ta-dd wants to merge 2 commits into
ompweb-dev:mainfrom
ta-dd:add-czech-interface

Conversation

@ta-dd

@ta-dd ta-dd commented Nov 27, 2026 •

Copy link
Copy Markdown

Add Čeština to the language picker and select it automatically for Czech browsers. The translation covers all 2,076 English strings on the target revision, including notifications, and adds 23 Czech plural forms for counts 2–4. An explicit language choice still takes precedence over browser detection.

Verification: all 8 localization tests passed, the production web client built successfully, and catalog keys and interpolation placeholders were checked against English. The full upstream test suite was not run.

Summary by CodeRabbit

  • New Features
    • Added Czech as a supported language, with translations across the app’s interface.
    • The app now selects Czech when it’s saved as the preferred language or detected from the browser.
    • Notifications are now available in Czech.
  • Improvements
    • Czech plural wording now follows Czech counting rules, including distinct wording for counts of 2–4.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change adds Czech translations and supports Czech in locale detection, plural selection, and notification dictionaries. It also updates the i18n contribution convention and tests.

Changes: Czech locale support

Layer / File(s) Summary
Czech translation data and plural selection
lib/i18n/index.tsx, lib/i18n/locales/cs.json, CONTRIBUTING.md
Adds Czech to the locale type, list, and dictionary registry. Adds Czech translations and selects .few for integer counts from 2 through 4. The contribution convention now lists five dictionaries.
Language selection and notification integration
app/index.html, lib/i18n/index.tsx, lib/notification-hub.ts, lib/i18n.test.mjs
The boot script and locale resolver accept Czech from saved and browser locales. The notification dictionary map and locale tests include Czech.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Storage as localStorage
  participant IndexHtml as app/index.html
  participant Navigator
  participant Document
  IndexHtml->>Storage: Read saved locale
  alt Saved locale is cs
    Storage-->>IndexHtml: cs
    IndexHtml->>Document: Set language to cs
  else Saved locale is not cs
    IndexHtml->>Navigator: Read browser language
    Navigator-->>IndexHtml: cs or cs-* locale
    IndexHtml->>Document: Set language to cs
  end
Loading

Suggested reviewers: gtanger, kahme247

Merge Risk: Minimal · up to 68d64

This adds Czech as a selectable interface language and selects it automatically for Czech browsers, while an explicit language choice still takes precedence. No merge-blocking risk was found, and reverting the change is straightforward.

Security architecture risk: Minimal · up to db9b4

Czech becomes an additional display language. Explicit language choices still take precedence over browser detection, and the change does not alter who receives notifications or what users can access.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new behavior reaches browser language metadata, localized interface strings, and text in push payloads sent to already-selected subscriptions. The inspected paths do not show a new recipient, credential, or access-control path.

Trust Boundaries and Controls

  • observed — The browser resolver maps browser-supplied tags to fixed locale values and checks saved values against a fixed list. The notification hub checks for an own dictionary key before selecting a catalog. Neither lookup uses a locale string as a resource path.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add Czech interface translations" matches the main change in the changeset. The PR adds a Czech (cs) locale: a full cs.json translation file, the Locale type and dictionary updates in lib/i…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add Czech interface translations" matches the main change in the changeset. The PR adds a Czech (cs) locale: a full cs.json translation file, the Locale type and dictionary updates in lib/i18n/index.tsx, browser-language detection for cs and cs-* in app/index.html, and test coverage. The title is short, specific, and does not describe anything absent from the changeset.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c11dc67f-8556-445e-8ab4-4934c7c2eeea
Commits

Reviewing files that changed from the base of the PR and between db9b4d3 and 68d64eb.

Files selected for processing: 1

  • lib/i18n/index.tsx
Files skipped from review as they are similar to previous changes: 1

  • lib/i18n/index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant