Add translations setup#20
Conversation
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/a72a4fa7-534f-4313-8fff-989a4f4eec5e Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…ce in prepare Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/22650f24-fed8-48df-870d-6d2777a9e279 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/3ab50848-fa91-4a70-a81c-8eac790c6904 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…pace parse error Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/26f2978c-3a6a-46a2-a47d-9748069226ea Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…latex_engine override Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/1fd2e033-293a-45c6-93d8-06b89a3f10a8 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…nslation files Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/83105c4e-e0e6-47ff-8974-744ccb96b270 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…n Sphinx version Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/207833af-6022-4aed-bf78-59b3741731d5 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/f0fb8aea-7cf2-4fdf-99b7-d83d3745c980 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/307e8acc-650b-42e6-a2e9-e39842abeade Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/3e456ad8-89a6-444b-b3d2-38913d2e7c37 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/2611dcc8-d8af-4048-8b27-a106eff342f0 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…ja luaotfload packages Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/1260f0b8-d528-44d5-a046-1241a8aec3fe Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 057be18d98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…how it works Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/e2ac249b-d85c-4bb8-a859-73da4bbb285b Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…ix=False) Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/f702db87-f295-4b02-8155-318f2ac25d0b Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd5dfb615e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rwrites Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/dec1a8ed-0cc9-42c4-bc71-e4d02fa3b64a Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…ies" This reverts commit 551b615.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 551b615946
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… language Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/cd79b93b-6d1a-4eff-a490-a298f00eb5a4 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…inor> Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/45f4f268-2d71-465b-ab7b-04153e4758b8 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5d68dc403
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| artifacts = Path("artifacts") | ||
| site = Path("_site") | ||
| name_re = re.compile( | ||
| r"^python-(\d+\.\d+)[\d.]*(?:-(?!docs|pdf)([a-zA-Z][a-zA-Z0-9_-]*))?-(?:docs|pdf)" |
There was a problem hiding this comment.
Parse language tag correctly for translated PDF artifacts
The artifact regex here allows hyphens inside the language capture, so translated PDF names like python-3.14.0-fr-docs-pdf-a4.zip are parsed with language fr-docs (the capture greedily consumes -docs and leaves -pdf for the suffix). That sends translated PDFs to _site/fr-docs/<version>/ instead of _site/fr/<version>/, so PDF downloads are missing from the expected language directory.
Useful? React with 👍 / 👎.
| artifacts = Path("artifacts") | ||
| site = Path("_site") | ||
| name_re = re.compile( | ||
| r"^python-(\d+\.\d+)[\d.]*(?:-(?!docs|pdf)([a-zA-Z][a-zA-Z0-9_-]*))?-(?:docs|pdf)" |
There was a problem hiding this comment.
Accept prerelease dist versions when routing artifacts
This pattern only allows [\d.]* after <major.minor>, so filenames that include prerelease suffixes (for example python-3.16.0a0-docs-html.zip) do not match and are skipped. Because the matrix includes non-EOL/non-planned branches, prerelease branches can still be built, and their artifacts will never be copied into _site when the dist version contains a, b, or rc markers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
We don't expect prerelease suffixes, 3.11+ returns major.minor always.
| if not link.exists() and not link.is_symlink(): | ||
| link.symlink_to(Path("en") / version_dir.name) |
There was a problem hiding this comment.
Replace existing bare-version paths during compatibility setup
The compatibility symlink is only created when a bare version path does not already exist. On migration runs, _site/<major_minor> already exists from the previous layout, so this condition skips it while new artifacts are now written to _site/en/<major_minor>. As a result, old URLs like /3.14/ keep serving stale content instead of tracking the newly published English artifacts.
Useful? React with 👍 / 👎.
…tifact regex Agent-Logs-Url: https://github.com/m-aciek/python-docs-offline/sessions/7cf2716e-7fd0-4fec-8e64-ee88acb4f0a2 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1810ec4717
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| artifacts = Path("artifacts") | ||
| site = Path("_site") | ||
| name_re = re.compile( | ||
| r"^python-(\d+\.\d+)[\d.]*(?:-(?!docs|pdf)([a-zA-Z][a-zA-Z0-9_]*))?-(?:docs|pdf)" |
There was a problem hiding this comment.
Accept prerelease versions when parsing artifact filenames
This regex only permits digits and dots after X.Y, so filenames like python-3.15.0a1-docs-html.zip (the normal format for docs built from main/prerelease branches) fail to match and are silently skipped in the copy loop. Because get-versions includes non-planned/non-end-of-life releases, prerelease branches are part of the matrix, so their artifacts will not be published at all.
Useful? React with 👍 / 👎.
| if not link.exists() and not link.is_symlink(): | ||
| link.symlink_to(Path("en") / version_dir.name) |
There was a problem hiding this comment.
Replace existing bare version dirs with compatibility symlinks
The compatibility step only creates _site/<major.minor> -> en/<major.minor> links when the bare path does not already exist. On existing deployments, _site/<major.minor> is already a real directory from the previous layout, so no symlink is created and those legacy URLs keep serving stale artifacts while new builds are written only under _site/en/<major.minor>.
Useful? React with 👍 / 👎.
Packages needed for Japanese PDF: python/docsbuild-scripts#149 (comment)