[Qt-interest] Translating a xml file using lupdate
Jordan Tcolov
mazzzterz at gmail.com
Tue Sep 13 12:24:53 CEST 2011
Hi !
I have some text that are located in XML file and in my project I use these
texts to show them on buttons and I want to translate them, but I don't know
how to do that. I managed to workaround it to generate a ts file with
translation, but... I don't like the approach. Here is how I did it:
Original not translatable file: somename.xml
<?xml version="1.0" encoding="UTF-8"?>
> <buttons_definitions>
> <buttons>
>
> <!-- Two state buttons -->
> <button id="0" name="POS">
> <text0>Position</text0>
> </button>
>
> <button id="1" name="PROGRAM">
> <text0>Program</text0>
> </button>
>
> </buttons>
> </buttons_definitions>
>
File with which I got translation in ts file: somename.xml.ui
<?xml version="1.0" encoding="UTF-8"?>
> <class>XML_Buttons</class>
> <buttons_definitions>
> <buttons>
>
> <!-- Two state buttons -->
> <button id="0" name="POS">
> <text0><string>Position</string></text0>
> </button>
>
> <button id="1" name="PROGRAM">
> <text0><string>Program</string></text0>
> </button>
>
> </buttons>
> </buttons_definitions>
>
I don't want to change the extension to "ui" and I don't want <class> and
<string> tags floating around. Is there any other way I can do this ?
Thanks in advace.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110913/be2df888/attachment.html
More information about the Qt-interest-old
mailing list