Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved What to do when Qt Linguist give warning ?

    General and Desktop
    3
    5
    100
    Loading More Posts
    • 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.
    • Q
      Qt embedded developer last edited by

      When i am writing turkish translation at that time i am getting below warning :

      Translation does not refer to the same place markers as in the source text.

      What is reason behind that ? How to resolve it ?

      Screenshot from 2021-07-29 16-11-04.png

      1 Reply Last reply Reply Quote 0
      • VRonin
        VRonin last edited by

        % followed by a number between 1 and 99 is considered a placeholder for QString::arg(). Here you are not using arg() so feel free to ignore the warning

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        Q JonB 2 Replies Last reply Reply Quote 2
        • VRonin
          VRonin last edited by

          % followed by a number between 1 and 99 is considered a placeholder for QString::arg(). Here you are not using arg() so feel free to ignore the warning

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          Q JonB 2 Replies Last reply Reply Quote 2
          • Q
            Qt embedded developer @VRonin last edited by

            @VRonin Thank you.

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB @VRonin last edited by JonB

              @VRonin
              I don't see this documented in QString::arg() or tr(), but is this a case where a double % would mean a literal %? So if the user wants to get rid of the warning:QObject::tr("... after 100%% usage")?

              Q 1 Reply Last reply Reply Quote 3
              • Q
                Qt embedded developer @JonB last edited by

                @JonB Yes by writing %%100 in translation removed warning

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post