Repository navigation
Conversation
This was referenced Oct 30, 2026
sneridagh
force-pushed
the
feat/controlpanels-i18n
branch
from
October 31, 2026 01:38
e91f52c to
ba908be
Compare
ControlPanelsProvider takes a t function in react-i18next's shape, as
PlateEditor does, instead of translate. Aurora passes react-i18next's t,
and apps on react-intl pass translationFromIntl(intl). The messages use
{{placeholder}}s, and i18next doesn't escape the values, as React
renders them.
The translations ship in src/locales, in English, German, Spanish,
Italian and Catalan. The English catalog is generated from the code
(pnpm i18n), and a test checks the others. Aurora registers
@plone/controlpanels as an add-on, so they load.
The not globally addable badge gets its own message, since the list's
sentence about new types needs a plural in some languages.
A conceptual guide on the pattern @plone/plate and @plone/controlpanels follow, and a pointer to it in the root and package AGENTS.md files.
sneridagh
force-pushed
the
feat/controlpanels-i18n
branch
from
November 1, 2026 02:05
ba908be to
1c05db1
Compare
This was referenced Nov 3, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #269. Stacked on #351.
The control panels are translated the way
@plone/plateis, so they work the same in Plone Aurora and in Volto, and they ship translations: English, German, Spanish, Italian, Catalan and Brazilian Portuguese. A new conceptual guide documents the pattern both packages follow.@plone/controlpanelsControlPanelsProvidertakes atfunction in react-i18next's shape,t(key, { defaultValue, ...values }), instead oftranslate. Aurora passes react-i18next'stas is. Apps on react-intl, such as Volto, passtranslationFromIntl(intl), which turns the placeholders into ICU's. The screens keep usinguseTranslate()with their messages, so they don't change.{{count}}, in all 258 messages.interpolation: { escapeValue: false }), since React escapes what it renders. Without it, "Intranet/Extranet" showed asIntranet/Extranetin the workflow dialog; the acceptance tests caught it.src/locales/<language>/common.json, i18next'scommonnamespace, next to the package'smain, where the registry looks:enis generated from the messages in the code:pnpm i18n.de,es,it,caandpt-BRtranslate every message, with the terms of Volto's catalog for each language (Content type, Workflow, Fieldset, Short name…).src/locales.test.tsfails whenenis outdated, or when a translation has unknown keys or other placeholders.applyConfigthat returns the config, so Aurora can register the package and load its translations.Aurora
apps/auroradepends on@plone/controlpanelsand lists it inregistry.config.ts, so the registry merges its catalogs intopublic/locales.ContentTypesProviderspasses react-i18next'st, and no longer fills in the placeholders itself.Documentation
docs/conceptual-guides/packages-for-volto-and-aurora.md, on what makes a package run in both apps:@plone/registryas a peer dependencyAGENTS.md: the root file summarizes the pattern and points to the guide;@plone/plate's and@plone/controlpanels' files point to it too.Not in this PR
translationFromIntl(intl), and bring the messages into Volto's catalogs from these JSON files, as volto-plate does for Plate.supportedLanguages, choosing German in the personal preferences still renders English everywhere.app/i18n.tsreads the supported languages when it's first imported, probably before the configuration has run. That's a separate fix. Here I checked that Aurora serves the control panel's catalogs, for example/locales/de/common.jsonwith "Inhaltstypen".Checks
@plone/controlpanels: 128 unit tests, including the contract,translationFromIntland the catalogs.check:ts, lint and Prettier pass.@plone/cmsui: 451 unit tests;check:tspasses.content-types.test.tsagainst plone.restapiissue-2061-workflows: 23 passed, 2 skipped (the known gaps on that backend).make docs-htmlbuilds without warnings from the new guide.See #269 for how to review and merge the stack.