Skip to content

i18n(da): add Danish translations - #3492

Merged
ascorbic merged 1 commit into
emdash-cms:mainfrom
kgni:i18n/da
Sep 26, 2026
Merged

ascorbic merged 1 commit into
emdash-cms:mainfrom
kgni:i18n/da

Conversation

@kgni

@kgni kgni commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds Danish (da, "Dansk") translations for the admin UI and makes the locale selectable in the language picker.

  • packages/admin/src/locales/locales.ts: adds { code: "da", label: "Dansk", enabled: true }.
  • packages/admin/src/locales/da/messages.po: 3012 of 3040 strings translated. The 28 empty strings fall back to English on purpose, because I couldn't settle on the right Danish term (for example "records" in the site package import and export flow).
  • .changeset/danish-admin-locale.md: patch changeset for @emdash-cms/admin.

Terminology

  • Follows the Danish WordPress translation where it fits: indlæg, websted, kontrolpanel, udgiv / fjern udgivelse, papirkurv.
  • Common terms stay in English: plugin, slug, byline, passkey, media.

I, a native Danish speaker, have reviewed every string and previewed the translations in the running admin, side by side with English. However, since this is a lot of text to read through, some mistakes might have slipped through..

Outside this PR (not in the admin catalog):

  • packages/admin/src/locales/day-picker.ts has no da entry, so the date picker calendar stays English.
  • Relative times ("just now", "1 hour ago") are hardcoded in packages/admin/src/lib/utils.ts:40-43.
  • The audit-log plugin's "Recent Activity" widget and "Audit History" page are hardcoded English in packages/plugins/audit-log.
  • The content list date column shows 9/26/2026, while the editor shows 26. sep. 2026.

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). The admin tests had 2711 passing and 1 failing. The failing test, tests/published-at-rev.test.tsx "recovers the newer token when the date write conflicts", also fails on main without this change. fix(admin): allow publication-date retry after a conflict #3491 seems to be fixing this.
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable). Not applicable: translation only.
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Not applicable: no source changes. The messages.po change is the translation itself.
  • I have added and reviewed the user-facing changeset (if this PR changes a published package)
  • New features link to an approved Discussion. Not applicable: translation.
  • I have included screenshots below if this PR changes the UI

AI-generated code disclosure

  • This PR includes AI-generated code. Model/tool: Claude Opus 5.5 (Claude Code) made the first-pass translation. I then reviewed and edited every string and previewed it in the running admin.

Screenshots / test output

Menu, collection and taxonomy names (Primary Navigation, Pages, Posts, Categories) come from the demo seed data, not the admin catalog.

1. Login Login page in Danish with the Log ind med Passkey button and Log ind via e-mail link
2. Dashboard (Kontrolpanel) Dashboard in Danish with Kladder, Mediefiler and Brugere cards and the Danish sidebar
3. Posts list Posts list in Danish with Kladde, Afventende ændringer and Udgivet status badges
4. Post editor with the full side panel Post editor in Danish with the Udgiv, URL og sprog, Bylines, Taksonomier and SEO panels
5. Media library (Mediebibliotek) Mediebibliotek in Danish with Tilføj ny mappe and Upload filer buttons
6. Menu editor Menu editor in Danish with Tilføj indhold and Tilføj brugerdefineret link buttons
7. Settings (Indstillinger) Settings page in Danish with the Sprog selector set to Dansk

@changeset-bot

changeset-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5a0503

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

This PR includes changesets to release 12 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/plugin-test Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/auth Patch
@emdash-cms/blocks Patch
create-emdash Patch
@emdash-cms/gutenberg-to-portable-text Patch
@emdash-cms/x402 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

@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 is the right change for what it sets out to do: add Danish as a fully selectable admin UI language. There are no source-code changes, no logic changes, and no API or database implications, so the surface area is intentionally small.

What I checked:

  • Read the unified diff (packages/admin/src/locales/locales.ts, the new packages/admin/src/locales/da/messages.po, and .changeset/danish-admin-locale.md).
  • Confirmed AGENTS.md conventions around Lingui catalogs, locale registration, and changesets.
  • Verified the locale is inserted alphabetically in locales.ts, uses the standard BCP-47 code da, defaults to LTR, and is enabled.
  • Compared the Danish catalog against the source English catalog: 3,040 msgids, identical set, no extras or omissions. 28 entries intentionally have empty msgstr values and will fall back to English, matching the PR description.
  • Spot-checked translations containing ICU placeholders/plurals and ran a quick static scan for placeholder mismatches and unbalanced braces — none found.
  • Verified the changeset is present, targets @emdash-cms/admin, and uses a patch bump consistent with a translation-only change.

The PR also notes known surrounding gaps (day-picker calendar strings, relative-time strings, audit-log plugin copy) that are intentionally out of scope, so there is no introduced inconsistency. The code is clean.

One optional follow-up: if react-day-picker/locale exports a Danish locale, wiring da into packages/admin/src/locales/day-picker.ts would close the calendar gap — but that is independent of this change.

@emdashbot emdashbot Bot added the review/approved Approved; no new commits since label Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 13,807 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.

@ascorbic
ascorbic enabled auto-merge (squash) September 26, 2026 19:56
@pkg-pr-new

pkg-pr-new Bot commented Sep 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

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

@emdash-cms/plugin-test

npm i https://pkg.pr.new/@emdash-cms/plugin-test@3492

@emdash-cms/plugin-types

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

@emdash-cms/registry-client

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

@emdash-cms/registry-lexicons

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

@emdash-cms/registry-loader

npm i https://pkg.pr.new/@emdash-cms/registry-loader@3492

@emdash-cms/registry-moderation

npm i https://pkg.pr.new/@emdash-cms/registry-moderation@3492

@emdash-cms/registry-verification

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

@emdash-cms/sandbox-workerd

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: f5a0503

@ascorbic
ascorbic merged commit d583dfd into emdash-cms:main Sep 26, 2026
41 checks passed
@emdashbot emdashbot Bot mentioned this pull request Sep 26, 2026
@kgni
kgni deleted the i18n/da branch September 28, 2026 15:55
@kgni kgni mentioned this pull request Sep 28, 2026
9 of 19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants