lupdate Qt 4.7.1 not working anymore??
Hello,
I use Linguist & lupdate/lrelease cycle ever since to update tr() strings in my code for translating.
But with recent Qt 4.7.1 version this does not seem to work anymore? I have a big project with several subdirs, structured like this:
Code:
- MainDir
main.pro
- Module1
module1.pro
- Module2
module2.pro
[...]
- Main
main.pro
- resource
Program_de.ts
[...]
Program_de.qm
[...]
the Module subdirs being dynamic libraries (DLLs) and Main being the application and the resource dir containing all program resources like translations (ts/qm files), icons etc. Up until now, executing lupdate in main directory or application subdirectory was sufficient to update translation file:
Code:
lupdate Program.pro
or
lupdate Main.pro
but this does not work anymore with Qt 4.7.1, I get a lot of weird errors like this:
Code:
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(66):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(69):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(72):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(75):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(78):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(80):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(82):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(84):Function 'eval' is not im
plemented
C:/Qt/4.7.1/src/gui/kernel/qactiongroup.h:45: circular inclusion of c:/Qt/4.7.1/
include/QtGui/qaction.h
c:/Qt/4.7.1/include/QtGui/qboxlayout.h:1: circular inclusion of C:/Qt/4.7.1/src/
gui/kernel/qboxlayout.h
C:/Qt/4.7.1/src/gui/kernel/qgridlayout.h:45: circular inclusion of c:/Qt/4.7.1/i
nclude/QtGui/qlayout.h
C:/Qt/4.7.1/mkspecs/features/default_post.prf(5):Function 'system' is not implem
ented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(66):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(69):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(72):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(75):Function 'eval' is not im
plemented
C:/Qt/4.7.1/mkspecs/features/debug_and_release.prf(78):Function 'eval' is not im
and at the end, not any tr() string in my code was found:
Code:
Updating 'resource/Tracker_de.ts'...
Found 0 source text(s) (0 new and 0 already existing)
Kept 175 obsolete entries
making any old strings obsolete.
Any help is greatly appreciated, thanks
AlGaN
Edit: Systen: Win7 64bit, Qt 4.7.1 32-bit, MS VC 2010
There seems to be a bug open related to this issue:
http://bugreports.qt.nokia.com/browse/QTBUG-6587#
Wondering that nobody has probs in this issue though it may affect all multilanguage apps?
Re: lupdate Qt 4.7.1 not working anymore??
What do your .pro files look like?
Re: lupdate Qt 4.7.1 not working anymore??
Hello wysota,
they're fairly standard I think, with TRANSLATIONS variables in .pro file for exe:
Code:
TEMPLATE = app
CONFIG(debug, debug|release) {
TARGET = q1Trackerd
# OBJECTS_DIR = obj_$$(QMAKESPEC)_$$[QT_VERSION]_debug
# MOC_DIR = moc_$$(QMAKESPEC)_$$[QT_VERSION]_debug
DEFINES += QT_DEBUG RLOG_COMPONENT="q1tracker"
win32 {
CONFIG += console
LIBS += ../../bin/TrackerAppd1.lib \
../../3rdparty/rlog-1.4/win32/Debug/rlogd.lib
}
unix {
LIBS += # Path to TrackerApp debug build \
# Path to rlog debug build \
}
# SOURCES += ../common/debuq/log.cpp
# HEADERS += ../common/debuq/log.h
} else {
TARGET = q1Tracker
# OBJECTS_DIR = obj_$$(QMAKESPEC)_$$[QT_VERSION]_release
# MOC_DIR = moc_$$(QMAKESPEC)_$$[QT_VERSION]_release
DEFINES += QT_NO_DEBUG_OUTPUT RLOG_COMPONENT="q1tracker"
win32 {
LIBS += ../../bin/TrackerApp1.lib
# ../3rdparty/rlog-1.4/win32/Release/rlog.lib
}
unix {
LIBS += # Path to TrackerApp release build \
}
}
DESTDIR = ../../bin
RESOURCES = ../resource/common.qrc ../resource/translations.qrc
TRANSLATIONS = ../resource/Tracker_de.ts \
../resource/Tracker_it.ts
INCLUDEPATH = \
../common/debuq \
../common/rlog \
../common/types \
../common/geoalg \
../TrackerApp \
QT += core gui
CONFIG += qt warn_on debug_and_release
SOURCES += \
main.cpp \
../common/rlog/rlog_def.cpp \
win32 {
RC_FILE = ../resource/appico.rc
DEFINES += _USE_MATH_DEFINES
}
and so on, this being the pro file for the application that relies on all modules (DLLs).
Thanks for any hint,
AlGaN
Re: lupdate Qt 4.7.1 not working anymore??
Line #52 of your project file is surely invalid. Does your project consist of only two source files?
Re: lupdate Qt 4.7.1 not working anymore??
Hello wysota,
what's wrong with line #52? This is a souce file I include in every sub project (it's source for a logging lib I include in every sub project, residing in a common directory).
No, this is project file only for application (exe) of project, of course there are a lot of other source files in other sub directories (cf the directory structure I mentioned in my first post).
At top level source dir I have sth like this:
Code:
TEMPLATE = subdirs
VERSION = 1.2.3.4
CONFIG += ordered qt warn_on debug_and_release
SUBDIRS = \
# no dependencies
Module1 \
Module2 \
[...]
# Dependency: Module1
Module6 \
[...]
# application
q1Tracker \
Thanks for any hints :)
Re: lupdate Qt 4.7.1 not working anymore??
Quote:
Originally Posted by
AlGaN
what's wrong with line #52?
It ends with a backslash with no continuation in the next line.
Quote:
of course there are a lot of other source files in other sub directories (cf the directory structure I mentioned in my first post).
They will not be taken into account when generating translations for this project. It might work if you pass -r option to lupdate.