summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtranslator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-101-1/+1
|\ | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| * Fix off-by-one error in QTranslatorPrivate::do_load()Edward Welbourne2019-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | The central loop starts by reading five bytes; but the loop condition only checked that four were available. Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-201-1/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformintegration.cpp src/gui/kernel/qplatformintegration.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/xcb/qxcbconnection_screens.cpp Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
| * QTranslator: avoid unhandled exceptionAnton Kudryavtsev2019-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | Add std::nothrow param to avoid exception and to check pointer against nullptr. Change-Id: I505abb1ca15b8c10a80b0cd3784a6b0c4c6bcc1c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QTranslator: add initial largefile supportThiago Macieira2018-12-041-20/+13
|/ | | | | | | | | | Using QT_MMAP macro instead of mmap() so we could map more than 2 GB of the file. Not that the file format supports such a thing, but just in case. Change-Id: Iae320a2868db402a993dfffd15689bba1d667c7d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Allow loading of empty translation filesKai Koehne2018-07-121-6/+4
| | | | | | | | | | | | | | | | | | | | | Do not return false for loading an empty .qm file - that is, a valid file without any translations. We're already shipping empty .qm files for English translations of Qt since a while, mainly as a stop for the QTranslator::load(const QLocale &, ...) logic. Note that QCoreApplication::installTranslator() will still return false for an empty translation file - which is ok, because it arguably does not make much sense to install it. [ChangeLog][QtCore][QTranslator] It is now possible to load qm files without any translations. This is particularly useful for the language the untranslated strings are written in; logic to load translations can now handle the source language like all other languages. Task-number: QTBUG-31031 Change-Id: Ibcb84aa755538cb2fa21b14f8635295a58440bbb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Add qbswap for a memory regionThiago Macieira2018-07-041-2/+3
| | | | | | | | | | | | The compiler was generating some vectorized code for qresource.cpp but it wasn't very efficient. So improve upon it and make use in other places where we read UTF-16BE strings. [ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian that operates on a memory region. Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* doc: Fix three "Cannot tie" errorsMartin Smith2017-12-021-1/+1
| | | | | | | | | | Two of the three functions were for functions that should not be documented. The third was a function protected by #ifndef Q_OS_DARWIN, which required a test of Q_CLANG_QDOC in the header and cpp files. Change-Id: Id2ab3e4f2ea896dc628a622de2e80a19c18eb9fe Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QtCore: include mocsThiago Macieira2017-05-051-0/+2
| | | | | | | | | | | | | | | | | | | Compilation and link times in CPU seconds with GCC 7, using precompiled headers (not including moc, rcc, uic, etc. steps or headersclean): Before After Debug -O0 198,1 180,3 Debug -Og 240,7 229,2 Release -O3 267,1 249,2 Release LTO 239,4 229,8 QtCore required a little manual adjusting because some files are bootstrapped into moc itself and into qmake. Change-Id: I84e363d735b443cb9beefffd14b8b57c10e7da36 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QTranslator: use const to avoid detach()'ingAnton Kudryavtsev2016-08-111-2/+1
| | | | | | Change-Id: Idbab696affed9486e9077d72ba14ce409b98174c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CoreLib: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-07-021-1/+1
| | | | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTranslator: optimize string and char usageAnton Kudryavtsev2016-01-281-2/+2
| | | | | | | | | | | Port a QString::fromLatin1() to QStringLiteral. The string is never modified. Wrap char in QLatin1Char to construct a QChar with 8-bit character. Change-Id: I579ca9eae0c2a72ea893254f258b001063e9f64e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QTranslator: don't re-create QString each time through a loopAnton Kudryavtsev2016-01-261-2/+5
| | | | | | | | | | | | | Just cache it. Also port to QStringLiteral, because the string is never modified. Since the string literal is used in more than one function, to avoid duplication of .rodata, wrap the QStringLiteral in an inline function. Change-Id: Ib5aede9f129610c80d122939afc343c938cc8e48 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QTranslator: enable NRVO in find_translation() for poor compilersMarc Mutz2016-01-121-1/+2
| | | | | | | | | | | | | | | ... such as GCC. truncate(0) was chosen because it is already used throughout the function. Using clear(), say, which is inline, produces slightly more code. As is, saves 160b in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I415d09ad2b4547f1d69f78d85e2aa1c1f9a17ed3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QTranslator: optimize string handling in find_transformationMarc Mutz2016-01-121-1/+2
| | | | | | | | | | - Don't repeatedly truncate a (shared) QString, truncate a QStringRef instead, preventing a detach. Change-Id: I1a9cf7fc5bc9ea06279f7e2548f2bd144b8780a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QtCore: eradicate all Q_FOREACH loops [kernel]Marc Mutz2016-01-121-3/+3
| | | | | | | | Saves just 168b in text size on optimized GCC 4.9 Linux AMD64 builds, but most for loops are in non-Linux code. Change-Id: I4f20a65c2e4953011308ff831c9e8fa37a25274b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTranslator: don't repeatedly re-create a QString from a QLatin1StringMarc Mutz2016-01-111-2/+3
| | | | | | | | | | | | | ... each time around the loops. Cache it. Also use QStringLiteral, since the string will never be modified. Also saves 96b in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I0269586235da18f3073a553739561ea7db6356e8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QTranslator: re-use 'realname' capacity in find_translation()Marc Mutz2016-01-111-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | For almost the whole of its life time, 'realname' has the same prefix, but the old code used the same string-builder expression to construct it over and over again. If QStringBuilder would re-use the capacity of the LHS object, that would boil down to just a bit more copying of characters than necessary. But assigning a QStringBuilder expression to a QString works by implicit conversion of the QStringBuilder expression to a QString, followed by move-assigning the new QString into the old. The new code keeps the common prefix around, resetting 'realname' to that prefix with truncate, only appending the varying suffixes. In this way, one memory allocation per assignment is saved (ignoring a potentially required capacity increase in one of the appends here), and also some out-of-line QString dtor calls, since op+=(QString&, QStringBuilder...) doesn't create a temporary QString. Also saves ~1KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I0872a69c9111d7218567f06f8fefb010f2430532 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTranslator: Extract Method is_readable_file from find_translation()Marc Mutz2016-01-041-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code re-used a QFileInfo object, repeatedly setting new file names with QFileInfo::setFile(QString). But QFileInfo::setFile() simply assigns itself a new QFileInfo object: *this = QFileInfo(...) so it's just as efficient to re-create a new QFIleInfo object for every file name under test. To avoid extra {} for object lifetime scoping, factor the repeated evaluation of isReadable() && isFile() into a small helper function, which also creates and destroys the QFileInfo object. The deeper significance of this change is that it avoids implicit sharing of 'realname', which is permanently modified. A later patch will make changes that make 'realname' re-use its capacity through the lifetime of the find_translation() function, and sharing the variable implicitly will nip any auch attempts in the bud. Force the compiler to not inline the new function. There's really no point in spending ~0.5KiB in text size on inlining the code; the miniscule speed improvement is dwarfed by the memory allocation of the QFileInfo ctor, anyway. As a consequence, this change even saves 96b in text size on optimized GCC 4.9 Linux AMD64 builds, even though that wasn't even the goal. Change-Id: I08c5cbb7b6f1ba59440a1597e28d962ce63a7c65 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-061-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/global/qt-cpp-defines.qdocconf src/3rdparty/forkfd/forkfd.c src/corelib/codecs/qtextcodec.cpp src/corelib/kernel/qmetatype.cpp src/corelib/tools/qset.qdoc src/gui/accessible/qaccessible.cpp src/gui/image/qpixmapcache.cpp src/opengl/qgl.cpp src/tools/qdoc/generator.cpp src/widgets/kernel/qwidget.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
| * Doc: Don't advertise QLocale::system() in QTranslator::load documentationKai Koehne2015-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | Usually you want to use just QLocale(), and not QLocale::system(). They are both the same except when the user called QLocale::setDefault() beforehand. Change-Id: I2d9b13ac3ffec0005b1d9bf661eccdea276d34b1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Remove <qhash.h> where it's not usedMarc Mutz2015-04-201-1/+0
|/ | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-8/+12
|\ | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Fix warnings by MSVC 64 in qtranslator.cpp.Friedemann Kleint2014-12-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | kernel\qtranslator.cpp(880) : warning C4267: 'initializing' : conversion from 'size_t' to 'const uint', possible loss of data kernel\qtranslator.cpp(881) : warning C4267: 'initializing' : conversion from 'size_t' to 'const uint', possible loss of data kernel\qtranslator.cpp(882) : warning C4267: 'initializing' : conversion from 'size_t' to 'const uint', possible loss of data kernel\qtranslator.cpp(975) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data Task-number: QTBUG-39757 Change-Id: I54f130e1d83ecc1623ab3c7b9b4fb14de6351625 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Don't make invalid assumptions about memcmp()Albert Astals Cid2014-12-041-8/+12
| | | | | | | | | | | | | | | | In qtranslator.cpp match() Task-number: QTBUG-39757 Change-Id: I49e3ccc0ce900564bbe14609bfda47688382d5f3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Fix incorrect documentation from QTranslator::loadAki Koskinen2014-11-051-3/+2
| | | | | | | | | | | | Task-number: QTBUG-27506 Change-Id: I1b2d4ed2242efd52258c7f587c2121f9dde18a0d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Make the empty Q_ASSERT still check its argument for validityThiago Macieira2014-11-011-0/+1
|/ | | | | | | | | | | | | | | | | | | | | With the side-effect that variables and functions in the argument are now "used". This means we don't need to #ifndef functions only used in assertions: the compiler will eliminate them by dead code elimination. Due to the mandatory short-circuiting of the condition, no functions will ever be called and this expands to no more code than before. On the negative side, because we won't get warnings for unused variables initialized outside the Q_ASSERT, non-inlineable calls will not be elminated by dead code elimination, so they will remain in release code without warnings. Because of the expanded code now in Q_ASSERT, the Intel compiler's optimizer gets thrown: it complains that the non-void function is failing to return anything, so I had to add two return statements. Change-Id: I1bb79c9637a2771ef1ec093f901b8d2443788bd6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Doc: Fix description of QTranslator::translate()Kai Koehne2014-10-231-0/+5
| | | | | | | | | | | If the translations are incomplete it's actually not ensured that a translation without disambiguation is used: lrelease will drop the disambiguation from one of the identical messages if there is no message which actually has no disambiguation ... Task-number: QTBUG-30471 Change-Id: I1787f5c401a7afb964acbf8a8609ba328c8140a9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: recommend using QLocale for loading translationsLeena Miettinen2014-04-161-0/+6
| | | | | | | | | | | Users can choose to use different UI languages and regional settings on their devices. QTranslator::load(const QLocale &) function uses QLocale::uiLanguages() and not to the locale name, which refers to the formatting of dates and numbers. Change-Id: Iec6327dd1e91d913176499b23482d725b9d0a8aa Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-5/+5
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: QTranslator::translate() isn't an overload anymoreDavid Faure2013-06-191-2/+0
| | | | | | Change-Id: Ib50044da48be3fb4f43300aa285e15403bd8d65e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtBase: Doc: Replacing link with snippet in QTranslator.David Schulz2012-12-051-3/+3
| | | | | | | | Because the linguist examples are moved to qttools module, a link to the hellotr example broke. Change-Id: I2aeefc143578618396f5be38ed1d52afdd1f7436 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* QTranslator: Use resource memory instead of copying itThomas McGuire2012-11-021-35/+66
| | | | | | | | | Previously, translations in resource files were loaded through QFile and the data was copied. Now, simply use the resource memory in-place. Change-Id: I55a06c1e7bb15c169cc69b908b3021136beac9d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add parameter documentation.Frederik Gladhorn2012-10-161-1/+1
| | | | | Change-Id: I8ce85bbb286c3cb844ef600daa5e99432ee55b74 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Core: Fix gcc warning about signed/unsigned integer comparisonKai Koehne2012-09-181-1/+1
| | | | | | | Fix warning: 'comparison between signed and unsigned integer expressions' Change-Id: I5ce2857115137f9a06eddc74fda55ae49e37d345 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add \inmodule QtCore to all QtCore class doc bodiesThiago Macieira2012-08-231-0/+1
| | | | | Change-Id: I19100755c97cc155c76a859e19940e9f9222d34e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Misc documentation fixes triggered by qdoc errors/warningsShawn Rutledge2012-08-201-3/+3
| | | | | Change-Id: I6ca3b138114fe957a09e8ec2f22273865635fc8b Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Fix more qdoc errorsLars Knoll2012-08-201-6/+6
| | | | | Change-Id: Ieed340068327f37ea0f549d24ea49235994118f4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a couple of qdoc errorsLars Knoll2012-08-181-1/+0
| | | | | Change-Id: I79f689e08ed4a496052529af38fca72c3d4e04cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable modularization of translation files.Jan-Arve Saether2012-07-121-17/+60
| | | | | | | | | | | | | | | | | This is accomplished by introducing dependencies to catalogs. This requires one API change: QTranslator::load(const uchar *, int); changes to QTranslator::load(const uchar*, int len, const QString &directory = QString()); Since now, even the load from memory might need a directory if the memory block contains a qm file with dependencies. Change-Id: I781f333d07f53bb431d0a7b5fa1abe282dc4d338 Task-number: QTBUG-26138 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Doc: Prepare for building modular QtCore docs.Casper van Donderen2012-04-191-1/+1
| | | | | | | | | | | | This change fixes most qdoc errors in QtCore. There are about 900 left. The main thing this change does is moving documentation from qtcore from /doc/src to /src/corelib/doc. Other issues resolved are mis-use of qdoc commands. Change-Id: I002d01edfb13575e8bf27ce91596a577a92562d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Make numerus unsignedJoão Abecasis2012-03-301-6/+5
| | | | | | | It's the index number of the translation to be used. Change-Id: I959c6aaa1aad09e74286d201ea356bfc4409f02a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Pre-validate numerus rules: fail early, fail gracefullyJoão Abecasis2012-03-301-17/+80
| | | | | Change-Id: Ibb3d27b9ff3d2f356a7c5c98b98686342f001f8f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Verify presence of "magic cookie" before more expensive readsJoão Abecasis2012-03-301-5/+15
| | | | | | | | | | Moved this simple sanitation out of do_load as it will prevent us from loading misplaced (or misfound) files into memory in the first place. We'll still load anything minimally looking like a translation file. Change-Id: Ia138be010979d4a66d330f7414fce3df20727e68 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>