Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.4.2
-
None
-
Windows 10 / ubuntu 22.04
-
9abb1e8a7 (dev)
Description
Assuming a sample foo.qml file here including qsTr() marked empty strings (although I know it's wrong to mark empty strings e.g. typo or not everyone is familiar with linguist) :
import QtQuick Rectangle { width: 360 height: 360 Text { id:t1 anchors.centerIn: parent text: qsTr("") } Text { id:t2 anchors.centerIn: parent text: qsTr("text one") } }
then we using
lupdate foo.qml -ts test.ts >> Updating 'test.ts'... Found 1 source text(s) (1 new and 0 already existing)
but in the .ts file we will have two source strings:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1"> <context> <name>foo</name> <message> <location filename="foo.qml" line="9"/> <source></source> <translation type="unfinished"></translation> </message> <message> <location filename="foo.qml" line="15"/> <source>text one</source> <translation type="unfinished"></translation> </message> </context> </TS>
when I remove the qsTr() for empty strings, and run lupdate again, the .ts file will not be updated but in message we can see some changes:
>> Found 1 source text(s) (0 new and 1 already existing)
even if we remove other tagged strings, empty strings are still left in the .ts file.
Expected Behavior: Unmarked source strings should be updated into .ts files (such as marked obsolete or someting).