Skip to content

i18n(cs): add Czech translations for the admin UI - #2258

Open
thefrana wants to merge 7 commits into
emdash-cms:mainfrom
thefrana:i18n/cs-czech-translations
Open

i18n(cs): add Czech translations for the admin UI#2258
thefrana wants to merge 7 commits into
emdash-cms:mainfrom
thefrana:i18n/cs-czech-translations

Conversation

@thefrana

Copy link
Copy Markdown

What does this PR do?

Adds Czech (cs, Čeština) to the EmDash admin UI and enables it in the language picker.

The catalog translates all 1,938 current admin messages, including Czech ICU plural forms (one, few, many, and other). The translations were reviewed for source context, terminology consistency, placeholder integrity, and natural Czech UI wording by a fluent Czech speaker.

AI was used for the first translation pass and subsequent review assistance. The PR author remains responsible for the final Czech wording.

No related issue.

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (not applicable: translation-only change)
  • User-visible strings in the admin UI are wrapped for translation (not applicable: no new source strings)
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: not applicable (translation PR)

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: OpenCode with GPT-5.6 Sol

Screenshots / test output

  • pnpm build — passed
  • pnpm typecheck — passed
  • pnpm lint — passed
  • pnpm --filter @emdash-cms/admin test -- --run tests/lib/locales.test.ts — 104 files and 1,243 tests passed, including catalog loading for every enabled locale
  • pnpm run locale:extract — Czech: 1,938 messages, 0 missing
  • pnpm run locale:compile — passed
  • Catalog-wide structural audit — all 1,938 translations preserve ICU variables, XML tags, and boundary whitespace
  • Runtime plural smoke test — verified Czech forms for counts 1, 3, and 8

The root pnpm test run reaches an unrelated registry-verification packaging check that invokes the native pnpm executable through Node on macOS and fails with SyntaxError: Invalid or unexpected token; all package tests before that point and the complete targeted admin suite pass.

thefrana added 5 commits July 28, 2026 10:49
Registers Czech in the canonical locale list with enabled: false and adds
the extracted catalog at packages/admin/src/locales/cs/messages.po.

The locale stays disabled in the admin UI until translation coverage is
sufficient, per docs/contributing/translating.
Translates all 1936 admin UI strings and enables the locale in the
language picker.

Plural forms use Czech's four ICU categories (one/few/many/other) rather
than the two the English source carries.
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 99c0bd2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/plugin-mcp-smoke Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-demo-site Patch
@emdash-cms/do-demo-site Patch
@emdash-cms/do-solo-demo-site Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 Patch
create-emdash Patch
@emdash-cms/auth-atproto Patch
@emdash-cms/plugin-embeds Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 8,867 lines across 3 files. Large PRs are harder to review and more likely to be closed without review.

If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs.

See CONTRIBUTING.md for contribution guidelines.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet cla: needed labels Jul 28, 2026
@thefrana

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 28, 2026

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a complete Czech (cs) admin UI translation and enables it in the language picker. The change is well-scoped and follows EmDash's localization conventions.

What I checked:

  • Approach: Adding a new locale via locales.ts + a new messages.po catalog is the idiomatic path for EmDash translations. No unrelated source changes.
  • Locale registration: packages/admin/src/locales/locales.ts adds cs with label: "Čeština", enabled: true, and no dir (defaults to LTR). It is placed correctly in alphabetical order by English name between Chinese (zh-TW) and Dutch (nl).
  • Catalog structure: The new packages/admin/src/locales/cs/messages.po contains 1,938 translated messages, no fuzzy flags, no gettext-style msgid_plural/msgstr[n] entries, and matches the English source's message set exactly.
  • Structural integrity: All ICU argument placeholders are preserved between source and translation, all XML/HTML tags match, every message has balanced braces, and every ICU plural expression includes the required other arm.
  • Tooling integration: lingui.config.ts, lunaria.config.ts, and loadMessages.ts all derive locale lists from locales.ts, so Czech is automatically included in extraction, compilation, Lunaria tracking, and runtime loading. Existing locale tests in tests/lib/locales.test.ts will exercise Czech catalog loading because they iterate SUPPORTED_LOCALES.
  • Changeset: .changeset/czech-locale-cs.md follows the established patch-level format for @emdash-cms/admin.
  • AGENTS.md conventions: No user-facing strings were added, no content-table queries were introduced, no source-code comments added, and the change stays within the i18n scope.

I cannot verify Czech wording quality or plural nuance, and I do not run tooling in this environment, but the technical implementation is clean. One note: the Plural-Forms header uses a simplified Czech formula rather than the full CLDR modulo rule used by some sibling Slavic locales. Because EmDash uses ICU plural messages resolved at runtime via Intl.PluralRules/Lingui, this header does not affect runtime behavior; it is conventional for gettext-style PO metadata.

No findings.

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Jul 28, 2026
@github-actions github-actions Bot added review/needs-rereview Author pushed changes since the last review and removed review/approved Approved; no new commits since labels Jul 28, 2026
@KingDoxik

Copy link
Copy Markdown

Would love to see this merged!

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@2258

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@2258

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/@emdash-cms/auth-atproto@2258

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@2258

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@2258

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/contentful-to-portable-text@2258

emdash

npm i https://pkg.pr.new/emdash@2258

create-emdash

npm i https://pkg.pr.new/create-emdash@2258

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@2258

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/@emdash-cms/plugin-cli@2258

@emdash-cms/plugin-types

npm i https://pkg.pr.new/@emdash-cms/plugin-types@2258

@emdash-cms/registry-client

npm i https://pkg.pr.new/@emdash-cms/registry-client@2258

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/@emdash-cms/registry-lexicons@2258

@emdash-cms/registry-verification

npm i https://pkg.pr.new/@emdash-cms/registry-verification@2258

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/@emdash-cms/sandbox-workerd@2258

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@2258

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@2258

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@2258

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@2258

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@2258

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@2258

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/@emdash-cms/plugin-field-kit@2258

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@2258

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@2258

commit: c1862f3

@thefrana

thefrana commented Jul 31, 2026

Copy link
Copy Markdown
Author

@KingDoxik thanks! BTW, I think I know you from X because you are using Effect just like us (and apparently also EmDash) 😀 let me know when you need a job

Also, hi from Prague

@thefrana

Copy link
Copy Markdown
Author

Updated against main. The earlier CI failure was an unrelated flake in SaveButton.test.tsx (150ms transition timer vs a 200ms fixed wait in the test) — it passes on the current head. The runs on 99c0bd21 are sitting at action_required; could someone approve them? Happy to rebase if anything else is needed.

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

Labels

area/admin cla: signed review/needs-rereview Author pushed changes since the last review size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants