feat(docs): add multi-language support with jekyll-polyglot#111
Open
EVWorth wants to merge 5 commits into
Open
feat(docs): add multi-language support with jekyll-polyglot#111EVWorth wants to merge 5 commits into
EVWorth wants to merge 5 commits into
Conversation
Add internationalization infrastructure using jekyll-polyglot to support multiple languages. The entire site (sidebar, titles, content) transforms when switching languages via the header dropdown. Infrastructure: - Switch from github-pages gem to Jekyll 4 + jekyll-polyglot - Update GitHub Actions workflow for custom Jekyll build - Add language dropdown switcher in header_custom.html - Add language switcher CSS to custom.scss - Add lang: en frontmatter to all English pages French translations: - 10 French pages mirroring English structure in docs/fr/ - Translations sourced from community PRs andyfase#76-andyfase#84 - Matched permalinks for Polyglot language pairing Config: - languages: en, fr (English default) - exclude_from_localization: assets, CNAME - parallel_localization disabled for compatibility
There was a problem hiding this comment.
Pull request overview
Adds multilingual (EN/FR) support to the Jekyll documentation site using jekyll-polyglot, along with a custom GitHub Pages build workflow (since Polyglot isn’t a whitelisted Pages plugin) and a new French documentation tree mirroring the English structure.
Changes:
- Switch docs site to a custom Jekyll 4 build with Polyglot and update the Pages workflow accordingly.
- Add a header language dropdown and supporting styles.
- Add
langfrontmatter to English pages and introduce French translations underdocs/fr/with matching permalinks.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/docs.yml | Builds/deploys docs via custom Ruby/Jekyll pipeline for non-whitelisted plugins. |
| docs/Gemfile | Moves off github-pages to Jekyll 4 + Polyglot/plugin gems. |
| docs/_config.yml | Enables Polyglot + language configuration for the docs site. |
| docs/_includes/header_custom.html | Adds language selector dropdown to the site header. |
| docs/_sass/custom/custom.scss | Styles the language selector. |
| docs/index.md | Adds lang: en to the homepage. |
| docs/pages/automations.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/control-center.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/faq.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/features.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/install.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/multi-car.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/region.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/siri.md | Adds lang: en frontmatter for Polyglot. |
| docs/pages/widgets.md | Adds lang: en frontmatter for Polyglot. |
| docs/fr/index.md | Adds French homepage variant for Polyglot build. |
| docs/fr/pages/automations.md | Adds French translation for Automations page. |
| docs/fr/pages/control-center.md | Adds French translation for Control Center page. |
| docs/fr/pages/faq.md | Adds French translation for FAQ page. |
| docs/fr/pages/features.md | Adds French translation for Features page. |
| docs/fr/pages/install.md | Adds French translation for Installation page. |
| docs/fr/pages/multi-car.md | Adds French translation for Multi-car page. |
| docs/fr/pages/region.md | Adds French translation for Region/Support page. |
| docs/fr/pages/siri.md | Adds French translation for Siri/Shortcuts page. |
| docs/fr/pages/widgets.md | Adds French translation for Widgets page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds internationalization infrastructure to the documentation site using jekyll-polyglot. When a user switches languages via the header dropdown, the entire site transforms — sidebar navigation, page titles, and content all render in the selected language.
Changes
Infrastructure:
github-pagesgem to Jekyll 4 +jekyll-polyglot(required since Polyglot is not a whitelisted GitHub Pages plugin)docs.yml) for custom Jekyll build with Ruby setup and bundler cache_includes/header_custom.htmllang: enfrontmatter to all 10 English pages_config.yml(languages: en/fr, exclude assets from localization)French translations (10 pages):
widgets.mdtranslated from scratch (no existing PR)docs/fr/with matching permalinksHow it works
/for English,/fr/for French)Adding more languages
docs/<lang>/directory mirroring the English structurelang: <code>and matchingpermalink:frontmatter to each pagelanguages:in_config.ymlheader_custom.htmlCloses the language support request from PR #83.