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. I am confused with lupdate with different directory!

I am confused with lupdate with different directory!

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 419 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.
  • Q Offline
    Q Offline
    QtTester
    wrote on last edited by QtTester
    #1

    hi guys, i'm using 5.14.1 + win10.
    I need put different project'ts file to different folder.
    so every pro include a pri to config the variable.
    here is the code in pri file:

    # just for test variable
    UNIVERSAL_LIBRARY2 = 1
    MACHINE_TYPE2 = 1234
    
    equals(UNIVERSAL_LIBRARY2,"1") {
        TRANS_DIR = $$PWD/Common/resource/res/lang/universal-plugin
    } else {
        TRANS_DIR = $$PWD/Common/resource/res/lang/as$${MACHINE_TYPE2}
    }
    message("trans dir is:")
    message($$TRANS_DIR)
    TRANSLATIONS += $${TRANS_DIR}/en-US-$${PROJECT_DIR}.ts
    TRANSLATIONS += $${TRANS_DIR}/zh-TW-$${PROJECT_DIR}.ts
    

    when run qmake it prints correct string:

    Project MESSAGE: trans dir is:
    Project MESSAGE: D:/lyj/trunk-work/Common/resource/res/lang/universal-plugin
    

    BUT, when I run tools->external->linguist->lupdate from QtCreator, it says:

    Updating '../Common/resource/res/lang/as1234/en-US-BasicLibrary.ts'...
        Found 226 source text(s) (226 new and 0 already existing)
    
    Updating '../Common/resource/res/lang/as1234/zh-TW-BasicLibrary.ts'...
        Found 226 source text(s) (226 new and 0 already existing)
    

    if I comment

    # TRANS_DIR = $$PWD/Common/resource/res/lang/as$${MACHINE_TYPE2}
    

    it also generated the correct ts file for "../lang/universal-plugin/xxx.ts"

    Seems

    else {
    }
    

    always WORK from lupdate.exe !!!
    why 'universal-plugin' becomes 'as1234'?
    It drives me crazy...

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      QtTester
      wrote on last edited by
      #2

      I have confirmed this is a bug, but will not be fixed.
      anyone can help me how to pass different path to lupdate?
      thank you all.

      SGaistS 1 Reply Last reply
      0
      • Q QtTester

        I have confirmed this is a bug, but will not be fixed.
        anyone can help me how to pass different path to lupdate?
        thank you all.

        SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @QtTester hi,

        How did you confirm and are sure it's not going to be fixed ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        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