Important: Please read the Qt Code of Conduct -

Empty ts file after lupdate

  • Hi!

    This issue was posted two years ago but the work around suggested here is not working for me. I am working on a QtQuick 2.5 application and I have marked all my strings with qsTr() in my qml files and I have TRANSLATION tag in my pro file but every time I run lupdate from tools I get this:

    "Info: creating stash file /Users/user/myProgramm/.qmake.stash
    Updating 'languages/de.ts'...
    Found 0 source text(s) (0 new and 0 already existing)"

    Am I doing something wrong or is this another bug?

  • Lifetime Qt Champion


    Did you already follow the QtQuick Internationalization documentation ?

  • Yes, I did. I already found that "hack" but it does not change anything. So are you telling me that basically it should work that I am doing something wrong?

  • Lifetime Qt Champion

    Just tested it with a dummy program and the technique described in the documentation works fine.

    Can you show your .pro file ?

  • Stupid me, I had a \ instead of a / in my path...

    Thanks for the help!

  • Lifetime Qt Champion

    No need for \ in paths with Qt ;)

    Glad you found out and thanks for sharing !

    Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :)

  • Hi,
    Myself working on languages for my app.Please provide inputs if u know.I have all qm files generated using lrelease , but i do not understand how i can i load language change dynamically.
    As per my understanding, load is not sufficient and it needs to be installed to effect the changes.

    QTranslator trans;

    The above code works if i put in main.cpp, but i need to change the language how can i refer from particular file?

    bala b

  • I do not know how good your Spanish is but this video helped me a lot. The guy is prompting a dialog on start up to select a language. My be you can work from there.

  • Lifetime Qt Champion

    And there's also the internationalization documentation that has a chapter about it here.

    As for doing if from within your application, it's essentially a question of providing a mean for your users to select the right file through for example a combo box.

Log in to reply