summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocale/tst_qlocale.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QLocale: Add fr_MA localeEl Mehdi Fekari2013-05-031-0/+1
| | | | | | | | French_Morocco locale was introduced in CLDRv22.1 and already exists in Qt5 Change-Id: I4f0452f421cf074eb2c4fae22351d430d5f02e42 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Irish locale to return correct date formatEl Mehdi Fekari2013-03-131-0/+3
| | | | | Change-Id: I89ad9b97dba6f76d34a23ec03b119fb51e592917 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QLocale: Update tamil's AM/PM textEl Mehdi Fekari2013-02-151-0/+4
| | | | | | Change-Id: I355d24fcaaf2c76b8bdbc51f71f931118f5cb3cd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QLocale: Update the Japanese and Czech localeEl Mehdi Fekari2013-02-121-0/+7
| | | | | | | | | | | - Japanese locale: Year should be displayed in 4 digits instead of 2 in short format - Czech locale: monthName should be displayed in lower case N.B: The changes above are already fixed on Qt 5 that uses an updated version (v22.1) of CLDR Change-Id: I40535ea60b1f6abdd3717a28adbcddaa63b39997 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update the Indonisian and Catalan locales in CLDR data:Mehdi Fekari2013-01-181-0/+12
| | | | | | | | - Indonisian locale (in.xml): to return correct AM/PM text and correct time Fomat - Catalan locale (ca.xml): to return correct time Format Change-Id: I65bbabdc6311dc3c958605cbc04e7a034243e9db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update Canadian(English) localeMehdi Fekari2013-01-101-0/+4
| | | | | | | | | Update dateFormat in Canadian(English) locale ("en_CA") to return: M/d/yy instead of: yy-MM-dd (Long: dddd, MMMM d, yyyy instead of EEEE, d MMMM, y) N.B: This doesn't concern Qt5 that uses the most recent version of CLDR (22.1) which already contain the fix above. Change-Id: I99f841c8f397086435d928d749c4d67e779f31f8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Update Turkish and Irish locales dataMehdi Fekari2013-01-071-0/+12
| | | | | | | | | | | | | | | Update Turkish and Irish locales data The Irish/Gaelic locale data (CLDRv2.0) in Qt4.8 doesn't provide all month/day names, and the Turkish AM/PM texts are not updated. This patch updates the locales data below and provides an autotest to compare the expected vs returned values: - Irisch locale data (based on ga.xml file): Add month/day names in both short and long foramt based on CLDRv22.1 data. - Turkish locale data (basod on tr.xml file): Update AM/PM text to return "ÖÖ/ÖS" instead of "AM/PM". N.B: This doesn't concern Qt5 that uses the most recent version of CLDR (22.1) which already contains the fixes above. Change-Id: Ic61ba192619582bdc6bb729f4b91f31ae2894ee0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update defaultNumberingSystem value for some indic and slovak countries/regionsmfekari2012-12-141-0/+40
| | | | | | | | | | | | | | | | | Qt gets the information about locale digits from the <defaultNumberingSystem> entries in the CLDR data xm files. Current CLDR data in Qt4.8 is 2.0, which specifies native digits for most of Indic locales and arabic digits for slovak locale. This doesn't concern Qt5 that uses the most recent version of CLDR (22.1) which specify Latin digits for the locales in question. This patch updates the defaultNumberingSystem (to latin) and provides an autotest to compare the returned vs expected digits for the following langagues/regions: - Gujarati, Hindi, Kannada, Konkani, Malayalam, Marathi, Nepali, Punjabi, Tamil, Telugu (to use latin digits instead of native ones) - Slovak (to use latin digits instead of arabic ones) Change-Id: I04364cdb80292f7705b1321377623298a01a9c5b Reviewed-by: Vladimir Minenko <vminenko@rim.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* test: fix tst_QLocale::macDefaultLocaleSergio Ahumada2012-11-121-5/+9
| | | | | | | | | | | | | 1. There is a behaviour change for CFDateFormatterGetFormat() between 10.6 and later, QLocale::dateFormat(QLocale::LongFormat) will return "MMMM d, yyyy" for 10.6 and "MMMM d, y" for 10.7, 10.8 2. Add a comment for toCurrencyString() test, need another system settings (back port from qtbase 65685fbd2a3a587e654807d9ce44708064afdfa2) Task-number: QTBUG-27790 Change-Id: I668ff8882cf676d4420bf4dd66dc2cdd3b84fc18 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Update Qlocale data with CLDR 2.0.0Konstantin Ritt2012-11-101-366/+54
| | | | | | | Change-Id: Ia5adad0b51a8db6e91ad60288eab67e506c19e47 Reviewed-by: Mehdi Fekari <mfekari@rim.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update Qlocale data with CLDR 1.9.1Konstantin Ritt2012-11-101-1/+1
| | | | | | | | this is the same data we have in Qt 5 right now. Change-Id: Ic4cea4fdde2001432f33b0cb658508756cc9e8d3 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* Fix autotests that no longer find executables on Windows.Friedemann Kleint2012-09-301-1/+24
| | | | | | | | | | | The tests are now run from the 'debug', 'release' subdirectories on Windows by 'make check'. Go up one directory so that the relative paths are correct. Non-network tests. Change-Id: I8d0f806ff6708c3111a39c861ed46b21881acc7b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * Merge remote branch 'origin/4.8' into qa-review-masterRohan McGovern2011-05-151-3/+158
| |\ | | | | | | | | | | | | | | | Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * | Reduce usage of Q_ASSERT in autotests.Jason McDonald2011-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using Q_ASSERT does nothing in release-mode builds, and in debug builds it causes tests to terminate prematurely. It is much better to use QVERIFY or QCOMPARE. Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
| * | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| |/ |/| | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | QLocale: Fixed double to currency string conversion on Mac.Denis Dzyubenko2011-04-141-3/+3
| | | | | | | | | | | | | | This also fixes the autotest failure on mac with macDefaultLocale test. Reviewed-by: trustme (cherry picked from commit 78d47f520b2c4acdf782d39311063f5d44376913)
* | Merge remote branch 'origin/master' into 4.8-earthDenis Dzyubenko2011-03-281-1/+5
|\ \
| * | tst_qlocale: improve failure message in tst_QLocale::macDefaultLocaleRohan McGovern2011-03-281-1/+5
| | | | | | | | | | | | | | | | | | Use QVERIFY2 to output more details about this failure. Reviewed-by: Toby Tomkins
* | | replaced weekendStart and weekendEnd with weekdays functionZeno Albisser2011-03-211-4/+7
| | | | | | | | | | | | | | | Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17088
* | | Using list patterns to get a string from list in QLocale.Liang Qi2011-03-081-0/+35
| | | | | | | | | | | | | | | Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17097
* | | Added writing script support to QLocale.Denis Dzyubenko2011-03-021-4/+35
| | | | | | | | | | | | | | | Task-number: QTBUG-17105 Reviewed-by: trustme
* | | Improved currency value to string conversion in QLocale.Denis Dzyubenko2011-02-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a second, optional, argument to QLocale::toCurrencyString() that represents a currency symbol that is supposed to be added to the formatted string. Task-number: QTBUG-17100 Reviewed-by: Zeno Albisser Reviewed-by: Olivier Goffart
* | | Merge branch 'master-i18n' of scm.dev.nokia.troll.no:qt/qt-earth-team into ↵Denis Dzyubenko2011-02-241-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | master-i18n Conflicts: src/corelib/tools/qlocale.cpp
| * | | Implemented QLocale::weekendStart and QLocale::weekendEndZeno Albisser2011-02-241-0/+11
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17088
* | | | QLocale improvements on unix/linux.Denis Dzyubenko2011-02-241-0/+3
|/ / / | | | | | | | | | | | | | | | There is no reason to re-read environment variables all the time. Reviewed-by: Zeno Albisser
* | | Added UI languages property to QLocaleDenis Dzyubenko2011-02-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | The return value is a sorted list of locale names that could be used for presenting data to the user (i.e. for translations). Task-number: QTBUG-7329 Reviewed-by: Zeno Albisser
* | | Implemented QLocale::quoteString(...)Zeno Albisser2011-02-221-0/+16
| | | | | | | | | | | | | | | Reviewed-by: Denis Dzyubenko Task-number: QTBUG-17096
* | | Merge remote branch 'earth-team/4.7-i18n' into master-i18nDenis Dzyubenko2011-02-211-0/+3
|\ \ \
| * | | Fixes QLocale locale name parsing.Denis Dzyubenko2011-02-031-0/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Allow BCP47 dash as a language-country separator. This only changes it one way - parsing 'en-US' will work, but QLocale::name() will still return name with underscore as separator. Task-number: QTBUG-15835 Reviewed-by: João Abecasis
* | | Changed the qlocale autotestDenis Dzyubenko2011-02-181-4/+4
| | | | | | | | | | | | | | | | | | | | | Moc was failing on the string constructed using multiple quoted strings. The following fails to parse: "foo""bar". Reviewed-by: trustme
* | | Added currency support for QLocaleDenis Dzyubenko2011-02-171-0/+27
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | REMARK: This commit is missing updated static cldr data in src/corelib/tools/qlocale_data_p.h that has been left out intentionally to avoid repository bloating. Before compiling make sure to update that file using the scripts util/local_database/cldr2qlocalexml.py and util/local_database/qlocalexml2cpp.py. Otherwise you will most likely experience segmentation faults. Task-number: QTBUG-17100 Reviewed-by: Zeno Albisser
* | Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
|/ | | | Reviewed-by: Trust Me
* Added default countries for Mongolian and Nepali.Denis Dzyubenko2010-05-191-0/+4
| | | | | Task-number: QTBUG-9370 Reviewed-by: trustme
* Updated tst_qlocale autotest.Denis Dzyubenko2010-05-191-1/+88
| | | | | | | Added countries/languages that were added in new cldr and forgotten to be added to the autotest. Reviewed-by: trustme
* Added support for es_419 locale.Denis Dzyubenko2010-05-181-0/+3
| | | | | | | | Added a new country code "419" which stands for "Latin America and the Caribbean". This is the first three-letter country code (from UN M.49). Task-number: QT-3312 Reviewed-by: Thiago Macieira
* Upgraded QLocale to Unicode CLDR 1.8.1Denis Dzyubenko2010-05-181-2/+2
| | | | Reviewed-by: trustme
* Autotest: update to the new values for the localeThiago Macieira2010-04-171-3/+3
|
* Revert "Optimized QLocale to access system locale on demand."Morten Johan Sørvig2010-03-241-6/+0
| | | | | | | | This reverts commit 0d3c62150f2fa2c06f7676336076be4622059cc3, which causes the following (intermittent) test failuers: TESTCASE_FAIL qtconcurrentmap (pulse_qws/linux-x86-g++) TESTFUNCTION_FAIL qtconcurrentmap::mapped (pulse_qws/linux-x86-g++)
* Upgraded QLocale data to Unicode CLDR 1.8.0Denis Dzyubenko2010-03-221-14/+19
| | | | Reviewed-by: Frans Englich
* Optimized QLocale to access system locale on demand.Denis Dzyubenko2010-03-171-0/+6
| | | | | | | | | | | | | | | | | Changed the initialization of the system locale to make construction of the QLocale object as lightweight as possible. So now the default contructor just creates a QLocale and QSystemLocale objects, but doesn't try to fill the cache in the latter with data from the system and postpones it until it is actually requested (most applications create QLocale objects on the stack and might not even use the data from the system locale, so we don't need to initialize system locale right away). This is an improved version of an already reverted change 8911ed8bfe7f918b93c758f9b5d93274b37739e6, 8911ed8bfe7f918b93c758f9b5d93274b37739e6 and 8911ed8bfe7f918b93c758f9b5d93274b37739e6. Reviewed-by: Thiago Macieira
* add test for toDateTime() using QLocale::LongFormatShenghua Su2010-02-171-20/+5
| | | | | Merge-request: 455 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* remove debug infoShenghua Su2010-02-171-1/+1
| | | | | Merge-request: 455 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* add test case for QTBUG-7898 that QLocale::toDateTime(QString, FormatType) ↵Shenghua Su2010-02-171-0/+20
| | | | | | | cannot convert value correctly Merge-request: 455 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Revert "Optimized QLocale to access system locale on demand."Denis Dzyubenko2010-02-171-6/+0
| | | | | | | | | | | | | | | The change introduces regression in QIntValidator and QInputDialog, which needs to be addressed before pushing the change again. Also reverted the following two compile fixes: Revert "Don't use QSystemLocale if QT_NO_SYSTEMLOCALE (like QWS)" Revert "Don't use QSystemLocale if QT_NO_SYSTEMLOCALE (like QWS)" This reverts commit c786e0cd3c40193073ce2f59f98a4d83bbe1a9b9. This reverts commit 9e5176070cdeba3e96f1969cfbb71bbd407a651e. This reverts commit 8911ed8bfe7f918b93c758f9b5d93274b37739e6. Reviewed-by: trustme