From defe8a77162f435d19cd04da79c5de77b45b1ade Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 10 Oct 2026 00:18:08 -0400 Subject: [PATCH 1/6] i18n: Correct two link targets, and translate "Added in version" --- docs/locale/es/LC_MESSAGES/guidance/map/localization.po | 4 ++-- docs/locale/es/LC_MESSAGES/history/changelog.po | 2 +- docs/locale/es/LC_MESSAGES/sphinx.po | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/locale/es/LC_MESSAGES/guidance/map/localization.po b/docs/locale/es/LC_MESSAGES/guidance/map/localization.po index 59a35186d..3576a4c8d 100644 --- a/docs/locale/es/LC_MESSAGES/guidance/map/localization.po +++ b/docs/locale/es/LC_MESSAGES/guidance/map/localization.po @@ -348,8 +348,8 @@ msgid "" msgstr "" "El equipo de desarrollo del estándar de OCDS mantiene las traducciones " "**admitidas** de acuerdo a la [política de traducción y " -"localización](../../governance/index.md#translation-and-localization-" -"policy). Los voluntarios contribuyen con traducciones **comunitarias.**" +"localización](../../governance/translation). Los voluntarios contribuyen " +"con traducciones **comunitarias.**" #: ../../docs/guidance/map/localization.md:79 msgid "" diff --git a/docs/locale/es/LC_MESSAGES/history/changelog.po b/docs/locale/es/LC_MESSAGES/history/changelog.po index 7a2399215..fb921a2dd 100644 --- a/docs/locale/es/LC_MESSAGES/history/changelog.po +++ b/docs/locale/es/LC_MESSAGES/history/changelog.po @@ -1657,7 +1657,7 @@ msgid "" "upgrades." msgstr "" "[#401](https://github.com/open-contracting/standard/issues/401) **[Política " -"de descontinuación](../schema/conformance_and_extensions/)** - La política " +"de descontinuación](../schema/conformance_and_extensions)** - La política " "de descontinuación ha sido actualizada para soportar la descontinuación en " "las actualizaciones decimales." diff --git a/docs/locale/es/LC_MESSAGES/sphinx.po b/docs/locale/es/LC_MESSAGES/sphinx.po index c390514c6..cedcb9d59 100644 --- a/docs/locale/es/LC_MESSAGES/sphinx.po +++ b/docs/locale/es/LC_MESSAGES/sphinx.po @@ -47,3 +47,7 @@ msgstr "Idioma" #: ../../docs/_templates/layout.html:31 msgid "Supported translations" msgstr "Traducciones soportadas" + +#, python-format +msgid "Added in version %s" +msgstr "Añadido en la versión %s" From 3a6f2d6b904759791903495acc6053f1618fa7de Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 10 Oct 2026 00:18:21 -0400 Subject: [PATCH 2/6] build: Match the Google Sheets CSV URL in linkcheck_ignore --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 22094f5dd..617866282 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -111,7 +111,7 @@ # Ignore unwanted links created by linkify. r"^http://vnd\.", # Ignore expected redirects. - r"^https://docs.google.com/spreadsheets/d/[^/]+/pub?gid=\d+&single=true&output=csv$", + r"^https://docs\.google\.com/spreadsheets/d/e/[^/]+/pub\?gid=\d+&single=true&output=csv$", ] From 6cd4490c5cb0310014f001430581e4265ba99d24 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 10 Oct 2026 00:35:34 -0400 Subject: [PATCH 3/6] build: Upgrade to Sphinx 9.1, MyST-Parser 5.1 and docutils 0.22 - Update the template's files (script/update). - Upgrade sphinx-design to 0.7.0 and sphinxcontrib-opencontracting to 0.0.11. - Set myst_heading_slug_func as a string, so that Sphinx can cache the configuration. - Restore MyST's heading slugs after translated titles overwrite them (executablebooks/MyST-Parser#844). - Stop suppressing myst.anchor warnings, which no longer occur. - Match Sphinx 9's search results message, and test the Spanish and French search pages again. --- common-requirements.txt | 42 ++++++++++++++++++++--------------------- docs/conf.py | 18 ++++++++++++++---- requirements.txt | 4 ++-- tests/__init__.py | 7 +++---- tests/test_common.py | 2 +- 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/common-requirements.txt b/common-requirements.txt index 1ed5edfd6..f3918cae3 100644 --- a/common-requirements.txt +++ b/common-requirements.txt @@ -1,8 +1,8 @@ # This file was autogenerated by uv via the following command: # uv pip compile common-requirements.in -o common-requirements.txt -alabaster==0.7.12 +alabaster==1.0.0 # via sphinx -anyio==4.4.0 +anyio==4.14.2 # via # elasticsearch # starlette @@ -37,7 +37,7 @@ click==8.1.3 # uvicorn colorama==0.4.6 # via sphinx-autobuild -docutils==0.18 +docutils==0.22.4 # via # myst-parser # sphinx @@ -45,7 +45,7 @@ docutils==0.18 # sphinxcontrib-opendataservices-jsonschema elastic-transport==9.2.1 # via elasticsearch -elasticsearch[requests]==9.3.0 +elasticsearch==9.3.0 # via ocdsindex h11==0.16.0 # via @@ -81,23 +81,23 @@ jsonref==1.0.0.post1 # jscc # ocdsextensionregistry # sphinxcontrib-opendataservices-jsonschema -linkify-it-py==1.0.1 +linkify-it-py==2.2.0 # via -r common-requirements.in lxml==6.1.0 # via ocdsindex -markdown-it-py==2.2.0 +markdown-it-py==4.2.0 # via # mdit-py-plugins # myst-parser markupsafe==2.1.1 # via jinja2 -mdit-py-plugins==0.3.1 +mdit-py-plugins==0.6.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py mypy-extensions==1.1.0 # via trio-typing -myst-parser==0.18.1 +myst-parser==5.1.0 # via # -r common-requirements.in # sphinxcontrib-opendataservices @@ -144,6 +144,8 @@ requests==2.33.0 # sphinx requests-cache==1.1.0 # via ocdsextensionregistry +roman-numerals==4.1.0 + # via sphinx rpds-py==2026.6.3 # via referencing selenium==4.40.0 @@ -154,30 +156,29 @@ six==1.16.0 # url-normalize sniffio==1.3.1 # via - # anyio # elastic-transport # elasticsearch # trio -snowballstemmer==2.1.0 +snowballstemmer==3.1.1 # via sphinx sortedcontainers==2.4.0 # via trio -sphinx==5.3.0 +sphinx==9.1.0 # via # -r common-requirements.in # myst-parser # sphinx-autobuild # sphinx-intl # sphinxcontrib-opendataservices -sphinx-autobuild==2024.9.3 +sphinx-autobuild==2025.8.25 # via -r common-requirements.in -sphinx-intl==2.2.0 +sphinx-intl==2.4.0 # via -r common-requirements.in -sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-applehelp==2.0.0 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==2.0.0 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.1.0 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx @@ -187,9 +188,9 @@ sphinxcontrib-opendataservices-jsonschema==0.7.1 # via # -r common-requirements.in # sphinxcontrib-opendataservices -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==2.0.0 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==2.0.0 # via sphinx starlette==1.3.1 # via sphinx-autobuild @@ -209,14 +210,11 @@ types-urllib3==1.26.25.14 typing-extensions==4.15.0 # via # elasticsearch - # myst-parser # selenium # trio-typing -uc-micro-py==1.0.1 - # via linkify-it-py url-normalize==1.4.3 # via requests-cache -urllib3[socks]==2.7.0 +urllib3==2.8.0 # via # elastic-transport # requests diff --git a/docs/conf.py b/docs/conf.py index 617866282..8a7984fa8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,6 @@ from babel.messages.mofile import write_mo from babel.messages.pofile import read_po -from docutils.nodes import make_id from ocds_babel.translate import translate from ocdskit.mapping_sheet import mapping_sheet from sphinx.locale import get_translation @@ -69,9 +68,7 @@ # MyST configuration. myst_enable_extensions = ["linkify"] myst_heading_anchors = 6 -myst_heading_slug_func = make_id -# https://github.com/executablebooks/MyST-Parser/issues/357 -suppress_warnings = ["myst.anchor"] +myst_heading_slug_func = "docutils.nodes.make_id" # Theme customization. navigation_with_keys = False # restore the Sphinx default @@ -125,7 +122,20 @@ def compile_catalogs(localedir, language, domains): write_mo(f, catalog, use_fuzzy=True) +def restore_myst_slugs(app, doctree): + """Restore the page's heading slugs, which MyST overwrites when parsing a translated title.""" + # https://github.com/executablebooks/MyST-Parser/issues/844 + slugs = getattr(doctree, "myst_slugs", None) + metadata = app.env.metadata[app.env.docname] + if slugs: + metadata["myst_slugs"] = slugs + else: + metadata.pop("myst_slugs", None) + + def setup(app): + app.connect("doctree-read", restore_myst_slugs) + # The root of the repository. basedir = Path(__file__).resolve().parents[1] # `LOCALE_DIR` from `config.mk`. diff --git a/requirements.txt b/requirements.txt index ec8f625cd..3e9241749 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,5 @@ # Add your own requirements below. ocdskit==1.3.0 -sphinx-design==0.4.1 -sphinxcontrib-opencontracting==0.0.8 +sphinx-design==0.7.0 +sphinxcontrib-opencontracting==0.0.11 diff --git a/tests/__init__.py b/tests/__init__.py index 29bd6731d..3cbbac3fb 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,8 +11,7 @@ } test_search_params = [ - ("en", r"found \d+ page\(s\) matching"), - # See https://github.com/sphinx-doc/sphinx/issues/11008 - # ('es', r'encontraron \d+ páginas que coinciden'), # noqa: ERA001 - # ('fr', r'\d+ page\(s\) correspondant'), # noqa: ERA001 + ("en", r"found \d+ pages matching"), + ("es", r"encontraron \d+ páginas que coinciden"), + ("fr", r"\d+ pages correspondant"), ] diff --git a/tests/test_common.py b/tests/test_common.py index 417759f17..6e3de23aa 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -26,7 +26,7 @@ def test_search(browser, server, lang, regex): # This seems to be an issue in Selenium and/or ChromeDriver. @pytest.mark.filterwarnings("ignore:unclosed Date: Sat, 10 Oct 2026 01:01:12 -0400 Subject: [PATCH 4/6] i18n: Move the translations of hard-break paragraphs to the messages that MyST 5 extracts --- docs/locale/es/LC_MESSAGES/primer/how.po | 54 +++++++++++++++--------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/docs/locale/es/LC_MESSAGES/primer/how.po b/docs/locale/es/LC_MESSAGES/primer/how.po index 35af562ef..17affd9b2 100644 --- a/docs/locale/es/LC_MESSAGES/primer/how.po +++ b/docs/locale/es/LC_MESSAGES/primer/how.po @@ -78,11 +78,16 @@ msgstr "Licitación" #: ../../docs/primer/how.md:32 msgid "" -"**Tender**\\ *Including:*\\ Tender notices\\ Specifications\\ Line items\\ " -"Values\\ Enquiries" +"**Tender** *Including:* Tender notices Specifications Line items Values " +"Enquiries" msgstr "" -"**Licitación**\\ *Incluye:*\\ Avisos de licitación\\ Especificaciones\\ " -"Partidas\\ Valores\\ Consultas" +"**Licitación**\\\n" +"*Incluye:*\\\n" +"Avisos de licitación\\\n" +"Especificaciones\\\n" +"Partidas\\\n" +"Valores\\\n" +"Consultas" #: ../../docs/primer/how.md:44 msgid "![Award](../_static/svg/green_awarded.svg)" @@ -94,11 +99,15 @@ msgstr "Adjudicación" #: ../../docs/primer/how.md:46 msgid "" -"**Award**\\ *Including:*\\ Details of award\\ Bidder information\\ Bid " -"evaluation\\ Values" +"**Award** *Including:* Details of award Bidder information Bid evaluation" +" Values" msgstr "" -"**Adjudicación**\\ *Incluye:*\\ Detalles del adjudicación\\ \"Información " -"del licitante\\ Evaluación de la oferta\\ Valores" +"**Adjudicación**\\\n" +"*Incluye:*\\\n" +"Detalles del adjudicación\\\n" +"Información del licitante\\\n" +"Evaluación de la oferta\\\n" +"Valores" #: ../../docs/primer/how.md:57 msgid "![Contract](../_static/svg/green_signed.svg)" @@ -109,12 +118,14 @@ msgid "Contract" msgstr "Contrato" #: ../../docs/primer/how.md:59 -msgid "" -"**Contract**\\ *Including:*\\ Final details\\ Signed contract\\ Amendments\\" -" Values" +msgid "**Contract** *Including:* Final details Signed contract Amendments Values" msgstr "" -"**Contrato**\\ *Incluye:*\\ Detalles finales\\ Contrato firmado\\ " -"Enmiendas\\ Valores" +"**Contrato**\\\n" +"*Incluye:*\\\n" +"Detalles finales\\\n" +"Contrato firmado\\\n" +"Enmiendas\\\n" +"Valores" #: ../../docs/primer/how.md:70 msgid "![Implementation](../_static/svg/green_implementation.svg)" @@ -126,12 +137,17 @@ msgstr "Implementación" #: ../../docs/primer/how.md:72 msgid "" -"**Implementation**\\ *Including:*\\ Payments\\ Progress updates\\ Location\\" -" Extensions\\ Amendments\\ Completion or Termination info" -msgstr "" -"**Implementación**\\ *Incluye:*\\ Pagos\\ Actualizaciones de progreso\\ " -"Ubicación\\ Extensiones\\ Enmiendas\\ Información de finalización o " -"terminación" +"**Implementation** *Including:* Payments Progress updates Location " +"Extensions Amendments Completion or Termination info" +msgstr "" +"**Implementación**\\\n" +"*Incluye:*\\\n" +"Pagos\\\n" +"Actualizaciones de progreso\\\n" +"Ubicación\\\n" +"Extensiones\\\n" +"Enmiendas\\\n" +"Información de finalización o terminación" #: ../../docs/primer/how.md:87 msgid "" From 6ffe1be04fc15ce82073fec159e3f167b0a5662e Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 10 Oct 2026 09:44:10 -0400 Subject: [PATCH 5/6] test: Ignore the French search message in codespell --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 3cbbac3fb..8043dbf51 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -13,5 +13,5 @@ test_search_params = [ ("en", r"found \d+ pages matching"), ("es", r"encontraron \d+ páginas que coinciden"), - ("fr", r"\d+ pages correspondant"), + ("fr", r"\d+ pages correspondant"), # codespell:ignore ] From 807e60dcb38b4b82f09196a8a48cd5af481a4878 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sat, 10 Oct 2026 09:47:23 -0400 Subject: [PATCH 6/6] test: Match the theme's capitalized English search message --- tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__init__.py b/tests/__init__.py index 8043dbf51..d72d061de 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,7 +11,7 @@ } test_search_params = [ - ("en", r"found \d+ pages matching"), + ("en", r"Found \d+ pages matching"), ("es", r"encontraron \d+ páginas que coinciden"), ("fr", r"\d+ pages correspondant"), # codespell:ignore ]