Hi Yuji,

I think there is no easy way to do this.
Sphinx reads the source and converts it to an AST: Abstract Syntax Tree
(doctree), where it replaces the messages matching the po file.
The problem is that we cannot reproduce the reST sources from the AST,
because most of the structure of the directives is lost upon conversion to
the AST.

For this reason, I think a possible practical approach would be to look for
a string in the document source that matches the message in the po file and
replace it.

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa


2023年1月4日(水) 14:48 藤田祐治 <[email protected]>:

> Hi there!
>
> I am using Sphinx for the translated html and pdf by using command
>
> make -e SPHINXOPTS="-D language='ja'" html
> make -e SPHINXOPTS="-D language='ja'" latexpdf
>
> from translated PO files.
>
> I am just wondering if there is any good way to generate rst file from
> translated PO file?
> If I can, it will be very helpful and useful.
>
> I saw one to generate an xml file and then xml2rst.
> But it looks very complex.
>
> Are there any handy ways to do it?
>
> Thanks
> Yuji Fujita
>
> e-mail: [email protected]
>
> --
> 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/CABdx1LvJvU60f5bwAXo-YXUT4a5URmtMM7cJV0M3shLJMrqvvQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/sphinx-users/CABdx1LvJvU60f5bwAXo-YXUT4a5URmtMM7cJV0M3shLJMrqvvQ%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/CADstH-6naRsjuNu39_ecuM1%3DuuWU%2BgvSB6zdbV-a6yF891UZyg%40mail.gmail.com.

Reply via email to