Skip to content

[DOCS] Add Chinese version of the SpatialBench website#100

Merged
jiayuasu merged 3 commits into
mainfrom
feature/chinese-docs
May 22, 2026
Merged

[DOCS] Add Chinese version of the SpatialBench website#100
jiayuasu merged 3 commits into
mainfrom
feature/chinese-docs

Conversation

@jiayuasu
Copy link
Copy Markdown
Member

Summary

  • Add mkdocs-static-i18n plugin configuration with English (default) and Chinese (zh) locales, mirroring the setup used by the main Apache Sedona docs site (the 文A language switcher).
  • Provide .zh.md translations for every page currently in the site navigation: index, quickstart, overview-methodology, queries, datasets-generators, spatialbench-distributions, single-node-benchmarks, contributors-guide, release-notes.
  • Translate navigation labels via nav_translations.
  • Add mkdocs-static-i18n to docs/requirements.txt.

Closes #97

Test plan

  • mkdocs build completes cleanly; both site/ (English) and site/zh/ (Chinese) are generated.
  • Language switcher renders with English / 中文 entries on every page; <link rel="alternate" hreflang="..."> tags are emitted for both locales.
  • Chinese nav labels (首页, 快速开始, 方法论, 查询, etc.) render correctly.
  • Cross-page link from datasets-generators.zh.md into the quickstart.zh.md S3 section resolves to a valid anchor.

Notes

mkdocs-static-i18n emits a warning that its contextual language-switcher link is incompatible with theme.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.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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`.
@jiayuasu jiayuasu merged commit d66a95a into main May 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Chinese version of the SpatialBench website

2 participants