Repository navigation
Create current_lang and compile the catalogs in conf.py, not in the Makefile - #1764
Merged
Merged
Conversation
`setup()` already writes into `build/<language>/`, so it can create the symlink beside it, and remove it once the build finishes. This drops the Make prerequisite from every build, extract and linkcheck target. include/common.mk is synced from standard_profile_template, where the same change is on the `current-lang` branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL (cherry picked from commit a24d2b192c40648b0e40bc113fe9cb68a5d32856)
…he Makefile `setup()` already reads the compiled catalogs through `translate`, and knows which language is being built, so it can compile that language's catalogs first. The Makefile compiled every language's up front. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL (cherry picked from commit 2437a3b43408225ae87a6e5c2a1a3053c85afc70)
include/common.mk is synced from standard_profile_template, where the same change is on the `current-lang` branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UAeUtu5XGYmmSwtyjVU7gL
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.
Moves two Make targets into
docs/conf.py, for phase 2 of open-contracting/deploy#266 (comment): the build becomes plainsphinx-build, runnable on any CI or host.This is now blocking.
standard_profile_template@latesthas already dropped both targets frominclude/common.mk, so the nextscript/updatehere would pull acommon.mkwith nocurrent_langtarget whileconf.pyhas no replacement — and 27 files refer tobuild/current_lang, so the build would fail.current_lang. A symlink so thatbuild/current_langpaths in directives resolve to the language being built.setup()already writes intobuild/<language>/, so it creates the symlink beside it and removes it onbuild-finished.compile.config.mkranpybabel compilefor every language up front.conf.pycompiles only the language being built, and only the domainstranslatereads. That empties the hook, socommon.mkdrops it andconfig.mkdrops the target — one mechanism instead of two.English is the source language and has no catalogs, so the call is guarded with
if language != "en", matching the default on the line that setslanguage. The guard is deliberately at the call site rather than inside the helper: a translated language missing a catalog is an error, and now fails loudly. Verified by deletingdocs/locale/es— the Spanish build stops withFileNotFoundError: .../es/LC_MESSAGES/schema.po, where apath.is_file()guard inside the helper would have silently shipped untranslated pages.The same three commits as #1763, cherry-picked onto
1.2-devso that 1.2 doesn't ship without them. #1763 is the one that reaches the live documentation.include/common.mkis synced fromstandard_profile_templateand is byte-identical to it and to the six other documentation repositories.Verified
make source,esandfrall pass under-nW, producing 63 pages per language, with nobuild/current_langleft behind.compile_catalogswas checked differentially, not by deleting.mofiles — that proves nothing, because Sphinx'sgettext_auto_buildrecompiles them. With it, the Spanish schema reference renders 3 translated strings; without it, 0.🤖 Generated with Claude Code