Hi Shimazu-san, Thank you for the email.
That is exactly what I thought as possible solution. The po file contain the information of the location of the string and source string as msgid and translated string as msgrd. It looks ok if sorce string is the plain sentence, But I am not sure I can have one to one mapping of the string and simply replace if the source comes from table, But it will be interesting challenge and will try. Again thank you very much for the email. Yuji 2023年1月6日(金) 21:37 Takayuki Shimizukawa <[email protected]>: > 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 > <https://groups.google.com/d/msgid/sphinx-users/CADstH-6naRsjuNu39_ecuM1%3DuuWU%2BgvSB6zdbV-a6yF891UZyg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 藤田 祐治 オープンリンク株式会社 代表取締役 社長 住所:千葉県千葉市美浜区打瀬2-9-16-414 携帯:080-3694-5550 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/CABdx1LujuqwJrXdHo27NLFo91nKnzR0drpJ%3DzfyjO%3DBXdf0thQ%40mail.gmail.com.
