In addition to my previous article about translating a QML application, I want to show you how translators can understand the context of strings they translate in Qt Linguist.

I mean, it’s not a rare case when translators work without seeing the actual usage of string, for them it’s just a line of text. You can find a lot of such examples at Notabenoid, though it’s about translation of subtitles for TV-series, quite often sad twats from some release-group don’t even watch the series they are translating. But let’s not get distracted.

Qt Linguist doesn’t keep translators in the dark. There are ways to maintain a “connection” between a developer and a translator, who can actually work in a different company (an outsourced translation agency, for example):

  1. Translators can see a preview of the actual UI form right in Qt Linguist;
  2. Developers can write special comments that will be visible for translators.

Regarding the preview of UI form - sadly, that works only for Qt Widgets. In case of QML, translators won’t see a preview of UI form. However they will see the corresponding QML code with highlights for every string, which is also helpful. And the reason for that is the dynamic nature of QML - ability to load content dynamically, dependency on conditions/variables and such - which makes it really difficult to guarantee a proper preview, so it was decided not to show any. There is some researching ongoing in that direction, but so far - no UI form preview for QML.

Here are 2 videos to illustrate what I am talking about:

First one shows the interaction between developer and translator in case of Qt Widgets UI form:

If video doesn't play in your browser, you can download it here.

A special comment for translator can be written right in Design mode, which is convenient.

And this one shows the same, but in case of QML UI form:

If video doesn't play in your browser, you can download it here.

Here you cannot write a special comment for translator in Design mode, so you have to switch into Code mode to do that.

If you want to know more details about how to make the life of translators easier, read this article from the official documentation.