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. Lupdate
QtWS25 Last Chance

Lupdate

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.7k 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.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    Hi
    Please could someone clarify the syntax for the lupdate command when not using a .pro file?
    What I want to achieve is to pass lupdate a list of cpp files and to merge the result with another ts file - is this possible?
    I have tried various combinations such as
    @
    lupdate files.txt -ts translations.txt

    lupdate error: File 'translations.txt' has no recognised extension
    @

    Thanks

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

      @
      lupdate files.txt -ts translations.ts
      @

      Should do the merge if the file already exists, IIRC.

      (Z(:^

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GrahamL
        wrote on last edited by
        #3

        Hi
        the translations.ts file has been created by running lupdate on a .pro file for a different project
        I changed my command to
        @
        lupdate src -ts C:\MyProject\translations.ts

        Where src is a folder containing c++ source
        @

        This command runs but the resulting translations.ts file only contains the translations found in the src folder

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

          I see. I cannot chack right now how we did it in one of our projects, so I'll get inventive. Either try:
          @
          lupdate src my/file.pro -ts C:\MyProject\translations.ts
          @

          Where my/file.pro is the original pro file, or Create 2 separate ts files, translate them, release into qm and then install both in your app with QTranslator.

          (Z(:^

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GrahamL
            wrote on last edited by
            #5

            Thanks
            I am also investigating the use of lconvert to merge the files

            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