Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support translated notebooks #600

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OriolAbril
Copy link
Contributor

Closes #587. The issue points to the relevant sphinx source,
where it can be seen sphinx "marks" translated strings with <translated> at the
end of the source_path argument, which is then stored as the current_source attribute of
the docutils.nodes.document class, which is the second argument of Parser.parse.

This adds an extra condition to fall back to myst-parser which allows using myst-nb with translated
content.

It would be nice to add some test for this but I am not familiar enough with the test suite yet,
I'll try to add one in the coming days. It can probably reuse one of the existing notebooks,
but it will be necessary to add a locale folder with the translations, will it be ok to add
it directly in the tests folder?

So far I have only checked it works locally on a couple repos I had
(both executing and not executing notebooks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not work with Sphinx's internationalization workflow
1 participant