feat(docs): support all GitHub documentation languages - #14
Merged
Merged
Conversation
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.
Description
Documentation retrieval previously accepted English pages only. Add
languagetolist_docsandsearch_docs, and infer the language forget_docfrom its slug or URL. All nine current GitHub Docs languages are supported; English remains the default.Missing translations return an explicit error with a separate English call when a matching page is known. Catalogues, refresh failures and fallback search are isolated by language while page and disk cache budgets remain shared. Non-English listings expose slugs without substituting English titles. Unicode snippets and heading retrieval preserve source bytes through pagination.
Review Focus
internal/docs/languages.gofor language selection, cache keys and English alternatives, then the locale guards inclient.goandapisearch.go.Test Procedure
mise run check: lint, formatting, module checks, pinned vulnerability checker and shuffled race tests passed.mise run test:integration: live stdio MCP exchanges againstdocs.github.compassed in all nine languages. Reconstructed long pages matched independently fetched upstream bytes; non-English bodies differed from English.actionsfilter without duplicate slugs, fetched two native-query search results per language, followed every page and section continuation, selected localized headings and replayed page/catalogue cursors after process restart with disk-cache evidence.Live results for the reviewed implementation:
en)es)ja)pt)zh)ru)fr)ko)de)Each language also returned 245 entries under the
actionsfilter. Article bodies were sampled; this does not establish correctness for every translation. Missing-translation alternatives and induced outages were tested against controlled origins.Pre-flight Checklist
Additional Notes
Cursor format advances to version 2 because preserving source line endings changes selection offsets. Version 1 continuations return a restart error; initial tool calls and existing English cache entries remain supported.
GitHub can omit
Content-Language. The server rejects declared mismatches and cross-language redirects but relies on upstream routing when no language is declared; it does not classify prose language. Draft pending maintainer validation.