Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
There are various ways that we fail to use CLDR fully and faithfully. At least:
- CLDR's date-time formatting is richer than ours
- CLDR distinguishes number formatting for percentages from that for currencies and ordinary numbers
- Some number formats have separators in a different pattern than the "thousands" pattern currently assumed
- CLDR locales can have variants (e.g. POSIX variant of C and Valencian variant of Catalan)
- Some fields that QLocaleData expects to store in a single QChar need a surrogate pair in at least some locales
- CLDR has more distinctions than just singular/plural when it comes to varying the forms of texts
The first two (at least) shall require incompatible API and behaviour changes.
All shall require significant re-working of QLocale and its associated classes.
Formatting of dates is handled rather clumsily between Q(Date|Time)+, QCalendar and QLocale. Some rationalisation of this following the addition of calendars (and the movement of some locale-specific data into the care of calendars rather than QLocale itself) shall likely be advantageous also.
Adding support for percentages to our existing (currency and) number formatting will complicate the APIs (in QLocale, QString, QByteArray and likely others), making this a good moment to streamline the existing APIs as far as possible.
All of the formatting-related aspects of this (and linked tasks) should be designed with an eye to eventual C++20 <format>-compatibility.
Attachments
Issue Links
- relates to
-
QTBUG-89383 QLocale.toCurrencyString doesn't return the right value for negative values
- Closed
-
QTBUG-112909 Support all CLDR's various ways of naming time-zones
- Open
-
QTBUG-82831 Do byte-amount formatting less wrongly
- Reported
-
QTBUG-67661 Inconsistencies of the behaviour of QLocale, and no respect to system's local
- Reported
-
QTBUG-81371 When QLocale formats numbers, it only uses localised digits for base ten
- Reported
-
QTBUG-75036 Qt Linguist UI wrongly says "Translate to English"
- Open
-
QTBUG-81343 QLocaleData::m_currency_rounding is unused
- Open
-
QTBUG-53811 QLocale::toString(double) ignores system settings for group separator (german)
- Closed
-
QTBUG-74287 QLocale::nativeCountryName does not use country information from locale object
- Closed
-
QTBUG-75845 QLocale reads country from language.
- Closed
-
QTBUG-84877 QLocale::system() uses short names of days and months for narrow formats
- Closed
-
QTBUG-94460 QLocale's names for languages, scripts and territories don't match CLDR's en.xml's proper names
- Closed
-
QTBUG-123872 time wrongly displayed in zh_TW locale
- Closed
-
QTBUG-75110 Number.fromLocaleString is stricter than DoubleValidator
- Closed
-
QTBUG-91351 QLocale::formattedDataSize() is implemented wrongly
- Closed
-
QTBUG-115743 Separate support for accounting and standard formatting of currencies
- Reported
-
QTBUG-70516 Extend Qt's support for CLDR date/time formatting
- Open
-
QTBUG-74286 Reimplement QLocaleData::stringTo(Uns|)LongLong() to take size of string
- Closed
-
QTBUG-95460 Support localized infinity and NaN representations
- Reported
-
QTBUG-66115 Let (QString|QLocale)::toFloat ignore trailing non-digits
- Open
-
QTBUG-81050 Do number-formatting correctly
- Closed
-
QTBUG-81053 Upgrade remaining single-UTF16-codepoint members of QLocaleData
- Closed
-
QTBUG-81344 Clean up the CLDR-digestion python scripts
- Closed
-
QTBUG-64942 Provide a way to map QLocale::Country values to ISO 3166 country codes
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-79902 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
288200,2 | Ensure we use UTF-8 for the emitted QLocaleXML data file | dev | qt/qtbase | Status: MERGED | +2 | 0 |
293934,10 | Take number system into account in currency format look-up | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
294144,7 | Change QLocale to use CLDR's accounting formats for currencies | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
294245,2 | Ensure we use UTF-8 for the emitted QLocaleXML data file | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
544309,37 | Implement feature timezone_locale's CLDR half | dev | qt/qtbase | Status: MERGED | +2 | 0 |
585932,3 | Use and recognize en-POSIX as BCP47 name of the C locale | dev | qt/qtbase | Status: MERGED | +2 | 0 |