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

Linguistic tool lupdate failed to extract string context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12
    • Tools: Linguist
    • None
    • Qt version: 5.12
      Platform: macOS
    • macOS

    Description

      The linguistic tool "lupdate" couldn't correctly extract string context in source file; source file uses "using namespace A::B..." instead of declaring each namespace like:"

      namespace A {
      namespace B{
      ...
      class classA
      }
      }
      

       

      Another comment has been added at the top of the source file:

      /*
      TRANSLATOR A::B::...classA
      */
      

      based on this article: 

      https://doc.qt.io/archives/qt-4.8/linguist-programmers.html

      The expected behavior should be that the string wrapped by "tr" function is extracted with its namespaces as prefix, like

      <context>
        <name>A::B::...classA</name>
      </context>

      The actual behavior missed namespaces, which is:

      <context>
       <name>classA</name>
      </context>
      

      During string harvesting step, warnings like below keeps pop up:

      xxx.cpp: LINE-NUMBER: Qualifying with unknown namespace/class ::classA
      

       

       

      As the result, when applying localization step, strings couldn't be correctly get replaced with localized string.

       

       

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            lava555 lava lava
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes