Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Base translation not working

    General and Desktop
    translation qtpt
    3
    6
    1651
    Loading More Posts
    • 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.
    • T
      tabacof last edited by tabacof

      Hello, I've just upgraded Qt from version 5.2 to 5.5. Everything worked fine except the translation of the QObjects (e.g. "Yes", "No", "Cancel", etc).

      The qt_pt.qm file didn't change after the upgraded, which striked me as odd (but I opened it with Linguist and it seemed okay). The translation is correctly loaded and installed, but it doesn't have any effect. Also, all my custom translations are working fine.

      Could anyone help me? I have no idea what is going on and I cannot find any documentation about the QObject translation.

      Thank you very much,
      Pedro Tabacof.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Can you provide a minimal project that shows that it works with an older version of Qt and not with 5.5 ?

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

        T 1 Reply Last reply Reply Quote 0
        • T
          tabacof @SGaist last edited by

          @SGaist Hello,

          I've created a small example and checked it with Qt 5.2 (MinGW 4.8) and 5.5 (MinGW 4.9).

          In the old Qt it works just fine, but in the new one it doesn't work at all (even if it says the translation was loaded and installed correctly).

          You can find the zipped project here: https://drive.google.com/file/d/0BzpEPYc7dTD0eWFwYmQzZ1g1RWs/view?usp=sharing

          Any help would be greatly appreciated!

          Pedro.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            You are not translating your application, there's no tr around your texts

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

            T 1 Reply Last reply Reply Quote 0
            • T
              tabacof @SGaist last edited by

              @SGaist My problem is with the standard Qt objects (such as the "Save/No/Cancel" text in the message box example), things I cannot wrap a "tr" around. All my "tr" text is translating just fine.

              The "qt_pt.qm" file I put on the example was not generated by myself, I got it from Qt\5.5\mingw492_32\translations. This used to work just fine (Qt 5.2), but now it doesn't work anymore.

              1 Reply Last reply Reply Quote 0
              • M
                MarkusR last edited by

                The standard translations for Ok, Cancel, Save had been moved into <name>QPlatformTheme</name>
                They are missing now in all the old qt_??.ts and are only available in the newer qtbase_??.ts

                I had copied the QPlatformTheme messages into the ts-files I needed.

                Markus

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post