headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

Enable i18n in plugins

Open joaquimrocha opened this issue 3 years ago • 1 comments

Description

We don't don't bootstrap i18n in plugins, so the responsibility of doing that is left to the plugin developer. So the chances are that plugins will not get i18n.

We cannot of course guarantee that plugins will actually ever get translations to match the languages Headlamp ships by default, but we could encourage the i18n by setting up i18next and its configuration for plugins. So its easy to start contributing translations to any plugin projects.

joaquimrocha avatar Dec 20 '21 09:12 joaquimrocha

A few bits on this...

Plugins (probably) should use their own namespace?

t('podcounter|Title')

So that there is not an accidental overwriting of other translations (from main Headlamp or from other plugins).

An API to extend existing name spaces?

A plugin could implement an entire language localization potentially.

Additionally, changing copy/text could be done this way. Want to rename Pods to Minions, that should be fairly easy by overriding the translations.

Headlamp could provide translations for plugins?

If a plugin is shipped, and it doesn't supply translations for N locales, it could be that Headlamp could provide them. Potentially allowing reuse of translations and allowing a centralized translation workflow to be used.

We could have some way for people to request localizations.

illume avatar Jul 02 '22 10:07 illume