You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Sphinx button disappears in translated content #664
When you create a button in Sphinx, it renders well. However, if you try to translate the content and vie wthe translated content, the button disappears - see images below
packaging guide in english:
packaging guide translated into japanese
this seems to be an issue with buttons specifically.
@sneakers-the-rat do you have any guesses as to why a translated page would drop the <a> and css and it converts the button to a <p> ? It's a fairly odd bug.
then it works with the translations (but you need to update the .po files because the line numbers change slightly)
I think the longerterm fix is to ping the executablebooks folks on that open issue, monkeying around with docutils internals is above my paygrade/too frustrating for me to consider lol
Alright I am distractable today and I was curious why this would happen so I started reading how the sphinx gettext builder works so I'll work on a patch for this since I'd like to learn how to make sphinx things localizable
Activity
lwasser commentedon May 19, 2026
@sneakers-the-rat do you have any guesses as to why a translated page would drop the
<a>and css and it converts the button to a<p>? It's a fairly odd bug.sneakers-the-rat commentedon May 19, 2026
no, that's weird, let me take a look
sneakers-the-rat commentedon May 19, 2026
reported in 2022 executablebooks/sphinx-design#6 (comment)
still open: executablebooks/sphinx-design#96
sneakers-the-rat commentedon May 19, 2026
there is allegedly some fix here, but it doesn't work for me - executablebooks/sphinx-design#175
but what i can confirm works is that if you just do the HTML manually and then update the .po files that it works fine.
i.e. instead of
you do
then it works with the translations (but you need to update the .po files because the line numbers change slightly)
I think the longerterm fix is to ping the executablebooks folks on that open issue, monkeying around with docutils internals is above my paygrade/too frustrating for me to consider lol
sneakers-the-rat commentedon May 19, 2026
Alright I am distractable today and I was curious why this would happen so I started reading how the sphinx gettext builder works so I'll work on a patch for this since I'd like to learn how to make sphinx things localizable
sneakers-the-rat commentedon May 19, 2026
got it!!! i think!!! executablebooks/sphinx-design#264