You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The admin UI is fully localized via Lingui, but plugin adminPages labels are rendered verbatim from the manifest. A plugin can localize every string inside its pages (by merging a Lingui catalog into the shared i18n instance from @lingui/core — the prebuilt admin keeps Lingui external, so it's the same singleton), yet its sidebar entry and command-palette item stay hard-coded English. In a German admin you get "Bestellungen" everywhere inside the page but "Orders" in the nav next to it.
There is currently no way for a plugin to fix this: the label is a plain string in the manifest, and the sidebar/palette never consult the i18n instance.
Proposal
Run declared plugin page labels through the shared Lingui instance at render time — i18n._(page.label) — in the two places that render them (Sidebar.tsx, AdminCommandPalette.tsx).
Plugins that load a catalog (English label as msgid) get localized navigation, consistent with how they already localize their page content.
Labels matching one of the admin's own messages (e.g. "Settings") follow the admin locale automatically — a localized admin no longer shows stray English nav items.
Labels with no catalog entry anywhere render unchanged (i18n._() falls back to the msgid), so existing plugins are unaffected.
The prettified-plugin-id fallback (no label declared) is not translated — it's derived from the package name, not authored English.
No manifest or API changes; purely a render-time lookup. Alternative considered: per-locale label maps in the manifest (label: { en: "...", de: "..." }) — rejected as a breaking/parallel mechanism when the admin already has a i18n pipeline plugins can feed.
I have a working branch with the change, a shared resolvePluginPageLabel() helper (deduplicates the sidebar/palette copy-paste), tests, and docs — happy to open the PR if this direction sounds right.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The admin UI is fully localized via Lingui, but plugin
adminPageslabels are rendered verbatim from the manifest. A plugin can localize every string inside its pages (by merging a Lingui catalog into the sharedi18ninstance from@lingui/core— the prebuilt admin keeps Lingui external, so it's the same singleton), yet its sidebar entry and command-palette item stay hard-coded English. In a German admin you get "Bestellungen" everywhere inside the page but "Orders" in the nav next to it.There is currently no way for a plugin to fix this: the label is a plain string in the manifest, and the sidebar/palette never consult the i18n instance.
Proposal
Run declared plugin page labels through the shared Lingui instance at render time —
i18n._(page.label)— in the two places that render them (Sidebar.tsx,AdminCommandPalette.tsx).i18n._()falls back to the msgid), so existing plugins are unaffected.No manifest or API changes; purely a render-time lookup. Alternative considered: per-locale label maps in the manifest (
label: { en: "...", de: "..." }) — rejected as a breaking/parallel mechanism when the admin already has a i18n pipeline plugins can feed.I have a working branch with the change, a shared
resolvePluginPageLabel()helper (deduplicates the sidebar/palette copy-paste), tests, and docs — happy to open the PR if this direction sounds right.Beta Was this translation helpful? Give feedback.
All reactions