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

QT Linguist

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 348 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.
  • S Offline
    S Offline
    SPlatten
    wrote on 5 Aug 2021, 13:34 last edited by SPlatten 8 May 2021, 13:40
    #1

    I spent several hours yesterday using Qt Linguist providing translations for all the text in my application. Today I noticed one of the forms didn't have translation, I cleaned the application and remade, however not I find that all the work I did yesterday is gone.

    Every translation is empty, why? what has caused this?

    Are the line numbers in the ts XML file relevant and actually used?

    Kind Regards,
    Sy

    K 1 Reply Last reply 5 Aug 2021, 13:49
    0
    • S SPlatten
      5 Aug 2021, 13:34

      I spent several hours yesterday using Qt Linguist providing translations for all the text in my application. Today I noticed one of the forms didn't have translation, I cleaned the application and remade, however not I find that all the work I did yesterday is gone.

      Every translation is empty, why? what has caused this?

      Are the line numbers in the ts XML file relevant and actually used?

      K Offline
      K Offline
      KroMignon
      wrote on 5 Aug 2021, 13:49 last edited by
      #2

      @SPlatten I don't really understand what you have done, sorry.

      To update translation source file (ts), you have to use lupdate. There is no need to recompile the application for that.

      AFAIK, the line number is only used by the Qt linguist to show the context.

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      S 1 Reply Last reply 5 Aug 2021, 13:54
      0
      • K KroMignon
        5 Aug 2021, 13:49

        @SPlatten I don't really understand what you have done, sorry.

        To update translation source file (ts), you have to use lupdate. There is no need to recompile the application for that.

        AFAIK, the line number is only used by the Qt linguist to show the context.

        S Offline
        S Offline
        SPlatten
        wrote on 5 Aug 2021, 13:54 last edited by
        #3

        @KroMignon , live and learn, I checked it out from git again, so back where I was, is there any way to partially update the ts without loosing everything?

        For example if a new form is added to the application, how to add that to an existing translation file?

        Kind Regards,
        Sy

        K 1 Reply Last reply 5 Aug 2021, 14:00
        0
        • S SPlatten
          5 Aug 2021, 13:54

          @KroMignon , live and learn, I checked it out from git again, so back where I was, is there any way to partially update the ts without loosing everything?

          For example if a new form is added to the application, how to add that to an existing translation file?

          K Offline
          K Offline
          KroMignon
          wrote on 5 Aug 2021, 14:00 last edited by
          #4

          @SPlatten said in QT Linguist:

          I checked it out from git again, so back where I was, is there any way to partially update the ts without loosing everything?
          For example if a new form is added to the application, how to add that to an existing translation file?

          I don't know how you use lupdate, per default nothing is removed from ts file. To remove entries from ts, you have to add --no-obsolete.

          REM update translation files
          lupdate -pro <project_file_name>
          
          REM update and remove old strings
          lupdate -pro <project_file_name> --no-obsolete
          

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          2

          4/4

          5 Aug 2021, 14:00

          • Login

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