Support internationalization for title param on plugins and PageBlueprints
#34,139 建立於 2026年5月6日
倉庫指標
- 星標
- (26,101 顆星)
- PR 合併指標
- (平均合併 15天) (30 天內合併 121 個 PR)
描述
📜 Issue Labels
- Please familiarize yourself with the issue labels used in this project: LABELS.md
🔎 Search Terms
internationalization, i18n, PageBlueprint internationalization, title internationalization
🗃️ Project Area
Unknown
🔖 Need
PageBlueprint's title param is typed as string and evaluated at module load, outside React context. It feeds the page header and auto-discovered sidebar item (since NavItemBlueprint is deprecated), none of which can participate in the hook-based useTranslationRef system. With the language toggle enabled, the rest of the UI translates while titles stay frozen in the author's original string. Same gap on EntityContentBlueprint, SubPageBlueprint, and NavItemBlueprint. Config overrides are a per-deployment static swap, not i18n.
📝 Proposal
Allow title to accept either the current string or a translation binding, resolved at render time:
PageBlueprint.make({
params: {
path: '/foo',
title: { ref: fooTranslationRef, key: 'fooPage.title' },
loader: () => import('./FooPage').then(m => ),
},
});
Something similar could also make sense for the title param on createFrontendPlugin.
🔄 Alternatives
Auto-generating keys from the extension's identity to make support for translations more implicit could work, though wouldn't remove the need for a translation ref.
Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit a PR?
Yes, but I would like some more guidance