Description
Description
In the French documentation, the cards of grid-item-card grids show no octicon in their title, whereas the English cards do. This affects the home page and the main section pages, e.g. on the published site https://datalab-platform.com/fr/ (3 cards out of 3 have an icon in English, none in French).
In a local build, cards with an icon in English and in French:
| Page | English | French |
|---|---|---|
index |
5 | 0 |
contributing/index |
7 | 0 |
features/advanced/plugins |
7 | 0 |
intro/ecosystem |
7 | 5 |
intro/index |
6 | 1 |
use_cases/index |
3 | 0 |
The few French cards that keep their icon have an untranslated title (empty msgstr).
Steps to reproduce
- Build the French documentation:
python -m sphinx build doc build/doc -b html -D language=fr. - Open the home page, or the Getting started, Use cases or Contributing page.
Expected behavior
Translated card titles show the same octicon as the English ones.
Cause
sphinx-design converts the :octicon: role of a card title into raw SVG before the gettext extraction, so the msgid of a card title starts with the generated <svg ...></svg>. The translation convention of .github/instructions/translations.instructions.md requires translating these titles without the icon, so the msgstr replaces the whole title, icon included.
Proposed change
Find a way to keep the icon of translated card titles, e.g. check whether a msgstr keeping the generated SVG (or the :octicon: role) renders correctly, or move the icon out of the translatable title. Then update the catalogs and the translation convention accordingly.
Found while validating #521.
Activity
docs(i18n): stabilize card icon keys across sphinx-design versions
PierreRaybaut commentedon Nov 13, 2026
Fixed by #555 (merged into develop). Shared reST icon substitutions preserve the icons and give stable gettext keys with sphinx-design 0.7 and 0.8; documentation CI now checks English/French card-title SVGs.