Hello Yaroslav, I think there is no direct way. Such a tool is on Docutil's todo list too ( https://docutils.sourceforge.io/docs/user/tools.html#restructuredtext-generating-tools). Just the idea that might help you:
- Build your Sphinx to Docutils XML ( https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.xml.XMLBuilder). For example, if you have French localization (fr), then sphinx-build -b xml source_dir output_dir -D language="fr" in your project root. - Use Docutils's tool "xml2rst" https://docutils.sourceforge.io/sandbox/xml2rst/ If you succeed, let me know. On Mon, Apr 27, 2020 at 12:17 PM Yaroslav Nikitenko <[email protected]> wrote: > How can I get translated .rst (or markdown) files? > > I'm writing a project documentation in Sphinx. > > I want to make translations of my .rst files, and I generated and > translated .po files. > > Sphinx generates html translations fine, but I want to have .rst or > markdown full articles (to use them on another site). > > > Is it possible to recreate .rst or markdown files with translations from > these .po (or .mo) files? > > If there is no such option in Sphinx, maybe someone knows how it could be > done with gettext or Python? > > > I posted this question on stackoverflow, but there was no answer yet > > ( > https://stackoverflow.com/questions/61246851/how-to-make-translations-of-full-articles-from-po-files-in-sphinx-or-gettext > ) > > > Thank you. > > > Best regards, > > Yaroslav Nikitenko > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/fdf34636-ba94-4c18-8c32-ee81623935bc%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/fdf34636-ba94-4c18-8c32-ee81623935bc%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAOGNDW8LiCrnDx8RU6CyThxB3cnb9N3NyQ8J9hzk8P3CRZdvng%40mail.gmail.com.
