I ran lupdate on my program and got a file juliaskein.ts:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
To copy to clipboard, switch view to plain text mode
The single string is used as the window title. I then made two copies and edited them in Qt Linguist:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation>Julia Skein</translation>
</message>
</context>
</TS>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation>Julia Skein</translation>
</message>
</context>
</TS>
To copy to clipboard, switch view to plain text mode
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="es">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation>Madeja Julia</translation>
</message>
</context>
</TS>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="es">
<context>
<name>JuliaWidget</name>
<message>
<location filename="jwidget.cpp" line="11"/>
<source>Julia Skein</source>
<translation>Madeja Julia</translation>
</message>
</context>
</TS>
To copy to clipboard, switch view to plain text mode
I have both juliaskein_en.ts and juliaskein_es.ts open in Qt Linguist; that's working fine. However, if I open juliaskein.ts, it pops up a dialog box asking what the target language is. This file doesn't have a target language; it should not have any translated strings. What should I do so that it opens without a target language and without asking for a target language? Is there a way to start a new translation in Qt Linguist, or do I just copy a file and edit it?
Bookmarks