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

No documentation for how to write multi-line translated string in QML

    XMLWordPrintable

Details

    Description

      https://doc.qt.io/qt-6/i18n-source-translation.html#use-parameters-instead-of-concatenating-strings doesn't mention multi-line strings.

      For example, the following approach is known to be bad (even, as here, without parameters, because the translator may want to restructure the text; and, when parameters get involved, their appearances may change order within the text):

            Label {
                  text: qsTr("Tap the window background to open the context menu.\n\n"
                     + "Things to check:\n\n"
                     + "- Do the Edit menu items work as expected with the TextArea?\n"
                     + "  - Are they enabled/disabled as expected?\n"
                     + "  - Does the TextArea keep focus after interacting with the Edit menu items?\n")
            }
      

      Attachments

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

        Activity

          People

            docteam Qt Documentation Team
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes