Lupdate



  • 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


  • Moderators

    @
    lupdate files.txt -ts translations.ts
    @

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



  • 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


  • Moderators

    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.



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.