Hi there,

I have tied the basic project in Qt Quick. Wizzard creates two qml files: main.qml and MainPage.qml. MainPage.qml is loaded as component in main.qml like this:

Qt Code:
  1. initialPage: MainPage {tools: toolBarLayout}
To copy to clipboard, switch view to plain text mode 

now in MainPage.qml the text says obligatory :

Qt Code:
  1. text: qsTr('Hello world!')
To copy to clipboard, switch view to plain text mode 

but this is not translating properly. I am sure that I have:
1. created properly ts translation file from both main.qml and MainPage.qml (using lupdate)
2. released qm file with linguist
3. loaded qm file into the translator and installed the translator in the main.cpp file

When I move the MainPage.qml snippet directly into main.qml code like this:

Qt Code:
  1. initialPage: Page {
  2. id: mainPage
  3. Text {
  4. anchors.centerIn: parent
  5. text: qsTr('Hello world!')
  6. color: platformStyle.colorNormalLight
  7. font.pixelSize: 20
  8. }
  9. tools: toolBarLayout
  10. }
To copy to clipboard, switch view to plain text mode 

the "Hello world!" is translated correctly. It seem only in loaded QML components the qsTr function does not look up properly in translator.

Any quesses? Thanks.