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.
  • 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