Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Empty ts file after lupdate

Empty ts file after lupdate

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 3 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SikarjanS Offline
    SikarjanS Offline
    Sikarjan
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you already follow the QtQuick Internationalization documentation ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • SikarjanS Offline
        SikarjanS Offline
        Sikarjan
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          Can you show your .pro file ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • SikarjanS Offline
            SikarjanS Offline
            Sikarjan
            wrote on last edited by
            #5

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

            Thanks for the help!

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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 :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Beemaneni Bala
                wrote on last edited by
                #7

                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;
                trans.load("enh_ts")
                qApp.installTranslator(&trans);
                

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

                Thanks
                bala b

                1 Reply Last reply
                0
                • SikarjanS Offline
                  SikarjanS Offline
                  Sikarjan
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    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.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved