[texworks] Wrong translations of standard buttons

Stefan Löffler st.loeffler at gmail.com
Sun Sep 27 12:38:33 CEST 2009

Hi again,

On 2009-09-26 19:19, Stefan Löffler wrote:
> I just noticed that the standard buttons (OK, Cancel, Restore defaults,
> ...) are usually not translated (even in German and French, which are
> officially supported by Qt, IIRC). Curiously, this differs between
> languages. In German and French, for example, there are translations for
> the button "Restore defaults", but not in the Italian translation. This
> may be related to my system (Ubuntu 9.04 with Qt from the repository),
> so please could others check on their systems?

I found the source of the translations of the standard buttons now (it's
in res/resfiles/translations), so I could determine that these files are
indeed recognized, but apparently don't work for me (Qt 4.5 on Ubuntu
9.04). At least not all of them.

So here's what I did:
 * I created a dummy file (attached) that includes only the texts on the
standard buttons in Qt.
 * I translated them to German (.ts and .qm files attached)
 * I copied the qt_de.qm file to res/resfiles/translations
 * I edited the file res/resfiles.qrc without actually changing anything
(to trick make into rebuilding the resources)
 * I ran make

In the resulting binary, the buttons are labeled correctly. I double
checked by switching back to the supplied qt_de.qm file, and indeed the
buttons were labeled incorrectly once more.

So my questions:
 * Where are the qt_<lang>.qm files from (and are there .ts files for
them as well)?
 * Can anyone reproduce this issue?

Finally, I have a (disturbing) speculation. I created the attached
qt_dummy.ts file from the supplied qt_ar.ts file. Upon translation, I
compared my personal qt_de.ts file with the qt_de.qm file in the
repository. I noticed that the strings were the same, but in a different
order. This led me to believe that the files may have been created from
different versions of Qt (4.4 and 4.5, probably). If this is true, then
maybe the 4.4 translations are no longer recognized with Qt 4.5 because
the places where they are used have changed. Since the .qm files are
binary files lacking most of the additional data of the .ts files, I
can't check, however. If someone out there has Qt 4.4, it should be easy
to check this, though. If my assumption is correct, then the German
buttons should be labeled correctly (i.e. non-English) with the
"official" version, while the qt_de.qm file I attached should again
produce English labels on some of the buttons (e.g. "Cancel" in the find

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_de.qm
Type: application/octet-stream
Size: 2402 bytes
Desc: not available
URL: <http://tug.org/pipermail/texworks/attachments/20090927/deba9ebd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_de.ts
Type: application/x-linguist
Size: 5200 bytes
Desc: not available
URL: <http://tug.org/pipermail/texworks/attachments/20090927/deba9ebd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_dummy.ts
Type: application/x-linguist
Size: 5372 bytes
Desc: not available
URL: <http://tug.org/pipermail/texworks/attachments/20090927/deba9ebd/attachment-0001.bin>

More information about the texworks mailing list