Improve lupdate
authorRoberto Raggi <roberto.raggi@nokia.com>
Wed, 7 Dec 2011 09:24:01 +0000 (10:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 13 Dec 2011 07:47:04 +0000 (08:47 +0100)
commit1d1fbec4a2fcfde4e3e5c20c4ff6b679385773fd
tree5d372f03f4d7ab37512e595dc48695da2ff314c7
parent18ee2e8b52832dedfdc1ef6de14977c9e543e024
Improve lupdate

Merge the QML and the Javascript front-ends. Also, change the
way we process directives in QML/JS comments. The old code
was processing all the directives before visiting the AST nodes.
Unfortunately, this doesn't play nice with TRANSLATOR-like
directives.

Added support for translating extended Javascript files. That is,
QML/JS extends Javascript with pragma directives (e.g. .pragma).
We emulate the `real' QML engine and we simply remove the pragmas
from the original source code.

Change-Id: Ie2536b10199a587b97f41c5e0560acabae981807
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
12 files changed:
src/linguist/lupdate/lupdate.pro
src/linguist/lupdate/qdeclarative.cpp
src/linguist/lupdate/qscript.cpp [deleted file]
src/linguist/lupdate/qscript.g [deleted file]
tests/auto/linguist/lupdate/testdata/good/parsejs4/expectedoutput.txt [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parsejs4/main.js [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parsejs4/project.pro [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parsejs4/project.ts.result [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parseqml2/expectedoutput.txt [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parseqml2/main.qml [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parseqml2/project.pro [new file with mode: 0644]
tests/auto/linguist/lupdate/testdata/good/parseqml2/project.ts.result [new file with mode: 0644]