Skip to content

Add translation support in UI #176

@sinedied

Description

@sinedied

I want to add proper support for workshop translations.

Specifications

  • Translations files are located under the /translations/<workshop_name>.<language_code>.md files
  • Language code can be like "fr" or "fr_FR"
  • The main (base) workshop contains a list of translations in its metadata: ie translations: [fr, es_ES, it]
  • There's a new optional metadata to set the language of a workshop: language. When not set, assume the value is en
  • When a workshop has translations, a language selection dropdown is visible on the right of the top navbar
    • The language selection is sorted alphabetically, except for the base workshop that is always at the top named "default ()"
    • It includes the language of the base workshop in addition to the ones listed in the translations metadata
  • When a translated workshop is loaded (detected by the file name format and path), the metadata from the base workshop must always be loaded to get the translations list. If it cannot be loaded or results in a 404, the translations dropdown is not shown.

Keep changes minimal, and do not add any extra dependencies.
This is a monorepo, so make sure you looked for the changes needed in all the packages.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions