The qlocalexml.py Locale.C() had to replicate a whole lot of data that isn't really relevant to how C differs from en_US and every addition to what we support required further additions to it. So pass the en_US Locale object to the pseudoconstructor so that C can inherit from it and only override the parts where we care about the difference. Hand-code shortening for short Jalali month names, to match Soroush's original contribution, and include the narrow forms in the hard-coded data to keep the generated data unchanged (for now). Note some of the departures from CLDR; we may want to drop these overrides later. In the process, convert the mapping from keys to locales to consistently use IDs for all members of the key, instead of using the (empty) code value for (as yet unused) variant; it now gets ID 0 and is consistent with returns from codesToIdNames(). This makes life easier for the code that now has to construct an en_US key. Task-number: QTBUG-115158 Change-Id: I3d7acb6a4059daec1bba341fcf015c39c7a6803b Reviewed-by: Kai Köhne <kai.koehne@qt.io> |
||
|---|---|---|
| .. | ||
| testlocales | ||
| README | ||
| cldr.py | ||
| cldr2qlocalexml.py | ||
| dateconverter.py | ||
| enumdata.py | ||
| formattags.txt | ||
| iso639_3.py | ||
| ldml.py | ||
| localetools.py | ||
| qlocalexml.py | ||
| qlocalexml.rnc | ||
| qlocalexml2cpp.py | ||
| zonedata.py | ||
README
locale_database is used to generate qlocale data from CLDR. CLDR is the Common Locale Data Repository, a database for localized data (like date formats, country names etc). It is provided by the Unicode consortium. See cldr2qlocalexml.py for how to run it and qlocalexml2cpp.py to update the locale data tables (principally text/qlocale_data_p.h, time/q*calendar_data_p.h and time/qtimezone*_data_p.h under src/corelib/). See enumdata.py and zonedata.py for when and how to update the data they provide. You shall definitely need to pass --no-verify or -n to git commit for these changes.