Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Linguist problem
Forum Updated to NodeBB v4.3 + New Features

Linguist problem

Scheduled Pinned Locked Moved General and Desktop
13 Posts 3 Posters 6.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahura_24
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      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"));
      @

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ahura_24
        wrote on last edited by
        #3

        my .pro file is :

        SOURCES +=
        main.cpp

        TRANSLATIONS = pr_la.ts

        1 Reply Last reply
        0
        • S Offline
          S Offline
          soroush
          wrote on last edited by
          #4

          Looks good. There should not be any problem.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ahura_24
            wrote on last edited by
            #5

            but i have problem ! it doesnt work !

            1 Reply Last reply
            0
            • S Offline
              S Offline
              soroush
              wrote on last edited by
              #6

              Please describe more.

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Bleach
                wrote on last edited by
                #7

                I have the same problem. VS 2008, Qt 4.8.0. Any ideas?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  soroush
                  wrote on last edited by
                  #8

                  Please verify that your translation loads or not:
                  @qDebug()<< translation.load(...);@

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    ahura_24
                    wrote on last edited by
                    #9

                    before i create this topic, i examine this and return true

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      ahura_24
                      wrote on last edited by
                      #10

                      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)"

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        soroush
                        wrote on last edited by
                        #11

                        Do you have a .qm file generated?

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          ahura_24
                          wrote on last edited by
                          #12

                          can you speak persian with me ? if not , yes its generate .qm file but i dont know its correct !

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            soroush
                            wrote on last edited by
                            #13

                            "Forums > International > Persian":http://qt-project.org/forums/viewforum/40/

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved