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. Qt Linguist - Create Limitations
Forum Updated to NodeBB v4.3 + New Features

Qt Linguist - Create Limitations

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 2.1k 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
    kumararajas
    wrote on last edited by
    #1

    Hello!

    Here is a scenario:

    I need to add translations for my application. My application has approximately 300 strings in 18 languages.

    To help me adding translations, there are other team members will be working on adding the translations.

    Here are my requirements for the translations:

    • Translations should not exceed 20 characters. If the translation exceeds 20 characters, the translation shall be shortened. Example: If the translation is Engineering, then shorten it to Engg.
    • Translations shall not have special characters like @, #, $, etc.,

    Having the above said as the requirements, I want the team members to add the translations.

    Here comes my question: Can we create rules or limitations for Qt linguist to restrict the translation fields or set the validator to check if the translation meets the requirements?

    If the current Qt linguist doesn't supports, is there any configuration file, where I can add the validation rules?

    Or can we customize Qt linguist to work as per our need?

    Thank you,
    Kumar

    --Kumar

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You would have to modify Linguist source code. The tool does not provide the functionality you require, at least as far as I know.

      (Z(:^

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

        Can I get the linguist source code? Can you please let me know the right path to download?

        Thank you!

        --Kumar

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You need to download the Qt source code. Linguist can be found in the qttools repository (qttools/src/linguist). There are many places from where you can download:

          • if you want just the qttools, you can get them from official split packages: "link":http://download.qt-project.org/official_releases/qt/5.3/5.3.2/submodules/
          • if you prefer full Qt source code, look here: "link":http://download.qt-project.org/official_releases/qt/5.3/5.3.2/single/
          • you can also use git
          • you probably could install the source components through your Qt installer, but I am not sure those can be used for compiling

          A general guide on compiling Qt 5 can be found here: "link":http://qt-project.org/wiki/Building-Qt-5-from-Git. For Linguist, however, it should be enough to simply open the .pro file in Qt Creator and compile directly.

          (Z(:^

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kumararajas
            wrote on last edited by
            #5

            Hi Sierdzio,

            Just to be clear, I am not looking for Qt creator or development environment for now.

            I am looking for updating Qt linguist application to create the limitations in the translation fields.

            Is it possible to update the source code of Qt linguist? And after I do the update in Qt linguist source code, how do I build as .exe?

            Please let me know.

            Thanks,
            Kumar

            --Kumar

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              [quote author="kumararajas" date="1417164703"]Is it possible to update the source code of Qt linguist? And after I do the update in Qt linguist source code, how do I build as .exe?[/quote]

              Yes, I have just given you the instructions on how to do it. The easiest way is to use Qt Creator. And you need Qt and a compiler installed on your machine - otherwise you will not be able to compile Linguist. Of course, if you don't want to see Qt Creator, you can do all by hand, changing the source code in Notepad++ or UltraEdit (or Notepad if you feel suicidal), and then compile from the command line. The choice is yours.

              (Z(:^

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JvdGlind
                wrote on last edited by
                #7

                You could always open the .ts files and parse them as XML. Then look for <translation> and check if it meets your requirements.

                This does not provide direct feedback to the user, but only feedback after saving the file and running the XML parser.

                Jeffrey VAN DE GLIND
                Principle Consultant @ Nalys
                www.nalys-group.com

                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