[DOCS] Add Chinese version of the SpatialBench website#100
Merged
Conversation
Add `mkdocs-static-i18n` plugin configuration with English (default) and Chinese (`zh`) locales, mirroring the setup used by the main Apache Sedona docs. Provide `.zh.md` translations for every page currently in the site navigation and translate navigation labels via `nav_translations`. Closes #97
The mkdocs-static-i18n plugin emits a warning when the Material theme has navigation.instant enabled, because the plugin's contextual language-switcher link (to the equivalent page in the other language) is not compatible with the instant XHR navigation. The repo's docs CI runs `mkdocs build --strict`, so the warning aborts the build. Removing navigation.instant silences the warning, keeps --strict in CI, and also fixes the language switcher so it lands on the equivalent translated page rather than the other locale's root.
mkdocs-static-i18n emits a known warning when combined with the Material theme's navigation.instant feature. Rather than dropping navigation.instant (reverting the previous commit), match the Apache Sedona main repo's docs workflow which uses plain `mkdocs build`.
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
mkdocs-static-i18nplugin configuration with English (default) and Chinese (zh) locales, mirroring the setup used by the main Apache Sedona docs site (the文Alanguage switcher)..zh.mdtranslations for every page currently in the site navigation:index,quickstart,overview-methodology,queries,datasets-generators,spatialbench-distributions,single-node-benchmarks,contributors-guide,release-notes.nav_translations.mkdocs-static-i18ntodocs/requirements.txt.Closes #97
Test plan
mkdocs buildcompletes cleanly; bothsite/(English) andsite/zh/(Chinese) are generated.<link rel="alternate" hreflang="...">tags are emitted for both locales.datasets-generators.zh.mdinto thequickstart.zh.mdS3 section resolves to a valid anchor.Notes
mkdocs-static-i18nemits a warning that its contextual language-switcher link is incompatible withtheme.features = navigation.instant. The main Apache Sedona site has the same setup, so this PR preserves it for consistency. The switcher takes the user to the other language's site root rather than the equivalent page.A longer-term migration (e.g. to Zensical or Quarto, as discussed in the issue) is out of scope here — this PR delivers the Chinese content on the existing mkdocs-material stack.