The documentation of my project (using Python 3.2) is created with Sphinx (1.1.3) and is made of HTML files. I have to write this documentation in English and in French; that’s the reason why I build my documentation with Sphinx and gettext, using the usual bunch of .po(t) and .mo files.
By example, my .po files are made of lines like this one :
msgid "original text"
msgstr "translation"
My problem lies in the fact that if some translations are made of several lines, the corresponding HTML file loses the “new line” characters : my different lines are packed into one big paragraph. I tried different things, like :
msgid "original text"
msgstr "translation : first line \n second line"
But of course the HTML doesn’t care about the \n character; same problem with the \r character.
Then I tried this :
msgid "original text"
msgstr "translation : first line <br> second line"
But all I get is something like <br> instead of the expected “line break”. Same thing with <br/>.
What can I do ? I would be nice to help me !
Well, thank’s to ms4py, I’m able to answer my own question :
add the following line in each .rst file if you use “new line” characters in this file :
.. |br| raw:: html
Then add an empty line, then add on a new line the following characters : “less than” and br />. Then a new empty line.
|br|with spaces before and after|br|.Thank you !