Translation in report not working

Hi,

I am trying to add a translation to my sales report template with this entry in the .po file:

msgctxt "report:sale.sale:"
msgid "Art.No."
msgstr "Art.Nr."

For some reason, however, the string “Art.No.” is not translated in the report. For different strings it works like expected. I suspected this has something to do with the dots and traced it down to the get_report(cls, report_name, text) function in ir/translation.py which receives the text splitted “Art.N” then “o” and finally “.”
I dont understand this behaviour and have no Idea to fix it. Any help is appreciated.

Thanks

I suspect you are using an odt file? LibreOffice or OpenOffice are adding tags where they shouldn’t, like in this case in your text. The best way is to remove the text and enter it again. You can also enter is first in a text editor without any markup and copy-paste it into the document.

Another approach is to convert the odt to a fodt and open it with a text editor. You will see a bunch of XML data but you should be able to find your Art.N somewhere. You can make your changes and save the file and try to print the report from Tryton.

Thank you so much.
Opening it in another editor as .fodt showed me that there was an accidentally placed bookmark in between the characters, which was hidden in the LibreOffice Writer.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.