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

Multiline developer comments in Qt Linguist

    XMLWordPrintable

Details

    Description

      Qt Linguist has  the "Developer comments" field where the comments in C++ source diplayed when the comments are writen in a certain format.
      (See "Translator Comments" https://doc.qt.io/qt-5/i18n-source-translation.html#translator-comments )

      Some users want to add a multi-lines comment there.However it is not possible at the moment because Qt Linguist formats the comments into a single line as the result. In detail, ASCII characters such as '[escape character]t', '[escape character]n', '[escape character]v', '[escape character]f', '[escape character]r', and ' ' (single space) are trimmed internally by Qt Linguist.

      This feature request is to ask enabling Qt Linguist display the multi-lines developer comments as it is.

      For example:
      Assuming comments are added in the source code as follows:

       

      //: This is a general comment with explains the text.
      //: %1 = explanation for the first argument.
      //: %2 = explanation for the second argument.
      //: %3 = explanation for the third argument.
      const char* string = QT_TR_NOOP("%1 is translatable because %2, also %3"); 

       

      At the moment, Qt Linguist displays this as a single-line Developer comments like :

      This is a general comment with explains the text. %1 = explanation for the first argument. %2 = explanation for the second argument. %3 = explanation for the third argument.

      If this feature request is implemented, this will appear in the Developer comments field as below:

      This is a general comment with explains the text.
      %1 = explanation for the first argument.
      %2 = explanation for the second argument.
      %3 = explanation for the third argument.

       

      An example application provided by a user is attached.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkohne Kai Köhne
            hitoshiito Hitoshi Ito
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes