Linguist problem
-
hi everybody. i cant use linguist please help me :
i use visual studio 2008 and Qt 4.8.1 for vs. ok when i exec "lupdate emptyProject.pro" in cmd my output is :
C:/Qt/4.8.1/src/corelib/tools/qbytearray.h:618: circular inclusion of C:/Qt/4.8.
1/include/QtCore/qstring.h
C:/Qt/4.8.1/src/corelib/tools/qstringbuilder.h:45: circular inclusion of C:/Qt/4
.8.1/include/QtCore/qstring.h
C:/Qt/4.8.1/src/gui/painting/qwmatrix.h:45: circular inclusion of C:/Qt/4.8.1/in
clude/QtGui/qmatrix.h
C:/Qt/4.8.1/src/gui/kernel/qactiongroup.h:45: circular inclusion of C:/Qt/4.8.1/
include/QtGui/qaction.h
C:/Qt/4.8.1/src/gui/kernel/qlayout.h:236: circular inclusion of C:/Qt/4.8.1/incl
ude/QtGui/qboxlayout.h
C:/Qt/4.8.1/src/gui/kernel/qgridlayout.h:45: circular inclusion of C:/Qt/4.8.1/i
nclude/QtGui/qlayout.h
Updating 'Documents/Qt Project/emptyProject/pr_la.ts'...
Found 1 source text(s) (1 new and 0 already existing)after converting i exec "lrelease emptyProject.pro" and :
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/emptyProject/pr_la.qm'...
Generated 1 translation(s) (1 finished and 0 unfinished)and this is my code :
@
#include <QtGui>int main(int argc, char *argv[])
{
QApplication app(argc, argv);QTranslator pr; pr.load( "pr_la" ); app.installTranslator( &pr); QPushButton btn( QPushButton::tr("hello") ); btn.show(); return app.exec();
}
@but doesnt work when i exec my project. and "hello" work doesnt translation! tnx 4hlp
-
Please show contents of .pro file.
Do you translate your file correctly? Please make sure that you didn't skip a step. You should open your .ts file with Qt linguist, translate it and save translation.
Specify absoloute or relative path to your binary translation file. Normally, such files have .qm extention (unless you rename them) but in code you sent:
@
pr.load( "pr_la" );
@You are loading a file with no extention in current working directory. I think it should be:
@
pr.load( "./pr_la.qm" );
@
Or better than previous:
@
pr.load( QString("%1/%2").arg(qApp->applicationDirPath()).arg("pr_la.qm"));
@ -
i realy dont know whats my problem !!
please check my output . its true ?!!"after converting i exec “lrelease emptyProject.pro” and :
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/emptyProject/pr_la.qm’… Generated 1 translation(s) (1 finished and 0 unfinished)" -
"Forums > International > Persian":http://qt-project.org/forums/viewforum/40/