039 - Core i18n Consumers¶
User Story¶
As a visitor of an Infinito.Nexus deployment, I want the documentation, the universal logout panel and the dashboard to speak my language from the core gettext catalogs, and I want browser apps such as MIG to be allowed to read the API, so that every surface core renders follows the same translations.
Scope¶
This requirement moves the core roles that render translated text onto the catalogs of 037 - Gettext Catalogs with LibreTranslate Autotranslation and opens the API of 038 - web-svc-api to browser consumers. The consumer repositories change afterwards and are not part of this requirement.
Findings That Constrain the Design¶
web-app-docs builds each version on demand from a git mirror:
git archiveof the ref, the generators, then onesphinx-build -M html. Its server routes/<version>/<rest>. Sphinx readslocale/<code>/LC_MESSAGES/docs.powhenlanguageandlocale_dirsare set, and compiles it with Babel.One built version needs about 2.3 GB. Building every translated language up front multiplies that per language;
min_storageMUST say so.min_storagealso gates which roles a host deploys at all, so it counts the sites every deployment builds and names the growth per further language.The documentation is built from the git mirror of
DOCS_SOURCE_REPO. Catalogs that exist only in a local working tree never reach it.logout-panel.js.j2 inlines logout_i18n.yml as a
{language: {key: text, dir}}object, and logout-panel.js picks the language from<html lang>andnavigator.language. Its 29 non-English blocks are the only human translations core owns.port-ui translates the rendered
config.yamlthroughapp/i18n/content/<code>.yaml, a flat mapping from the English source string to its translation for the keysdescription,info,name,subtitel,text,titleandwarning. web-app-dashboard mounts onlyconfig.yaml, and the upstream image ships no catalog, so every card and menu text stays English until the role builds them in.csp_filters.py adds a provider origin to
connect-srconly for known feature flags such assimpleicons. web-app-meta renders no environment and no API origin.
Acceptance Criteria¶
[ ] For every version whose tree holds a
locale/<code>/LC_MESSAGES/docs.powith at least one translation, web-app-docs publishes the English site first and then one site per such language at/<version>/<code>/.[ ] web-app-docs builds the deployed working tree as the unlisted version
deployed, because the git mirror only holds what is pushed tomain.[ ]
/deployed/de/serves a page whose<html lang>isdeand whose body contains the German translation of a message from the Germandocs.po;/latest/de/follows once the catalogs are onmain.[ ] Every documentation page offers a language switcher that lists English and every language built for that version, and switching keeps the page path.
[ ] A request for a language of
meta/languages.ymlthat has no site for the version returns a 404, not the English page.[x]
min_storageof web-app-docs states the storage of the English site plus the translated sites.[x]
logout_i18n.ymlholds only the English source strings, and the logout panel reads every other language fromcore.po.[ ] For each of the 29 languages of the former
logout_i18n.yml, the rendered panel catalogue holds the same strings as before the migration.[x] The logout panel takes the text direction of every language from
meta/languages.yml.[x] web-app-dashboard bakes one port-ui content catalog per language that has a translated dashboard string into its image, generated from
core.poat deploy time.[x] The dashboard at
/de/shows the German translation of at least one card description and one menu category.[x] A role that enables the
apiservice gets the web-svc-api origin in itsconnect-src, and a role without it does not.[x] web-app-meta enables the
apiservice when web-svc-api is deployed and renders the API base URL into its environment.[ ] The Playwright specs of web-app-docs, web-app-keycloak and web-app-dashboard cover the German page, the German logout panel and the German dashboard.
[ ]
make compose-deployis green for web-app-docs, web-app-keycloak, web-app-dashboard and web-app-meta.