On Wed, Jul 15, 2020, 12:21 PM Yaroslav Nikitenko <[email protected]> wrote:
> Dear Matt and Sphinx users, > > this issue was solved in xml2rst. We got in touch with its author and > he made an update (he also noted that his email on his site is not > much used today): > "My tests run and I just pushed V1.3.1 of xml2rst to the sandbox" > svn.code.sf.net/p/docutils/code/trunk/sandbox/xml2rst > or > > https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/sandbox/xml2rst/ > > I should also add that there appear many spurious space indentations > (even in headers). > They appear during creation of the xml file and can be deleted > manually with a good editor or script. > > Many thanks for your help! > > P.S. I will leave this mailing list in several days, so please include > my email if you want to write to me directly. > > Regards, > Yaroslav > > 2020-04-28 15:04 GMT+03:00, Yaroslav Nikitenko <[email protected]>: > > Thanks. No, I tried Python 3, but there was a syntax error. > > > > > > вт, 28 апр. 2020 г., 13:55 Matt from Documatt <[email protected]>: > > > >> It looks you are using Python 2. xml2rst is last updated in 2018 and > thus > >> maybe will work better in Python 3. But just an idea. It will probably > >> not > >> help you :-( > >> > >> Matt > >> > >> On Tue, Apr 28, 2020 at 12:23 PM Yaroslav Nikitenko <[email protected]> > >> wrote: > >> > >>> Hello Matt, > >>> > >>> many thanks for your detailed suggestion. > >>> > >>> I created xml, but failed to run xml2rst (it prints > >>> ... File "/usr/lib/python2.7/site-packages/xml2rstlib/markup.py", line > >>> 61, in quoteInline > >>> match = self.patterns.initial.search(remaining) > >>> AttributeError: Inliner instance has no attribute 'patterns') > >>> > >>> Then I used pandoc to convert xml to rst. The result was not nice > >>> though, especially with code samples (they were made one-liners). > >>> > >>> I sent a question / bug report to the maintainer of xml2rst, but had no > >>> answer yet. > >>> > >>> > >>> > >>> 2020-04-27 13:35 GMT+03:00, Matt from Documatt <[email protected]>: > >>> > 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 > >>> . > >>> > > >>> > >>> > >>> -- > >>> С уважением, > >>> Ярослав Никитенко > >>> +7 916 743 3759 > >>> > >>> -- > >>> 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/CA%2BRLzGALTnzqKgb9qazyd53_Z%3DOt%2BR9XH54-%2Bg2dh5W1ZR3RBQ%40mail.gmail.com > >>> < > https://groups.google.com/d/msgid/sphinx-users/CA%2BRLzGALTnzqKgb9qazyd53_Z%3DOt%2BR9XH54-%2Bg2dh5W1ZR3RBQ%40mail.gmail.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/CAOGNDW9VKD%2Bk5NPhd6LMoSuYRMHZfsaGNoEODxfZZxcUrGh%2Bow%40mail.gmail.com > >> < > https://groups.google.com/d/msgid/sphinx-users/CAOGNDW9VKD%2Bk5NPhd6LMoSuYRMHZfsaGNoEODxfZZxcUrGh%2Bow%40mail.gmail.com?utm_medium=email&utm_source=footer > > > >> . > >> > > > > > -- > С уважением, > Ярослав Никитенко > http://twitter.com/ynikitenko > http://vk.com/yaroslav.nikitenko > http://facebook.com/ynikitenko > +7 916 743 3759 > > -- > 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/CA%2BRLzGC4RBWTvHmdGpUcpXv4O9Fe%3D9QYYQr5aNdjD9iBhWqSgg%40mail.gmail.com > . > -- 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/CAELGjd-xRXa1Z8wdRWV7-PRA7M71UzAXWTxdwrZ1vx8UqOsd1Q%40mail.gmail.com.
