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. Qt linguist problem
Forum Updated to NodeBB v4.3 + New Features

Qt linguist problem

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 2.4k 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.
  • ashajgA Offline
    ashajgA Offline
    ashajg
    wrote on last edited by
    #1

    hi
    I am trying to convert text from one language to other using qtLinguist

    steps I followed :
    1)navigated to c:\QT\QT5.9.0\mingw53_32\bin
    2)qtenv2.bat
    3)lupdate
    4)lupdate <path to my project directory>main.qml -ts India_KN.ts
    5)got .ts file like this

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE TS>
    <TS version="2.1" language="kn_IN">
    <context>
        <name>main</name>
        <message>
            <location filename="../../../PROGRAMS/luin/main.qml" line="8"/>
            <source>Hello World</source>
            <translation type="unfinished"></translation>
        </message>
    </context>
    </TS>
    

    My first problem is
    here <translation type="unfinished"></translation> is blank.....
    I placed this .ks file in my project directory
    then i opened Qt Linguist and opened .ks to get this
    0_1548318758323_59240070-f70d-4b2c-9a02-708c20658c94-image.png

    My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?

    sierdzioS 1 Reply Last reply
    0
    • ashajgA ashajg

      hi
      I am trying to convert text from one language to other using qtLinguist

      steps I followed :
      1)navigated to c:\QT\QT5.9.0\mingw53_32\bin
      2)qtenv2.bat
      3)lupdate
      4)lupdate <path to my project directory>main.qml -ts India_KN.ts
      5)got .ts file like this

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="kn_IN">
      <context>
          <name>main</name>
          <message>
              <location filename="../../../PROGRAMS/luin/main.qml" line="8"/>
              <source>Hello World</source>
              <translation type="unfinished"></translation>
          </message>
      </context>
      </TS>
      

      My first problem is
      here <translation type="unfinished"></translation> is blank.....
      I placed this .ks file in my project directory
      then i opened Qt Linguist and opened .ks to get this
      0_1548318758323_59240070-f70d-4b2c-9a02-708c20658c94-image.png

      My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @ashajg said in Qt linguist problem:

      My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?

      Qt Linguist is a tool to help translators translate. It won't automatically provide the translation. You need to do that yourself, or hire somebody who knows the language you want to translate to.

      The process is simple:

      • generate .ts files (BTW. run lupdate on your .pro file, not the QML files)
      • open files in Linguist, fill in the translations
      • save the file, and release it (it will produce a qm file)
      • load the .qm file using QTranslator as soon as possible

      More info: https://doc.qt.io/qt-5/linguist-manager.html

      (Z(:^

      ashajgA 1 Reply Last reply
      3
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        Under the "Translation to" you have typed "hell world" or copy appropriate text copied google translator(testing purpose only). Click Save button. Also click on the "?" so that you get "right tick" mark. If right tick mark, then that sentence is translated. Next you need to follow what is @sierdzio suggested.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        ashajgA 1 Reply Last reply
        3
        • sierdzioS sierdzio

          @ashajg said in Qt linguist problem:

          My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?

          Qt Linguist is a tool to help translators translate. It won't automatically provide the translation. You need to do that yourself, or hire somebody who knows the language you want to translate to.

          The process is simple:

          • generate .ts files (BTW. run lupdate on your .pro file, not the QML files)
          • open files in Linguist, fill in the translations
          • save the file, and release it (it will produce a qm file)
          • load the .qm file using QTranslator as soon as possible

          More info: https://doc.qt.io/qt-5/linguist-manager.html

          ashajgA Offline
          ashajgA Offline
          ashajg
          wrote on last edited by
          #4

          @sierdzio thank you very much 😀

          1 Reply Last reply
          0
          • dheerendraD dheerendra

            Under the "Translation to" you have typed "hell world" or copy appropriate text copied google translator(testing purpose only). Click Save button. Also click on the "?" so that you get "right tick" mark. If right tick mark, then that sentence is translated. Next you need to follow what is @sierdzio suggested.

            ashajgA Offline
            ashajgA Offline
            ashajg
            wrote on last edited by
            #5

            @dheerendra thank you sir 😊

            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