Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12
-
None
-
Qt version: 5.12
Platform: 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.