Repository navigation
site: add a Spanish translation of the landing and downloads pages - #47
Merged
Merged
Conversation
The site's audience for the downloads page is Chicago Offline neighbours picking up a prebuilt codeplug, not developers, and a large share of Chicagoland is Spanish-dominant. The CLI stays English-only: its users are operators already reading YAML and CHIRP in English, and its messages are what gets pasted into issues. The Spanish tree mirrors the English one under site/es/, so relative links work the same from either side: - site/es/index.html is a hand-maintained translation of site/index.html. gen_radio_table.py now fills the radio table in every page listed in PAGES, translating only the handful of strings it emits itself (sr labels, the hw badge title, the codeplug link). --check covers both. - build_site_artifacts.py renders the downloads page once per language. The artifacts themselves are published once, under codeplugs/; the es/codeplugs/ page links back across to them. Source name/description come from an optional per-language "i18n" block in codeplug-sources.json and fall back to the English text. - Both pages carry a language switch in the header plus canonical and hreflang alternates; x-default is English. Radio names, format names, and channel/zone labels are deliberately not translated: those appear on the radio and must match what is used on-air.
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.
Adds
/es/as a mirror of the English site tree, with a language switch in the header andhreflangalternates on both pages.Scope
site/es/index.html: hand-maintained Spanish translation of the landing page.tools/gen_radio_table.pyfills the radio table in every page listed inPAGES(translating only the few strings it emits itself) and--checkcovers both.tools/build_site_artifacts.py: renders the downloads page once per language. Artifacts are published once undercodeplugs/;es/codeplugs/index.htmllinks across to them. Source name/description come from an optional per-languagei18nblock insite/codeplug-sources.json, falling back to English.Verified locally
build_site_artifacts.pyrun against the sibling checkouts; servedsite/over HTTP and confirmed/es/,/es/codeplugs/, the cross-tree download links, and the language switch on all four pages resolve.