Repository navigation
Conversation
Use Kumo's Button icon prop and LinkButton (with external for new-tab links) instead of manual icon spacing and raw anchor styling. Fix invalid Link/Button nesting in plugin manager. Translate stray English strings in user list empty state.
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.
🦋 Changeset detectedLatest commit: 671930d 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 |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 671930d | May 07 2026, 01:12 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-i18n | 671930d | May 07 2026, 01:11 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-perf-coordinator | 671930d | May 07 2026, 01:11 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 671930d | May 07 2026, 01:13 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 671930d | May 07 2026, 01:13 PM |
Scope checkThis PR changes 742 lines across 21 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. |
|
Closing in favor of a clean branch off main; reopening shortly. |
There was a problem hiding this comment.
Pull request overview
This PR aims to eliminate “i18n leaks” in the admin UI by routing user-facing strings through Lingui (via t, Trans, and plural) across several high-traffic screens/components.
Changes:
- Wraps many previously hard-coded English UI strings (toasts, dialogs, labels, placeholders, aria-labels) with Lingui macros so they can be translated.
- Introduces some pluralization handling via
plural()and richer message composition via<Trans>. - Adds/updates Changesets for the admin package.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/admin/src/router.tsx | Translates route-level loading/error/not-found UI + many toast strings; adds plural() for bulk comment toast. |
| packages/admin/src/routes/users.tsx | Translates error state + confirm dialog titles/labels and descriptions. |
| packages/admin/src/routes/bylines.tsx | Translates bylines page UI text (search/filter/forms/buttons/dialog). |
| packages/admin/src/components/Widgets.tsx | Translates widgets page strings, dialog labels, empty states, and aria-labels. |
| packages/admin/src/components/PortableTextEditor.tsx | Translates editor modal/tooltips/aria-label/title strings. |
| packages/admin/src/components/editor/ImageNode.tsx | Translates image-node tooltips/aria-labels/alt-text UI strings. |
| packages/admin/src/components/editor/PluginBlockNode.tsx | Moves embed placeholder metadata to MessageDescriptor and translates node UI tooltips/labels. |
| packages/admin/src/components/InviteAcceptPage.tsx | Translates invite-accept flow headings/labels/status/error UI strings. |
| packages/admin/src/components/users/UserList.tsx | Translates user list headers/filters/empty states/status labels. |
| packages/admin/src/components/ContentTypeEditor.tsx | Translates content type editor panels, validation hints, moderation options, and pluralized field counts. |
| packages/admin/src/components/ContentList.tsx | Uses LinkButton for external view action; keeps aria-label translated. |
| packages/admin/src/components/ContentEditor.tsx | Uses LinkButton for Live View; minor button API adjustments. |
| packages/admin/src/components/PluginManager.tsx | Button/icon usage adjustments; marketplace link rendered as a styled Link. |
| packages/admin/src/components/MenuList.tsx | Marks decorative icon as aria-hidden and adjusts class ordering. |
| packages/admin/src/components/ThemeMarketplaceDetail.tsx | Uses LinkButton for demo link and icon prop for preview button. |
| packages/admin/src/components/ThemeMarketplaceBrowse.tsx | Uses icon prop for retry button. |
| packages/admin/src/components/MarketplaceBrowse.tsx | Uses icon prop for retry button. |
| packages/admin/src/components/MarketplacePluginDetail.tsx | Uses icon prop for install button. |
| packages/admin/src/components/WordPressImport.tsx | Uses semantic brand color class; marks external-link icon aria-hidden. |
| .changeset/tall-flies-vanish.md | Adds a patch changeset describing the i18n leak fixes. |
| .changeset/legal-doodles-move.md | Adds a patch changeset describing button/link standardization work (appears to match #934). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
| "@emdash-cms/admin": patch | ||
| --- | ||
|
|
||
| Fixes button and link inconsistencies across the admin UI. Standardises on Kumo's `Button` `icon` prop and `LinkButton` (with `external` for new-tab links) instead of manual icon spacing and raw anchor styling, removes a `<Link><Button>` invalid HTML nesting in the plugin manager, and translates two stray English strings in the user list empty state. |
| title: "Translation created", | ||
| description: `Created ${result.locale?.toUpperCase() ?? "new"} translation`, | ||
| title: t`Translation created`, | ||
| description: t`Created ${result.locale?.toUpperCase() ?? t`new`} translation`, |
| <button | ||
| {...attributes} | ||
| {...listeners} | ||
| className="cursor-grab active:cursor-grabbing" | ||
| aria-label={`Drag to reorder ${widget.title || "widget"}`} | ||
| aria-label={t`Drag to reorder ${widget.title ?? t`widget`}`} | ||
| > |
| <Button | ||
| variant="ghost" | ||
| size="sm" | ||
| onClick={() => deleteMutation.mutate()} | ||
| aria-label={`Delete ${widget.title || "widget"}`} | ||
| aria-label={t`Delete ${widget.title ?? t`widget`}`} | ||
| > |
| React.useEffect(() => { | ||
| if (!urlToken) { | ||
| setError("No invite token provided"); | ||
| setError(t`No invite token provided`); | ||
| setStep("error"); | ||
| setIsLoading(false); | ||
| return; |
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.
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)