Add locale awareness to sidebar_menu using vue-i18n
What does this MR do and why?
Adds support for displaying the sidebar menu in the current page's language (English/Japanese).
Changes
- Sidebar detects language from vue-i18n
- Loads appropriate navigation data (en-us or ja-jp)
- sidebar_menu_spec.js test extended to include ja-jp/naigation.yaml
- ja-jp added to vue-i18n
Screenshots, screen recordings, or links to review app
Screen_Recording_2025-06-09_at_12.19.27_PM
How to set up and validate locally
- Configure a local GitLab Docs environment.
- Check out this branch.
- Turn Japanese on in hugo.yml -
languages.ja-jp.disabled:false - make view to fire up site locally
- Visit translated page, for example http://localhost:1313/ja-jp/topics/build_your_application/
- Try navigating to "CI/CD YAML構文リファレンス", which leads to http://localhost:1313/ja-jp/ci/yaml/, and it's translated.
- Sidebar remembers the active state.
- Note - with the site partially translated, many of the side bar links will lead to 404, since we don't have a fallback system in place yet.
- Also try navigating through the english side to ensure no regressions
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Lauren Barker