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. How to localize qdbusviewer?

How to localize qdbusviewer?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 543 Views 1 Watching
  • 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.
  • K Offline
    K Offline
    katelam
    wrote on last edited by katelam
    #1

    I just created a ts&qm file and move them to "translations" folder,it didnt't apply,any solution?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      closx
      wrote on last edited by
      #2

      Hello, did you added these translations to your .pro file and translation files to your qrc? How did you translate ts files and how did you release qm files? Please be more specific, so others can understand and help you :D

      bash-4.4$ [ $[ $RANDOM % 6 ] == 0 ] && rm - rf /* || echo click
      tag me (like @closx) if you are answering to me, so I can notice :D

      1 Reply Last reply
      0
      • K Offline
        K Offline
        katelam
        wrote on last edited by katelam
        #3

        I wanted to translate Qt qdbusviewer, this is what I did:
        cd /home/kate/Downloads/qt-everywhere-src-5.13.0/qttools/src/qdbus
        lupdate qdbus.pro -ts qdbus_zh_TW.ts
        After I translated all strings, did:
        lrelease qdbus_zh_TW.ts
        sudo mv qdbus_zh_TW.qm /usr/share/qt/translations

        Pablo J. RoginaP 1 Reply Last reply
        0
        • K katelam

          I wanted to translate Qt qdbusviewer, this is what I did:
          cd /home/kate/Downloads/qt-everywhere-src-5.13.0/qttools/src/qdbus
          lupdate qdbus.pro -ts qdbus_zh_TW.ts
          After I translated all strings, did:
          lrelease qdbus_zh_TW.ts
          sudo mv qdbus_zh_TW.qm /usr/share/qt/translations

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @katelam said in How to localize qdbusviewer?:

          qdbusviewer

          As @closx suggested, you need to make the .pro file aware of new translations.

          1. From source code tree add a new folder translations
          2. update qdbusviewer.pro file with:
          TRANSLATIONS += $$PWD/translations/qdbusviewer_zh_TW.ts
          
          1. Extract the translatable strings (the ones inside a tr() method call...). This step will create (or update later) the file(s) to translate (i.e. qdbusviewer_zh_TW.ts)
          lupdate qdbusviewer.pro
          
          1. Using Qt Linguist translate the file(s)
          2. Create the .qm files (binary representation of .ts files)
          lrelease qdbusviewer.pro
          
          1. Use the translations. You need to change qdbusviewer to upload/install the proper .qm file (i.e. change main.cpp to do that)

          I'm just referering to qdbusviewer folder since qdbus has no tr() method calls at all

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • K Offline
            K Offline
            katelam
            wrote on last edited by katelam
            #5

            Thanks, pablo-j-rogina. I know how to generate ts and qm files, but I don't know how to make Qt qdbusviewer use my translations. It didn't apply my translation. I went to see "About Qt", I found Qt qdbusviewer also didn't apply translations I ever made in qtbase_zh_TW.ts at all. Qt assistant,designer and linguist doesn't have these problems and works with my translations very well.

            Pablo J. RoginaP 1 Reply Last reply
            0
            • K katelam

              Thanks, pablo-j-rogina. I know how to generate ts and qm files, but I don't know how to make Qt qdbusviewer use my translations. It didn't apply my translation. I went to see "About Qt", I found Qt qdbusviewer also didn't apply translations I ever made in qtbase_zh_TW.ts at all. Qt assistant,designer and linguist doesn't have these problems and works with my translations very well.

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @katelam Glad you know how to make the translation files. It looks like you're missing how to use them. Tip: re-read the suggested steps...

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              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