summaryrefslogtreecommitdiff
path: root/src/linguist/lupdate
Commit message (Collapse)AuthorAgeFilesLines
* fix translation contextsOswald Buddenhagen2013-03-191-1/+1
| | | | | | | | the bootstrapped library now fakes the translation api sufficiently well to enable unifying the usage. Change-Id: I6a5d7cb1bb67830f1ea0a732566ebee354d62e7e Reviewed-by: hjk <hjk121@nokiamail.com>
* support only utf-8 and utf-16 for source codeOswald Buddenhagen2013-03-194-26/+23
| | | | | | | | | utf-16 is optionally used by java and msvc. it doesn't hurt to support it. all other encodings are not used anyway (other than 8-bit pass-through, but this is a matter for (the also removed) CodecForTr). Change-Id: Ie6482e187a9a8276918b53e97faeac88a40eb52c Reviewed-by: hjk <hjk121@nokiamail.com>
* purge CODECFORTR & -codecfortr supportOswald Buddenhagen2013-03-125-94/+28
| | | | | | | | qt-based code is expected to be utf8-encoded nowadays. the respective c++ interfaces have been purged in 5.0 already. Change-Id: I592b49f198aae05212afbf8d3aa2b01b1e9369dd Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* purge ui3 support from lupdateOswald Buddenhagen2013-03-123-27/+1
| | | | | | | | there is no qt3support in qt 5 any more. Change-Id: I9da9c209095a753d45419fb34a5737cd8dde4dc4 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-108-8/+8
| | | | | | | Change-Id: I9b11dc8309c9739955e3acea12b564d6ad608f59 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-081-2/+2
| | | | | | Change-Id: I494ad22447fe54be405698f2dfd79e4941019bdc Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Update information from Nokia to Digia and Qt ProjectSergio Ahumada2012-11-281-2/+2
| | | | | | | | Task-number: QTBUG-28156 Change-Id: I2d813a0f4fa266af004714f04b16501f5751c881 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* add support for TR_EXCLUDEOswald Buddenhagen2012-11-201-0/+17
| | | | | | | | this is necessary for excluding 3rd party code, etc. Change-Id: I2d32b6014741178bb8a62d29185241c90488754d Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't add DEPENDSPATH to VPATHOswald Buddenhagen2012-11-201-1/+0
| | | | | | | | follow suit with qmake ... Change-Id: Ie1748d2056c7218b76d75cddd0bc7fb3f66cf8f7 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* follow qt_tool.prf now setting up DESTDIROswald Buddenhagen2012-11-051-2/+0
| | | | | Change-Id: Ia54abc71a59fd5d82760983866e820f96ec29298 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-258-192/+192
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If89e41b25a242ff376eacdf8790957bcf499cc66 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove hand-written manifestOswald Buddenhagen2012-09-202-22/+0
| | | | | | | | | it seems that with msvc 2008 (now the first supported version) the necessary entry is added to the auto-generated manifest, so get rid of the hand-written one. Change-Id: Ibc49ee246f28e432f2ff0b2fedc32dd3aa620c7f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* make uninstalled lupdate & lrelease find qmakeOswald Buddenhagen2012-09-202-1/+7
| | | | | Change-Id: Ifbbb0be43f20a0def3fed1a32018faa17275a095 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* support listing translation files as sourcesOswald Buddenhagen2012-09-203-6/+67
| | | | | | | | | | | | source strings from such files are marked as obsolete; the only purpose is collecting possible translations. this is an obscure feature meant to facilitate the modularization of the qt catalogs. it's hard to describe in a few words (the format needed for -help), so leaving it undocumented (for now). Change-Id: I744ec7533425aee741b909bccf51442ca5241b10 Reviewed-by: hjk <qthjk@ovi.com>
* set the output directory for the qmake evaluatorOswald Buddenhagen2012-09-201-5/+25
| | | | | | | | this is necessary to make it find .qmake.super, which is necessary for execution in non-installed top-level builds. Change-Id: I8118363576ef19684cd17a6c0a23a7f8030b1104 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* support indirect SUBDIRSOswald Buddenhagen2012-09-201-1/+6
| | | | | | | that is, .file and .subdir "structs". Change-Id: I6c7ea5971642802a97461d821cb1544fcc986013 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* less esoteric parameter passing to processProject()Oswald Buddenhagen2012-09-201-13/+14
| | | | | | | | | | just pass around fully qualified file names instead of QFileInfos. a side effect of this is that error messages use full paths as well - this can be considered good or not. Change-Id: I55a7545064d32ac717ce9c57205ef59b76afc3f0 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* update qmake evaluator to newest version from qt creatorOswald Buddenhagen2012-09-201-31/+26
| | | | | | Change-Id: I66ec46dd87f922094f6937b50cc40e02ef08cc86 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* check availability of qmldevtools, not declarativeOswald Buddenhagen2012-09-201-2/+2
| | | | | | | that's the module we actually use Change-Id: I928778a8638a8d0b2022696120dcaf6aa28a9d6d Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* handle windows line endings in the qtdeclarative/js processorOswald Buddenhagen2012-09-201-2/+2
| | | | | | | apparently the parser does not do that any more, so do it here. Change-Id: Idd7259ba1435f14be2be5afafa40689a05ab62af Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-201-2/+0
| | | | | | Change-Id: Ifbef0323f3a3fc80b10ac2c8c8a8a68ce646c1e6 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* lupdate: use QMAKE_MANIFEST to embed our special manifest fileJoerg Bornemann2012-09-052-5/+1
| | | | | | | Task-number: QTBUG-27080 Change-Id: Ieacc116ef091f0473f2c543a76685f7c851a2456 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Properly handle include cyclesKevin Ottens2012-08-081-28/+75
| | | | | | | | | | | | | | | | | | | | Currently lupdate is just issuing a warning when it detects an include cycle. Since it's not a full preprocessor, most of those warnings are false positives, but they need special handling, this patch provides that. Now every result is stored as part of a cycle (so in the general case a cycle of one file). When detecting a cycle, instead instead of issuing a warning, we record the presence of the newly detected cycle for later use and merge the other relevant cycles with it. When retrieving results now it's not for a single file anymore but for a complete cycle at once (which can turn out to be a cycle of one file). Task-number: QTBUG-6587 Change-Id: Ia12bc680e645b9704a3178e8a843a554a60811bf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* make lupdate compilable without qml/js supportCorentin Jabot2012-07-303-3/+30
| | | | | | | | In case the declarative module is not present. Change-Id: I2652b245506e2a04c4e588f62de2a39ebf652677 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* "export" the linguist tools for qtPrepareTool() useOswald Buddenhagen2012-07-061-19/+4
| | | | | Change-Id: I2f7dee558e286e81b0f6a79bc428d1e5cda3321a Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Merge branch 'buildsystem'Oswald Buddenhagen2012-06-271-1/+1
|\ | | | | | | Change-Id: Ibe002ec394142f4e2d36a6d7e1fc0e1239a68672
| * build system cleanupsOswald Buddenhagen2012-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - load(qt_module) => load(qt_build_config) - remove: - CONFIG+=module (obsolete) - setup of PKGCONFIG* variables (automated now) - code relating to module version headers (automated now) - %mastercontent assignment (automated now) - pointless QPRO_PWD assignments - qmake -project boilerplate Change-Id: I64ce8134c471ccf674b6815878b4090a7eb8d961 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Allow the specification of includes in the lst-file in lupdate.Stephen Kelly2012-06-211-3/+15
| | | | | | | | | | Change-Id: I95805637b7c1bb7f6774a47928f21701ba212298 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Use app.arguments().size() instead of argc in the for loopStephen Kelly2012-06-211-1/+1
|/ | | | | | | | | We're looping over the contents of arguments() anyway, and it is more future proof to consider the size of the container in case QCoreApplication ever consumes arguments like QApplication does. Change-Id: Ic8ac49b910b13f8a6314447b132a788f6c38da20 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1 [Linguist]Thiago Macieira2012-05-031-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ibb3c04114e1a311ff70ef649d977524a6dfec0aa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Modify qtdeclarative javascript namespace to fix compilation failure.Toby Tomkins2012-04-241-1/+1
| | | | | | Change-Id: I7e49dbd6cab5ca2e715e327dab41969b1e18236c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix BuildAndreas Holzammer2012-04-201-1/+1
| | | | | | | isspace is in std namespace. Change-Id: Idc5f09c5c60df874fac9c91bb3a3538f4bea0998 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix warnings about deprecated QtDeclarative headers in lupdate.Friedemann Kleint2012-03-221-5/+5
| | | | | Change-Id: I9d15f16766da49488a170de93e3630b47e2e640f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-308-8/+8
| | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ib4b7580dda53886247ad6eb10d17d8e67c51980d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-238-8/+8
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I3841a7c154b90b73fe8f498fda035c8b3545c692 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* lupdate: Handle translation-attributes of string list properties.Friedemann Kleint2012-01-201-13/+29
| | | | | | | | | | | | | Stringlists now have translation attributes that apply to all items. Initial-patch-by: Jarek Kobus <jaroslaw.kobus@nokia.com> Task-number: QTBUG-8926 Task-number: QTBUG-20440 Change-Id: I230f3907631074df394238e30b3ed7a15adcca4b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-068-8/+8
| | | | | | Change-Id: I89fb3609f49f9a4f1e7d658b05e212febcb14c94 Sanity-Review: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve lupdateRoberto Raggi2011-12-134-5118/+286
| | | | | | | | | | | | | | | | | 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>
* lupdate: Allow trailing commas in QtScript/JS object literalsKent Hansen2011-12-062-512/+539
| | | | | | | | | | | | | | | As per ECMA-262 5th edition, section 11.1.5, trailing commas should be allowed in object literals. E.g. { foo: 10, } shouldn't cause a syntax error; the comma should simply be ignored. Task-number: QTBUG-22970 Change-Id: I3e730ad3001760475e5e40bb4a28a05b0baf5c7e Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* lupdate: Regenerate QtScript/JS parserKent Hansen2011-12-012-52/+67
| | | | | | | | | | | | The latest version of qlalr produces output that is different from the previous version, even if the grammar file didn't change. Also remove stale line from QtScript/JS grammar. (It had mistakenly been removed from the generated parser but not from the input file.) Change-Id: Icfc7d154230b5e908a9617c7c1a3cd607879bef9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* add -list-languages option to lupdateOswald Buddenhagen2011-11-091-0/+3
| | | | | | | | (cherry picked from commit 3b3788a25f58fc443a48672c8e852e1c8658ac4e) Change-Id: I4523cde9b12268790c32d4a129c962c3d48ed1b9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Make lupdate use QmlDevTools library for parsing QMLKent Hansen2011-10-072-9/+6
| | | | | | | | | | Gets rid of the dependency on the qtdeclarative sources. Change-Id: Ifbb00d856416943a3701f7355499667e11ecdf90 Reviewed-on: http://codereview.qt-project.org/6117 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed compile of lupdate.Rohan McGovern2011-09-211-2/+2
| | | | | | | | | | | | | lupdate wants to use private QtDeclarative symbols. Either the symbols need to be made public, or lupdate needs to compile its own copy of the code. This commit applies the latter approach. Change-Id: I119c2d044fe2a8953867f7b6e2fc446dee65cce3 Reviewed-on: http://codereview.qt-project.org/5181 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Merge remote-tracking branch 'origin/refactor' into masterLars Knoll2011-09-132-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/assistant/help/help.pro src/designer/src/components/formeditor/formwindow.cpp src/designer/src/components/formeditor/formwindow_dnditem.cpp src/designer/src/components/formeditor/layout_propertysheet.cpp src/designer/src/components/formeditor/qdesigner_resource.cpp src/designer/src/components/lib/lib.pro src/designer/src/components/signalsloteditor/signalsloteditor.cpp src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp src/designer/src/components/widgetbox/widgetbox_dnditem.cpp src/designer/src/components/widgetbox/widgetboxtreewidget.cpp src/designer/src/lib/lib.pro src/designer/src/lib/shared/qdesigner_formbuilder.cpp src/designer/src/lib/shared/qdesigner_propertysheet.cpp src/designer/src/lib/shared/shared.pri src/designer/src/plugins/qdeclarativeview/qdeclarativeview.pro src/linguist/lupdate/qdeclarative.cpp src/linguist/shared/profileevaluator.cpp src/linguist/shared/qph.cpp src/linguist/shared/ts.cpp src/qtconfig/mainwindow.cpp src/shared/qtgradienteditor/qtcolorline.cpp src/shared/qtgradienteditor/qtgradientwidget.cpp sync.profile Change-Id: I53f0ce4efae4179257cbf3aab87e1af12c3aa4ff
| * Get Linguist to compile againLars Knoll2011-09-132-25/+21
| | | | | | | | | | | | | | Change-Id: If65b0e046a277bd2c83c5188285de4e8d14101b8 Reviewed-on: http://codereview.qt-project.org/4832 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | remove Translator::contains()Oswald Buddenhagen2011-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | it's redundant with find() now, as the latter is cheap now (cherry picked from commit dc587b47af5fec8268ccd33935f6abe442ae8904) Change-Id: I60ea20943cd91e70b13d62eea4eda10eed1bd767 Reviewed-on: http://codereview.qt-project.org/4609 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | optimization: make the Translator::find() api index-basedOswald Buddenhagen2011-09-121-25/+27
| | | | | | | | | | | | | | | | | | (cherry picked from commit a107d3e22e128ec343d82f902de4c6ee0e33435f) Change-Id: I963374a6f81f35a3f74be4cb1d784d15e5829b0f Reviewed-on: http://codereview.qt-project.org/4608 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | synchronize qmake project parser with qt creatorOswald Buddenhagen2011-09-121-16/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qt creator as of ddb918f. not feeling like replaying the whole history ... (cherry picked from commit f1249f94c07654f0b76e7a90fb81ed5b58cd30f7) Conflicts: tools/linguist/shared/profileevaluator.cpp Change-Id: Ief6f9bc0eed4e8a759e95ed321d158f4017710d4 Reviewed-on: http://codereview.qt-project.org/4605 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Compile against the new QML front-end.Roberto Raggi2011-08-301-18/+14
| | | | | | | | | | | | | | | | Change-Id: I35b841b440a2cb3aa8cf180a8cc42613c0c41915 Reviewed-on: http://codereview.qt.nokia.com/3881 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Update licenseheader text in source files for qttools Qt moduleJyri Tahtela2011-05-2410-170/+170
|/ | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me