Repository navigation
fix(admin): translate strings in top-10 admin UI files (i18n leaks) - #937
Conversation
Wrap user-facing English strings in Lingui's t macro across the most-used admin screens: router toasts and error pages, ContentTypeEditor, Widgets, PortableTextEditor toolbar, ImageNode, PluginBlockNode, InviteAcceptPage, UserList, routes/users, routes/bylines. Adds useLingui where missing and converts module-scope label maps to MessageDescriptor records resolved at render time. Long-tail leaks in remaining files will follow in a separate PR.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 8867274 | May 07 2026, 01:21 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 88febcc | May 07 2026, 01:26 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 88febcc | May 07 2026, 01:26 PM |
🦋 Changeset detectedLatest commit: 88febcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
Scope checkThis PR changes 635 lines across 11 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. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 88febcc | May 07 2026, 01:26 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 88febcc | May 07 2026, 01:27 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 88febcc | May 07 2026, 01:27 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
…Descriptor
Plugin placeholders are runtime strings that won't be in the Lingui catalog.
Wrapping them in { id: def.placeholder } caused failed lookups and missing
translation warnings. Split the type so plugin strings render as-is and only
the dev-supplied fallback is translated.
There was a problem hiding this comment.
Pull request overview
This PR fixes i18n “leaks” in the admin SPA by routing previously hard-coded English UI strings through Lingui macros, improving localization coverage on the most frequently used screens.
Changes:
- Wraps user-facing strings (including toasts, dialogs, placeholders, titles, and aria-labels) with Lingui
t,Trans, andpluralacross key admin routes/components. - Adjusts a few module-scope metadata/constants to store
MessageDescriptors (viamsg) and resolve them at render time. - Adds an admin changeset documenting the localization fixes.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/admin/src/router.tsx | Translates router screens and mutation toast strings; adds pluralized bulk-comment toast. |
| packages/admin/src/components/ContentTypeEditor.tsx | Translates labels/help text/dialog copy; introduces MODERATION_OPTIONS as MessageDescriptors; pluralizes field count. |
| packages/admin/src/components/Widgets.tsx | Translates widgets UI copy, dialog labels, empty states, and ARIA labels/toasts. |
| packages/admin/src/components/PortableTextEditor.tsx | Translates toolbar titles/aria-labels and modal strings within the editor UI. |
| packages/admin/src/components/editor/ImageNode.tsx | Translates image node actions and inline alt-text editor labels/placeholders. |
| packages/admin/src/components/editor/PluginBlockNode.tsx | Moves embed placeholder metadata to MessageDescriptor and translates node UI labels. |
| packages/admin/src/components/InviteAcceptPage.tsx | Translates invite-accept flow UI strings and error states. |
| packages/admin/src/components/users/UserList.tsx | Translates list headers, filters, empty states, and status labels. |
| packages/admin/src/routes/bylines.tsx | Translates bylines route UI: filters, labels, empty states, and confirm dialog copy. |
| packages/admin/src/routes/users.tsx | Translates confirm dialog titles/labels and error UI in the users route. |
| .changeset/tall-flies-vanish.md | Adds a patch changeset for the admin package describing the i18n leak fixes. |
Comments suppressed due to low confidence (1)
packages/admin/src/components/InviteAcceptPage.tsx:168
- In InviteAcceptPage's useEffect,
tis used to set the error message but isn't included in the dependency array. If the active locale changes while this component is mounted, the effect won't re-run and the stored error string can remain in the old language. Consider addingt(ori18n) to the deps, or derive this message at render time instead of storing the translated string in state.
React.useEffect(() => {
if (!urlToken) {
setError(t`No invite token provided`);
setStep("error");
setIsLoading(false);
return;
}
setToken(urlToken);
void verifyToken(urlToken);
}, [urlToken]);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Overlapping PRsThis PR modifies files that are also changed by other open PRs:
This may cause merge conflicts or duplicated work. A maintainer will coordinate. |
What does this PR do?
Wraps ~250 user-facing English strings in Lingui's `t` macro across the 10 admin files with the most i18n leaks (per a full audit of `packages/admin/src/`). These strings currently bypass translation entirely and render as English in every locale.
This is the second of a series of stacked PRs cleaning up admin UI inconsistencies. #934 (button consistency) merged first.
Files changed:
Sub-tasks were dispatched to sub-agents (Haiku-based `simple-tasks` and Kimi for the larger files); main changes verified with full typecheck + test pass.
This is the first half of the i18n cleanup. The remaining ~40 leaks across 23 files (settings panels, marketplace, sandboxed-plugin host, auth flows, lib/api fallback strings) will follow in a separate stacked PR.
(Replaces #936, which was closed because of stale-base conflicts.)
Closes #
Type of change
Checklist
AI-generated code disclosure
Screenshots / test output
No visual change in default English locale — strings render identically. Run with `EMDASH_PSEUDO_LOCALE=1` to verify the strings now flow through translation: previously English text leaked through pseudo-localization in these files; after this PR, all listed strings render pseudo-localized.
Stack: `main` → #934 (merged) → this PR → (next: long-tail i18n) → (next: raw HTML to Kumo) → (next: aria-labels) → (next: RTL safety) → (next: semantic tokens) → (last: ESLint enforcement)