Skip to content

Fix(admin): Localize MediaPickerModal#1465

Merged
ascorbic merged 2 commits into
emdash-cms:mainfrom
pitscher:fix/localize-MediaPickerModal
Jun 15, 2026
Merged

Fix(admin): Localize MediaPickerModal#1465
ascorbic merged 2 commits into
emdash-cms:mainfrom
pitscher:fix/localize-MediaPickerModal

Conversation

@pitscher

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR is a follow-up on: #1244

It wraps the MediaPickerModal built-in Library provider label with Lingui so they follow the selected admin locale.
For now, the MediaPickerModal is fully covered for translations. Translators can pickup the changes of their messages.po to finish this story.

Closes #

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 (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Codex with GPT 5.5

Screenshots / test output

@changeset-bot

changeset-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4ba0e2c

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 github-actions Bot added area/admin size/S review/needs-review No maintainer or bot review yet labels Jun 14, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

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

@emdash-cms/auth

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

@emdash-cms/auth-atproto

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

@emdash-cms/blocks

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

@emdash-cms/cloudflare

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

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

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

emdash

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

create-emdash

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

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

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

@emdash-cms/plugin-cli

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

@emdash-cms/plugin-types

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

@emdash-cms/registry-client

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

@emdash-cms/registry-lexicons

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

@emdash-cms/sandbox-workerd

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

@emdash-cms/x402

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

@emdash-cms/plugin-ai-moderation

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

@emdash-cms/plugin-atproto

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

@emdash-cms/plugin-audit-log

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

@emdash-cms/plugin-color

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

@emdash-cms/plugin-embeds

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

@emdash-cms/plugin-field-kit

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

@emdash-cms/plugin-forms

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

@emdash-cms/plugin-webhook-notifier

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

commit: 4ba0e2c

@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 correctly localizes the two remaining hardcoded "Library" strings in MediaPickerModal.tsx by wrapping them with Lingui's t`Library` macro. The approach is sound: it's a focused follow-up that brings MediaPickerModal in line with the already-localized MediaLibrary component (which uses the identical pattern for its built-in provider label).

I verified:

  • Both changed useMemo dependency arrays were properly updated to include t, so locale changes invalidate the memoized labels.
  • No other untranslated user-facing strings remain in MediaPickerModal.tsx.
  • The changeset follows the required format and accurately describes the user-facing fix.
  • The diff is minimal and scoped exactly to the stated purpose.

No issues found — clean localization fix.

@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 14, 2026
@ascorbic ascorbic merged commit 8bb20c4 into emdash-cms:main Jun 15, 2026
44 checks passed
@emdashbot emdashbot Bot mentioned this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/admin review/approved Approved; no new commits since size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants