Refactor navigation menu to use i18n plugin #1208
Closed
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.
This continues the work of refactoring parts of the website that weren't adapted when introducing the i18n plugin, resulting in a lot of duplicate files, impossibility to scale and hard maintainability. This PRs fixes only the navigation menu, but we should also make the footers use the i18n plugin, so we can remove the
_data/lang
folder altogether. I will take care of that soon.For clarity, the sections which still need to be refactored are:
The last two are particularly difficult to refactor because a lot of user guides and Moneropedia entries where translated since the implemenation of the i18n plugin for the other half of the website. Adapting all the translated entries to the new system will be changelling and time consuming (see logs of the last community meeting for details).
Changes:
_includes/header.html
) to make it use the i18n plugin. The navigation menu was previously not added in the i18n system and was unscalable and hard to maintain in that structure.navigation.yml
were duplicates of the 'titles' entries of the i18n/LANG.yml files. I copied the non-duplicated menu entries to a dedicatenavigation
section of the language fields. We use the entries in thetitles
section for the already existing menu entries.