Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79902

QLocale: make fuller and more faithful use of the CLDR data

    XMLWordPrintable

Details

    • User Story
    • Resolution: Unresolved
    • P2: Important
    • 6.x
    • None
    • Core: Locales (i18n)
    • 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

          For Gerrit Dashboard: QTBUG-79902
          # Subject Branch Project Status CR V

          Activity

            People

              Eddy Edward Welbourne
              Eddy Edward Welbourne
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 16 weeks
                  16w
                  Remaining:
                  Remaining Estimate - 16 weeks
                  16w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Gerrit Reviews

                    There are no open Gerrit changes