Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

eval_rst block doesn't internationalize #47

Closed
Bjwebb opened this issue Jun 2, 2016 · 1 comment
Closed

eval_rst block doesn't internationalize #47

Bjwebb opened this issue Jun 2, 2016 · 1 comment

Comments

@Bjwebb
Copy link
Contributor

Bjwebb commented Jun 2, 2016

E.g. for https://github.com/Bjwebb/recommonmark-i18n-bug/blob/gh-pages/docs/index.md the messages I get pulled out by sphinx-build -b gettext are https://github.com/Bjwebb/recommonmark-i18n-bug/blob/gh-pages/_build/locale/index.pot - the content from the eval_rst block is missing.

(This also used to be an issue for bullet points, but is now fixed, see #21)

kindly added a commit to kindly/recommonmark that referenced this issue Aug 25, 2016
At the moment it is passing source as node.rawsource.  This is always
going to be the empty string as it is getting it from a newly created
node.

This patch saves a reference to the original node and parses down the
correct source.  This patch along with readthedocs#52 means that eval_rst blocks will
internationalize correctly fixing [readthedocs#47].  Sphinx will not translate
nodes with a blank source.
Bjwebb pushed a commit to OpenDataServices/recommonmark that referenced this issue Jul 13, 2017
At the moment it is passing source as node.rawsource.  This is always
going to be the empty string as it is getting it from a newly created
node.

This patch saves a reference to the original node and parses down the
correct source.  This patch along with readthedocs#52 means that eval_rst blocks will
internationalize correctly fixing [readthedocs#47].  Sphinx will not translate
nodes with a blank source.
Bjwebb pushed a commit to OpenDataServices/recommonmark that referenced this issue Jul 13, 2017
At the moment it is passing source as node.rawsource.  This is always
going to be the empty string as it is getting it from a newly created
node.

This patch saves a reference to the original node and parses down the
correct source.  This patch along with readthedocs#52 means that eval_rst blocks will
internationalize correctly fixing [readthedocs#47].  Sphinx will not translate
nodes with a blank source.
@Bjwebb
Copy link
Contributor Author

Bjwebb commented Oct 6, 2019

This is fixed for the latest versions of Sphinx and recommonmark.

Here's the output of pip freeze:

alabaster==0.7.12
Babel==2.7.0
certifi==2019.9.11
chardet==3.0.4
commonmark==0.9.1
docutils==0.15.2
idna==2.8
imagesize==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
packaging==19.2
pkg-resources==0.0.0
Pygments==2.4.2
pyparsing==2.4.2
pytz==2019.2
recommonmark==0.6.0
requests==2.22.0
six==1.12.0
snowballstemmer==2.0.0
Sphinx==2.2.0
sphinxcontrib-applehelp==1.0.1
sphinxcontrib-devhelp==1.0.1
sphinxcontrib-htmlhelp==1.0.2
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.2
sphinxcontrib-serializinghtml==1.1.3
urllib3==1.25.6

@Bjwebb Bjwebb closed this as completed Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant