Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
-
Qt SDK 4.7.1 on Windows, QML, JavaScript
-
1d1fbec4a2fcfde4e3e5c20c4ff6b679385773fd
Description
We have UI strings in JavaScript library files need localization, but seems lupdate (4.7.1) fails to parse the .js library file - it reports error line number of the line ".pragma library" and skips the rest content.
For example, running lupdate on loclib.js which has only 3 lines code:
.pragma library
function locstring()
The output from lupdate is as below and nothing added to loclib.ts.
C:\Temp>lupdate loclib.js -ts loclib.ts
C:/Temp/loclib.js:1:
Updating 'loclib.ts'...
Found 0 source text(s) (0 new and 0 already existing)
If comment out ".pragma library" , lupdate will find the qsTr("logicalNameHere").