Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Unsolved QT_TRANSLATE_NOOP

    General and Desktop
    2
    2
    335
    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.
    • D
      dsba last edited by

      Hi,
      I have moved QT_TRANSLATE_NOOP in a separate file called strings.h where all the strings are marked for translation here.
      This works fine as far as it's normal hard coded string ex: QT_TRANSLATE_NOOP("Main","Hello World!")
      Issue occurs when argument is passed ex: QT_TRANSLATE_NOOP("Main","Hello World %s ...")

      Can anyone please help me?
      Thanks in Advance!

      1 Reply Last reply Reply Quote 0
      • Pablo J. Rogina
        Pablo J. Rogina last edited by

        @dsba please be aware that Qt translation schema uses the original string as key for looking up translations, so in your case adding the placeholder (%1) creates a new, different original string...

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

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