Linguist problem
-
hi every body. i have one problem when i want to translate my project. ok this is my .pro file
@
SOURCES = main.cpp
TRANSLATIONS = my_da.ts
@and this is my main file
@
#include <QtGui>int main(int argc, char **argv)
{
QApplication app(argc, argv);QTranslator m; m.load("my_da.qm"); app.installTranslator(&m); QLabel l(QObject::tr("Hello")); l.show(); return app.exec();
}
@first i use lupdate empty.pro and this is my output :
C:\Users\Arman\Documents\Qt Project\empty>lupdate empty.pro
C:/Qt/4.8.2/src/corelib/tools/qstring.h:46: circular inclusion of C:/Qt/4.8.2/in
clude/QtCore/qbytearray.h
C:/Qt/4.8.2/src/qt3support/tools/q3cstring.h:45: circular inclusion of C:/Qt/4.8
.2/include/QtCore/qbytearray.h
C:/Qt/4.8.2/src/corelib/tools/qstringbuilder.h:45: circular inclusion of C:/Qt/4
.8.2/include/QtCore/qstring.h
C:/Qt/4.8.2/src/corelib/tools/qstringbuilder.h:46: circular inclusion of C:/Qt/4
.8.2/include/QtCore/qbytearray.h
C:/Qt/4.8.2/src/gui/painting/qwmatrix.h:45: circular inclusion of C:/Qt/4.8.2/in
clude/QtGui/qmatrix.h
C:/Qt/4.8.2/src/gui/kernel/qactiongroup.h:45: circular inclusion of C:/Qt/4.8.2/
include/QtGui/qaction.h
C:/Qt/4.8.2/src/gui/kernel/qlayout.h:236: circular inclusion of C:/Qt/4.8.2/incl
ude/QtGui/qboxlayout.h
C:/Qt/4.8.2/src/gui/kernel/qgridlayout.h:45: circular inclusion of C:/Qt/4.8.2/i
nclude/QtGui/qlayout.h
Updating 'my_da.ts'...
Found 1 source text(s) (1 new and 0 already existing)i think this is ok . after lupdate i use this command : linguist my_da.ts . i write my translation and click on "mark item as done and move to the next unfinished item" then click on "save all" and close the linguist.
then i write in cmd lrelease empty.pro and my output is :C:\Users\Arman\Documents\Qt Project\empty>lrelease empty.pro
The directory name is invalid.
Could not find qmake configuration directoryCould not find qmake configuration f
ileUsing OS scope before setting MAKEFILE_GENERATORUpdating 'C:/Users/Arman/Docu
ments/Qt Project/empty/my_da.qm'...
Generated 1 translation(s) (1 finished and 0 unfinished)i think this have error but i cant fix them :( what is MAKEFILE_GENERATOR ? please help me. when i run my project it not translate my QLabel text !
-
Hi,
If I have to add I do something like this:
lupdate . qml -ts untitled1.ts untitled1_pl.ts
lupdate will scan all h , cpp and qml files in current directory "." and "qml" directory and search for any strings enclosed in tr or qsTr and store them in given ts files (default English and Polish in this case)lrelease untitled1.ts untitled1_pl.ts
This will generate .qm files for languages specified by given .ts files. -
Hi,,, I am struck here boss.. Where to run it.. and do we need any extra library to run it... Please reply me.. i am using Qt 5.0