Repository navigation
Conversation
Documentation build overview
137 files changed ·
|
Why is that? If it's not too complicated I'd prefer to fix the extraction so that we can avoid the data attribute indirection and also have other JS strings added in the future work as well. |
|
I've tried it before and IIUC Sphinx has no native support so this is unfeasible without convoluted hacks. |
|
I've opened an alternative draft pull request: #338. I initially thought adding support for generating JavaScript translation catalogs was a bit much for just three strings, but I don't feel strongly either way. |
|
Sphinx itself has a utility which generates also JS translations catalog, but it doesn't expose it. I was about to create a feature request to Sphinx asking to make it public, but did an LLM-assisted research first on how other projects manage this. I didn't find a project which does what we do in #338, all do different workarounds. Maybe it's an argument for creating a feature request in Sphinx, rather than against -- not sure. Either way I'm now convinced that I would like to proceed with #338 rather than this, at least for science :). The research result table:
|
The Babel runner doesn't generate JavaScript translation catalogs. Rather than adding that step, move the labels to
layout.htmlso they can use the existing theme translation machinery.Also remove JavaScript extraction from
.babel.cfg, since the theme's JavaScript files no longer contain translatable strings.