Skip to content

feat(i18n): add en-GB (British English) locale#1411

Open
memdigital wants to merge 2 commits into
emdash-cms:mainfrom
memdigital:feat/en-gb-locale
Open

feat(i18n): add en-GB (British English) locale#1411
memdigital wants to merge 2 commits into
emdash-cms:mainfrom
memdigital:feat/en-gb-locale

Conversation

@memdigital

@memdigital memdigital commented Jun 11, 2026

Copy link
Copy Markdown

What does this PR do?

Adds an English (UK) locale, following the documented workflow in locales.ts (entry added in the alphabetical slot, PO catalogue at src/locales/en-GB/messages.po, changeset included).

Scope: spelling and morphology only. Terminology is deliberately untouched (e.g. "Trash" stays "Trash") so the locale stays uncontroversial - it's the same English, spelt British: analyse, authorise, organise, recognise, cancelled, centred, Align Centre, Search Engine Optimisation, licence (noun), etc.

  • 19 strings differ from en; every other msgstr mirrors the source, so coverage is 100% and the locale ships enabled: true.
  • ICU placeholders are untouched (e.g. View the {license} licence on spdx.org keeps the {license} variable).
  • en-GB browsers are auto-matched by the existing Accept-Language BCP 47 resolution, so UK users get this with zero configuration.
  • The line count is the full PO catalogue - the code change is one registration line in locales.ts.

Happy to adjust the label wording ("English (UK)" vs "English (United Kingdom)") or the enabled default to your preference.

No linked issue - translation contribution.

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 (note: a fresh clone shows pre-existing @emdash-cms/registry-client resolution errors unrelated to this data-only change; pnpm locale:compile passes with en-GB included)
  • pnpm lint passes (data-only change: one locales.ts line + PO catalogue)
  • pnpm test passes (no behaviour change outside the new catalogue)
  • pnpm format has been run (Format CI check passes on this PR)
  • I have added/updated tests for my changes (not applicable - translation)
  • User-visible strings in the admin UI are wrapped for translation (this IS a translation PR - messages.po inclusion is the change itself)
  • I have added a changeset (@emdash-cms/admin: patch)
  • New features link to an approved Discussion (not applicable - translation, not a feature)

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Claude Fable 5 (Claude Code). The catalogue was generated by a deterministic en→en-GB transform script and every changed string was human-reviewed; the locale is running in production on two of our Emdash 0.17.2 installs.

Screenshots / test output

Verified live on an Emdash 0.17.2 deployment: the language picker shows "English (UK)" (auto-selected for an en-GB browser via Accept-Language) and admin strings render with British spellings (e.g. Settings > SEO: "Search engine optimisation and verification").

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a10c795

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

This PR includes changesets to release 14 packages
Name Type
@emdash-cms/admin Patch
emdash Patch
@emdash-cms/cloudflare Patch
@emdash-cms/sandbox-workerd Patch
@emdash-cms/fixture-perf-site Patch
@emdash-cms/perf-demo-site Patch
@emdash-cms/cache-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 7,687 lines across 2 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 added the review/needs-review No maintainer or bot review yet label Jun 11, 2026
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

@memdigital

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA on #1411

@memdigital

Copy link
Copy Markdown
Author

recheck

@memdigital

Copy link
Copy Markdown
Author

recheck

2 similar comments
@memdigital

Copy link
Copy Markdown
Author

recheck

@memdigital

Copy link
Copy Markdown
Author

recheck

Adds an English (UK) locale catalogue: British spelling and morphology
only (analyse, authorise, licence-the-noun, Align Centre, Search Engine
Optimisation, etc.). ICU placeholders untouched. 19 strings differ from
en; all other msgstr values mirror the source so coverage is 100%.
Changeset included.

Follows the documented locales.ts workflow; lingui compile passes.
@memdigital

Copy link
Copy Markdown
Author

recheck

github-actions Bot added a commit that referenced this pull request Jun 11, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

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

@emdash-cms/plugin-types

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

@emdash-cms/registry-client

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

@emdash-cms/registry-lexicons

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

@emdash-cms/sandbox-workerd

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: a10c795

ascorbic
ascorbic previously approved these changes Jun 11, 2026
@ascorbic

Copy link
Copy Markdown
Collaborator

The e2e tests are failing because strict matching fails when there are two languages that contain "English". Could you update the tests in the same PR to make them match the exact name?

@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 Jun 11, 2026
@ascorbic ascorbic dismissed their stale review June 12, 2026 13:50

Tests are failing

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet and removed review/approved Approved; no new commits since labels Jun 12, 2026
The en-GB locale adds a second option containing "English", so the
substring match in the language switcher test now violates Playwright's
strict mode. Match the exact accessible name instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ascorbic ascorbic enabled auto-merge (squash) June 12, 2026 20:25
@ascorbic ascorbic disabled auto-merge June 12, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants