Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Base translation not working
QtWS25 Last Chance

Base translation not working

Scheduled Pinned Locked Moved General and Desktop
translationqtpt
6 Posts 3 Posters 2.1k 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.
  • T Offline
    T Offline
    tabacof
    wrote on 22 Jul 2015, 18:44 last edited by tabacof
    #1

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Jul 2015, 22:21 last edited by
      #2

      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 23 Jul 2015, 13:49
      0
      • S SGaist
        22 Jul 2015, 22:21

        Hi,

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

        T Offline
        T Offline
        tabacof
        wrote on 23 Jul 2015, 13:49 last edited by
        #3

        @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
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Jul 2015, 22:49 last edited by
          #4

          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 24 Jul 2015, 12:30
          0
          • S SGaist
            23 Jul 2015, 22:49

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

            T Offline
            T Offline
            tabacof
            wrote on 24 Jul 2015, 12:30 last edited by
            #5

            @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
            0
            • M Offline
              M Offline
              MarkusR
              wrote on 24 Jul 2015, 13:15 last edited by
              #6

              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
              0

              6/6

              24 Jul 2015, 13:15

              • Login

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