docs: internationalize docs.atuin.sh - #3760
Closed
markovejnovic wants to merge 10 commits into
Closed
Conversation
Adds the mkdocs-static-i18n plugin in suffix mode with three locales (en default, zh, ru) so translated pages can live alongside their English source as *.zh.md / *.ru.md. English continues to build at the version root; fallback_to_default keeps zh/ru trees populated with English content until real translations land.
mkdocs-static-i18n rebuilds each extra locale by calling mkdocs' build() again against the same config object, so every plugin instance (and its mutable state) is reused across locales rather than reset. mkdocs-llmstxt keys its page cache on src_uri, which is identical across locales for any page served by the default-language fallback, but derives each entry's URL from dest_uri, which is locale-prefixed. Each nested build overwrote the English state with the next locale's URLs, so llms.txt / llms-full.txt ended up entirely pointing at whichever locale (ru) built last -- reproducible with zero translated files, so not a translation-content bug. docs/hooks/llmstxt_i18n.py makes llmstxt's on_files / on_page_content / on_post_build no-ops outside the default-language build pass, so its cache is only ever populated and flushed once, during the English pass. It has to swap the bound methods in config.plugins.events[...] directly: mkdocs binds plugin methods into that dispatch table when plugins load, so setting a new attribute on the plugin instance itself is silently ignored by the dispatcher. Also drops theme.features: navigation.instant(.prefetch/.progress). mkdocs-static-i18n logs an unconditional warning when that feature is enabled (its contextual language-switcher links aren't compatible with instant loading), and since each locale's nested build() call re-enters mkdocs' own --strict warning check, that warning aborted the locale loop before later locales (ru) ever built. Dropping the feature removes the warning at the source; mike deploy (which never passes --strict) was already unaffected either way.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
The __self__-identity check already makes the wrap idempotent: a method we replaced is the plain wrapper closure, which has no __self__ and fails the match on mkdocs' per-locale on_config re-runs. The marker was never read.
The Chinese README mirrored a years-old English README structure (212 lines vs the current 134) and was unmaintained. A stale translated landing page misleads more than the English one; drop it and its language toggle.
Both were inline-level (img default inline, .eyebrow inline-flex), so they shared one line instead of stacking; the logo's margin-bottom did nothing. Make each a block-level, auto-centered element.
The community/untranslated notices were admonition boxes in the content flow. Render them in Material's announce block instead -- the full-width bar at the very top, above the header -- and paint it to match the version outdated warning banner. Tight whitespace keeps English pages banner-free.
The untranslated banner linked to "Read in English" on a page already showing English fallback content -- nonsensical -- so drop the link. Add zh and ru translations of both notice strings so the banner speaks the reader's language; English remains the per-string fallback.
markovejnovic
marked this pull request as ready for review
July 28, 2026 22:29
Contributor
Greptile SummaryAdds Chinese and Russian MkDocs localization, translated-page notices, and an i18n-aware hook that keeps llms.txt English-only. Confidence Score: 5/5The PR appears safe to merge. The localization configuration, translated content moves, notice template, and llms.txt hook form a consistent documentation-build change with no concrete blocking failure identified. Important Files Changed
Reviews (1): Last reviewed commit: "docs: localize i18n banner text, drop re..." | Re-trigger Greptile |
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.
Uh oh!
There was an error while loading. Please reload this page.