Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15770

lupdate parses commented-out default values as an ID, and merges tr() calls wrongly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.6.3, 4.7.0
    • Tools: Linguist
    • None
    • Linux, Windows, Mac.

    Description

      Dialog1::Dialog1( QWidget* parent /= 0/ )
      is parsed by lupdate as being an identifier for the next tr() call, which was definitely not the intent of this code.
      As a result, it merges tr() calls wrongly, and some strings get wrongly translated.
      See attached testcase.

      I think the tr id should be discarded upon encountering the ')'. And/or maybe C-style comments shouldn't be used for this magic, since only C++ style comments are documented as having this effect?

      Attachments

        1. dialogs.cpp
          0.4 kB
          David Faure (Private)
        2. discard_id.diff
          0.7 kB
          David Faure (Private)
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            buddenha Oswald Buddenhagen
            dfaure David Faure (Private)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes