Results 1 to 6 of 6

Thread: translation file issue (files not included in .ts with lupdate)

  1. #1
    Join Date
    Jul 2006
    Location
    Å iauliai, Lithuania (but not for long)
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy translation file issue (files not included in .ts with lupdate)

    Hello, i'm using Visual Studio 2005 with Qt integration 4.1.3
    I'm facing a strange issue and i've found nothing to help me on the internet

    When i run lupdate from Visual Studio (or from the command line), then i check the generated .ts file with qt linguist (qdict_fr.ts for exemple) and i see that i have 2 missing contexts...
    As i'm only using tr() and that i didn't forget any QObject macro i don't understand.

    Here are all the files that contain tr() (or translate("context","xxxx") for ui files)
    and in red, the files that are missing in the .ts :
    addeditdictionary.cpp & ui_addeditdictionary.h
    addeditserver.cpp & ui_addeditserver.h
    databasesmanager.cpp & ui_databasesmanager.h
    dictindexfile.cpp
    dictionary.cpp
    dictionarymanager.cpp
    dictsourcefile.cpp
    qdict.cpp & ui_qdict.h (inherit QMainWindow)
    server.cpp
    servermanager.cpp
    settings.cpp
    it seems that theses missing files are not even parsed with lupdate (there is no error of course)

    If someone had the same issue or have any idea about how to fix it...
    thanks

    here is the .pro file (the .pri file is well generated as well) :
    TEMPLATE = app
    TARGET = QDICT
    DESTDIR = ../debug
    QT += network
    CONFIG += debug
    INCLUDEPATH += ./GeneratedFiles \
    ./GeneratedFiles/Debug \
    . \
    ./GeneratedFiles/debug \
    ./GeneratedFiles
    DEPENDPATH += .
    MOC_DIR += ./GeneratedFiles/debug
    OBJECTS_DIR += debug
    UI_DIR += ./GeneratedFiles

    #Include file(s)
    include(QDICT.pri)

    #Translation files
    TRANSLATIONS += Resources/locale/qdict_fr.ts \
    Resources/locale/qdict_lt.ts

    #Windows resource file
    win32:RC_FILE = QDICT.rc
    (\(\
    (^.^)
    ("(")

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: translation file issue (files not included in .ts with lupdate)

    My guess is those files are not listed in SOURCES variable in your project file. Check that and rerun qmake if needed.

  3. #3
    Join Date
    Jul 2006
    Location
    Å iauliai, Lithuania (but not for long)
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Re: translation file issue (files not included in .ts with lupdate)

    Unfortunately, it is not that simple i fear
    when i generate the pri file, i can see that those files are included in sources (and the program is compiled and works well).

    here is the .pri file
    # -----------------------------------------------------------
    # This file is generated by the Qt Visual Studio Integration.
    # -----------------------------------------------------------


    #Header files
    HEADERS += ./addeditdictionary.h \
    ./addeditserver.h \
    ./include/base64.h \
    ./include/data.h \
    ./databasesmanager.h \
    ./dictindexfile.h \
    ./dictionary.h \
    ./dictionarymanager.h \
    ./dictsourcefile.h \
    ./include/dictzip.h \
    ./qdict.h \
    ./server.h \
    ./servermanager.h \
    ./settings.h \
    ./include/zconf.h \
    ./include/zlib.h

    #Source files
    SOURCES += ./addeditdictionary.cpp \
    ./addeditserver.cpp \
    ./include/base64.cpp \
    ./include/data.cpp \
    ./databasesmanager.cpp \
    ./dictindexfile.cpp \
    ./dictionary.cpp \
    ./dictionarymanager.cpp \
    ./dictsourcefile.cpp \
    ./main.cpp \
    ./qdict.cpp \
    ./server.cpp \
    ./servermanager.cpp \
    ./settings.cpp

    #Forms
    FORMS += ./addeditdictionary.ui \
    ./addeditserver.ui \
    ./databasesmanager.ui \
    ./qdict.ui

    #Resource file(s)
    RESOURCES += resources_collection.qrc
    (\(\
    (^.^)
    ("(")

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: translation file issue (files not included in .ts with lupdate)

    Are tr() entries from those files mentioned in .ts files at all (even without proper context)?

  5. #5
    Join Date
    Jul 2006
    Location
    Å iauliai, Lithuania (but not for long)
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: translation file issue (files not included in .ts with lupdate)

    Quote Originally Posted by wysota View Post
    Are tr() entries from those files mentioned in .ts files at all (even without proper context)?
    Not at all, i don't find any of them...so i get finally an uncomplete translated program which is not very nice.
    (\(\
    (^.^)
    ("(")

  6. #6
    Join Date
    Jul 2006
    Location
    Å iauliai, Lithuania (but not for long)
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Lightbulb Re: translation file issue (files not included in .ts with lupdate)

    Ok i finally fix the problem but don't ask me why this problem appeared...
    I just created 2 new blank files, and i copied the text of the "corrupted" files into them, and now thoses new files are magically parsed with lupdate...
    it is so stupid ! why did i choose to work in the computing world
    but thanks anyway for your help
    (\(\
    (^.^)
    ("(")

Similar Threads

  1. Qt 3.3.4 -> Qt 4.1.2, moc file issue
    By philski in forum Qt Tools
    Replies: 1
    Last Post: 11th September 2006, 21:08
  2. Replies: 11
    Last Post: 4th July 2006, 15:09
  3. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28
  4. Splitting Translation Files
    By Jimmy2775 in forum Qt Programming
    Replies: 9
    Last Post: 3rd February 2006, 19:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.