Skip to content

feat(frontend): Load geonetwork-ui translations at runtime - #191

Open
tkohr wants to merge 5 commits into
mainfrom
gn-ui-translations
Open

tkohr wants to merge 5 commits into
mainfrom
gn-ui-translations

Conversation

@tkohr

@tkohr tkohr commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The frontend now uses its own TranslateLoader, which merges the geonetwork-ui translations (copied to assets/i18n/gn-ui/ at build time) with datafeeder's. Datafeeder values take precedence, and empty values are ignored.

This removes the duplicated gn-ui markers (metadata.i18n.ts) and their translations from translations/*.json. Languages other than en/fr now get gn-ui's translations instead of falling back to English.

gn-ui has been updated to align all translation values that corresponded to markers kept in the deleted metadata.i18n.ts.

Translation overrides

gn-ui translation values can still be overridden as before by adding markers to components that use gn-ui components. These overrides will be applied to datafeeder in general.

The overrides currently present in the datafeeder (and that were not touched in this PR) are:

Key Lang Datafeeder gn-ui
input.file.selectFileLabel en Choose a file Select a file ({sizeMB} MB max.)
input.file.orInputUrl en Or import a file from a link or create a link to an external resource
input.file.selectFileLabel fr Choisissez un fichier Sélectionnez un fichier ({sizeMB} Mo max.)
input.file.dropFileLabel fr ou déplacez le ici ou glissez-le ici
input.file.orInputUrl fr Ou importez un fichier à partir d'un lien ou créez un lien vers une ressource externe

If these were not done intentionally they can still (partially) be dropped.

Note: A follow-up PR (that will load the gn-ui default.toml config) will allow to override translations by datafeeder instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant