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

Lupdate produces incorrent indent for <context> node

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • None
    • 5.15
    • Tools: Linguist
    • None
    • All

    Description

      Lupdate produces .ts files like the following:

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="ru" sourcelanguage="en">
      <context>
          <name>ClassName</name>
          <message>
             <location filename="../../src/addlanguagedialog.ui" line="14"/>
             <source>Add language</source>
             <translation>Добавить язык</translation>
          </message>
      </context>
      </TS>

       

      In the example above <TS> and <context> have the same indent level. But I would expect different indents, like the following:

       

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS>
      <TS version="2.1" language="ru" sourcelanguage="en">
          <context>
              <name>ClassName</name>
              <message>
                  <location filename="../../src/addlanguagedialog.ui" line="14"/>
                  <source>Add language</source>
                  <translation>Добавить язык</translation>
               </message>
          </context>
      </TS>

       

      This is very important for integration with third-party services. For example, Crowdin generates the correct indentation for <context> (which are different from lupdate). This produces huge diffs.

      Attachments

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

        Activity

          People

            masoud.jami Masoud Jami
            shatur95 Gena Chernyshyk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes