Results 1 to 11 of 11

Thread: Qt Designer and GNU GetText, not getting along

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    Do you have TRANSLATIONS += something.ts in your .pro file?

  2. #2
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    I modified my root .pro file and added this:

    FORMS = ui/alias_widget.ui
    TRANSLATIONS = mudlet_fr.ts
    Then I ran lupdate mudlet.pro. I gave no errors. But I checked in both the ui folder and src folders, but mudlet_fr.ts wasn't present.

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

    Default Re: Qt Designer and GNU GetText, not getting along

    Run qmake, compile the application so that uic has a chance to run and then run lupdate.

  4. #4
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    Sorry, but that didn't help either... still no .ts

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

    Default Re: Qt Designer and GNU GetText, not getting along

    Could you explain step by step what exactly did you do? What versions of each application do you use, etc.?

  6. #6
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    $ qmake --version
    QMake version 2.01a
    Using Qt version 4.4.1 in /usr/lib

    $ lupdate -version
    lupdate version 4.4.1
    I have a ui/ and a src/ folder. .ui filesare in ui/, and the .h ones and the rest of the code is in src/

    Here's how the root .pro looks like:

    QT += webkit
    SUBDIRS += src
    TEMPLATE = subdirs
    CONFIG += uic-qt4 \
    warn_on \
    qt \
    thread

    FORMS = ui/alias_widget.ui
    TRANSLATIONS = mudlet_fr.ts
    And the .pro in src/ folder:

    QT += webkit \
    network
    SOURCES += mudlet.cpp \
    TConsole.cpp \
    ctelnet.cpp \
    cmccp.cpp \
    main.cpp \
    dlgConnectionProfiles.cpp
    HEADERS += mudlet.h \
    TConsole.h \
    ctelnet.h \
    cmccp.h \
    dlgConnectionProfiles.h

    TEMPLATE = app
    CONFIG += warn_on \
    thread \
    qt
    TARGET = mudlet
    RESOURCES = application.qrc
    DISTFILES += test
    I did use qmake, qmake-qt4, then lupdate on the root .pro, but no .ts still. Not sure what am I doing wrong.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    AFAIR the subdirs template doesn't use FORMS and TRANSLATIONS variables. Move them to that second .pro file.

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Qt Designer and GNU GetText, not getting along

    A subdir project doesn't compile anything. This stuff belongs to the .pro in the src/ folder:
    Qt Code:
    1. FORMS = ui/alias_widget.ui
    2. TRANSLATIONS = mudlet_fr.ts
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  9. #9
    Join Date
    Sep 2008
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Designer and GNU GetText, not getting along

    Thank you wysota, jacek, and jpn. It works now.

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
  •  
Qt is a trademark of The Qt Company.