summaryrefslogtreecommitdiffstats
path: root/util/locale_database
Commit message (Collapse)AuthorAgeFilesLines
* Change C locale's short date format to use two-digit monthEdward Welbourne2025-09-301-1/+1
| | | | | | | | | | | | | | | | | | It was previously the only locale using short month name in the short date format, where all others used two-digit or unpadded month number. Since this anomalous format was used by no other locale and wasn't even a substring of some locale's long format, but was one of the first in date_format_data[], most other locales' date formats have changed position within this block of character data, causing trivial changes to two columns of the main locale_data[] table. [ChangeLog][QtCore][QLocale] The C locale now, in line with all locales derived from CLDR data, uses numeric month rather than the abbreviated month name. Change-Id: I5451036fa170236d88a46bef93a37c299de53a63 Reviewed-by: Thiago Macieira <[email protected]>
* Remove seconds from C locale short time formatEdward Welbourne2025-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is for consistency with other locales, none of which include seconds in their short formats. Until Qt 5.0.0's update to CLDR 1.4 (commit 3bfb72b90151339d85af3d064839beb40a82f933 in the git-p4 history, 2006-09-15) the other locales did include seconds, but since then they have not. However, the C locale retained its seconds. Since the C locale is used as fall-back for locales for which we have no data, this affects all such locales as well. Since the resulting short time format is, like its prior longer form, a sub-string of the long time format, the change doesn't affect the time_format_data[] or trigger any consequent changes to other rows of the main locale_data[] table. Only the C locale's own row changes, just shortening the substring it reuses. [ChangeLog][QtCore][QLocale] The C locale now, in line with all locales derived from CLDR data, omits seconds from its short time format. Fixes: QTBUG-140643 Change-Id: Ic5f181dc581c70a28afdd3f8f32b78190e818131 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Ahmad Samir <[email protected]>
* cldr2qlocalexml/localetools: Open files as UTF-8Mårten Nordheim2025-07-032-3/+3
| | | | | | | | | | To avoid errors like: 'charmap' codec can't encode character '\u02bc' in position <x> Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-137782 Change-Id: I100485c14121e5ffad7b0106e617b7f0afd7822e Reviewed-by: Edward Welbourne <[email protected]>
* Update CLDR to v47Mårten Nordheim2025-06-191-2/+16
| | | | | | | | | | | | | | Some of the changes required updating the tests. Like spanish separators and (English,France) now returning France instead of United States for territory. [ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to v47. Pick-to: 6.10 6.9 6.8 Task-number: QTBUG-137782 Change-Id: Ic939666b9718d59ab28c51f65ac38cf84b97bf93 Reviewed-by: Ivan Solovev <[email protected]>
* Add terminal rows to various QtTimeZoneLocale tablesEdward Welbourne2025-02-101-4/+12
| | | | | | | | | | | | | | This fixes some read-past-end issues in assertions that verify the next row of a table after the last for a specific locale belong to a later locale. Since those assertions happen without sight of the table of which the locale's range is a part, they can't tell when the range's end is in fact the table's end - so they shouldn't have been reading from a row there. Fix by putting a row there, that belongs to a nominal locale with index out of range. Pick-to: 6.9 Change-Id: Ib9d227ca4f86c372c13f963a08a8d637eae63ed0 Reviewed-by: Ivan Solovev <[email protected]>
* Skip zone naming with no CLDR dataEdward Welbourne2025-01-291-4/+23
| | | | | | | | | | | | In the git version of CLDR v46.1, Acre's metazone inherits a generic long name. However, root provides no metazone data for it to inherit. So we ended up with an empty entry for Acre in the QlocaleXML file. Harmless, but easy to avoid, so avoid it. Pick-to: 6.9 6.8 Task-number: QTBUG-132851 Change-Id: I392d0922bebff731632e729a4931caa02dc3a404 Reviewed-by: Mate Barany <[email protected]>
* Update CLDR to v46Mate Barany2025-01-062-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | New languages added with v46 - Kara-Kalpak - Swampy Cree Several new Chinese-language locales have been added, including one using Latin script, which invalidated some prior QLocale tests, which have been adjusted to fit. Some obsolete time-zone identifiers are now treated as deprecated aliases. These have lost their AnyTerritory association, implying changes to QTimeZone tests. Many redundant likely sub-tag rules for unspecified language have been dropped, in favor of simpler rules. [ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to v46. Task-number: QTBUG-130877 Pick-to: 6.9 6.8 Change-Id: I92cf210422c7759dd829a7ca2f845d20e263d25b Reviewed-by: Edward Welbourne <[email protected]>
* QLocale: fix likely subtags to include und -> en_Latn_USEdward Welbourne2024-12-052-3/+1
| | | | | | | | | | | | | | | | The lack of this was hidden by other rules (redundant with it) until CLDR v45, but v46 prunes the redundant rules, breaking this. So include the missing rule and tweak the code that assumed likely sub-tag rules preserved language, since this one doesn't. Rework the tail of withLikelySubtagsAdded() to correctly use this rule, now that we have it. (The prior comment about there being no match-all was wrong: CLDR did have it, but our data skipped it.) Amended one test affected by it (when system locale wasn't en_US). Pick-to: 6.8 Task-number: QTBUG-130877 Change-Id: I2a415b67af4bc8aa6a766bcc1e349ee5bda9f174 Reviewed-by: Mate Barany <[email protected]>
* Correct handling of World in mapping MS's zone IDs to IANA onesEdward Welbourne2024-12-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AnyTerritory entries in the zoneDataTable are derived from territory="ZZ" entries in the upstream CLDR data; the World ones from territory="001". The latter give the default IANA ID for each MS ID, the former give an (often legacy) IANA ID for the MS ID, that is not based on geography. Some of these are being removed at CLDR v46. The documentation said the ZZ entries have "no known territorial association", hinting that there may be some (unknown) territorial association; however, CLDR's inclusion of them is as entries with a known non-territorial association, so revise the phrasing to reflect this. Also document that windowsIdToDefaultIanaId() returns empty when there is no territory-specific value, and callers can use the territory-neutral call to get a suitable value in that case. (They may, however, wish to distinguish this case, to treat it differently, so I decided not to just return that in place of empty in any case.) The upstream CLDR tables do have entries for territory 001, so we should report these if asked for World as territory. Amend the available zone ID lookup and mapping from MS to IANA functions that take a territory to duly handle World via the default-data that was derived from 001 data in CLDR, instead of from the territory-varying table, from which those were effectively filtered out when generating the two tables. Update docs to mention this handling of World, for contrast with that of AnyTerritory. In the process remove a spurious split-on-space from the MS to default IANA lookup, asserting there is no space (in a field now stored in the table for single IANA ID entries, instead of the one for space-joined lists of them in which it used to be stored, before I noticed it's always only one ID). There is a matching assertion in the cldr.py code that extracts the data. Added an assertion to this last, that each default IANA ID given by CLDR's MS data does in fact also appear as one of the IANA IDs for at least one territory (potentially ZZ), and comment in C++ code on why this means we don't need to scan the windowsDataTable in a few places, where it would just produce duplicate entries. [ChangeLog][QtCore][QTimeZone] Corrected handling of QLocale::World and clarified in docs how QLocale::AnyTerritory is handled when QTimeZone selects zones by territory. Pick-to: 6.8 Task-number: QTBUG-130877 Change-Id: I861c777c68b0cb73a194138fe23fbff839df49e6 Reviewed-by: Thiago Macieira <[email protected]>
* QSystemLocale: add group size queryEimen Oueslati2024-11-271-6/+6
| | | | | | | | | | | Add a GroupSizes struct and a corresponding query type to QSystemLocale that would return a struct of form struct { int first, higher, least; } by consulting suitable platform-specific APIs. Fixes: QTBUG-109955 Change-Id: I2deee814f161ac914f810080866eea1cc432acbe Reviewed-by: Edward Welbourne <[email protected]>
* QLocaleXML: use XML-safe form to write exemplar city contentEdward Welbourne2024-11-261-1/+1
| | | | | | | | | | | | | | Although the other parts of the locale-specific data for zone name L10n were written using safeInTag() I'd foolishly used plain inTag() for the exemplar city - which, of course, can also contain crazy stuff and, it turns out, one of them (albeit this may be a CLDR "whoopsie") does in fact end in a &lt; (in xnr.xml in v46). So use safeInTag() there as well and be faithful to CLDR (even if this does turn out to be an error). Task-number: QTBUG-130877 Change-Id: Idca22ce689cdd2409c50078498a2badfeecd4de2 Reviewed-by: Mate Barany <[email protected]>
* Add type annotations to LocaleMate Barany2024-11-141-10/+12
| | | | | | | Task-number: QTBUG-129564 Pick-to: 6.8 Change-Id: I6fe00162251ffa56c86ba2af98b8f066c9b5f09b Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to QLocaleXmlWriterMate Barany2024-11-112-39/+52
| | | | | | | | | | Also fix the annotation of englishNaming in cldr.py. Spotted it while annotating __enumTable. Task-number: QTBUG-129564 Pick-to: 6.8 Change-Id: I93f698b4cf1b5ae90c21fe77330e4f167143a9f3 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to SpacerMate Barany2024-11-081-6/+6
| | | | | | | Task-number: QTBUG-129564 Pick-to: 6.8 Change-Id: I942d135da630f7ba6641170a1a597b0578aca878 Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Add type annotations to QLocaleXmlReaderMate Barany2024-11-071-79/+108
| | | | | | | Task-number: QTBUG-129564 Pick-to: 6.8 Change-Id: I8711152840e6bcb39ff1b1e67ff60b53801f28f0 Reviewed-by: Edward Welbourne <[email protected]>
* Simplify QLocaleXmlWriter.__openTag()Edward Welbourne2024-11-041-4/+2
| | | | | | | | | The other methods that open a tag, potentially with attributes, all now share __attrJoin() as the tool to combine the attributes and the tag. Do the same in __openTag(). Change-Id: Ib252b5901b9e1459cbb8c5706ff56f1b7b639d3d Reviewed-by: Mate Barany <[email protected]>
* Make static constexpr data tables inline in corelib/t*/q*_data_p.hEdward Welbourne2024-10-301-21/+21
| | | | | | | | | | This should keep gcc from complaining that they're unused const variables. Pick-to: 6.8 Fixes: QTBUG-128930 Change-Id: I4d0bccc5f158dfc72e4cf38a085b90cb562dc185 Reviewed-by: Thiago Macieira <[email protected]>
* Remove unused kids from qlocalexml.pyMate Barany2024-10-291-2/+0
| | | | | | | | | These are probably remnants of times forgotten. Task-number: QTBUG-129564 Pick-to: 6.8 Change-Id: Ic3ec03201758801e341253cd82ab8034f7fde9b7 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to CldrReaderMate Barany2024-10-242-24/+37
| | | | | | | | | | | | Add some type annotatons to cldr2qlocalexml.py as well. Based on the default arguments the constructor of CldrReader was expecting callables that return None, but in reality we are passing in functions that return integers. Task-number: QTBUG-129613 Pick-to: 6.8 Change-Id: I06832240956ea635ca0cc0ec45c466a3b2539ff7 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to CldrAccessMate Barany2024-10-242-74/+94
| | | | | | | Task-number: QTBUG-129613 Pick-to: 6.8 Change-Id: I8a00cca718554909b7ab9dcad15cc9b9ac702e94 Reviewed-by: Edward Welbourne <[email protected]>
* Fix check for duplicated Windows time-zone IDsEdward Welbourne2024-10-231-1/+2
| | | | | | | | | | | A missing update of a "last" variable meant the loop inevitably did nothing useful. Include type-annotation for last, while doing this. Thankfully the check still doesn't find any duplications, now that I've fixed it so that actually would, were any present. Pick-to: 6.8 6.5 Change-Id: I672e6570359a3ff102a364d8af98c5c8c0bdc4d9 Reviewed-by: Mate Barany <[email protected]>
* Fix typos in documentationEdward Welbourne2024-10-231-1/+1
| | | | | Change-Id: I04436e3f399b44ca541f9b2868857a7e2adccaf2 Reviewed-by: Jaishree Vyas <[email protected]>
* Add type annotations to LocaleScannerMate Barany2024-10-232-59/+67
| | | | | | | Task-number: QTBUG-129566 Pick-to: 6.8 Change-Id: I768fda6b5202ebabc8283ecedead9157653862be Reviewed-by: Edward Welbourne <[email protected]>
* Remove unused parameters, variables from cldr.py and ldml.pyMate Barany2024-10-232-3/+3
| | | | | | | | | Found these while adding type annotations. Task-number: QTBUG-129566 Pick-to: 6.8 Change-Id: I51c8e5676f958094946c0e6f396b98c083fd9de0 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to XmlScanner and Supplement in ldml.pyMate Barany2024-10-231-5/+7
| | | | | | | Task-number: QTBUG-129566 Pick-to: 6.8 Change-Id: I0300e97222c9d4b3e521a147e58c948c0015ad59 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to the Node class in ldml.pyMate Barany2024-10-221-17/+22
| | | | | | | Task-number: QTBUG-129566 Pick-to: 6.8 Change-Id: I70a85654584cdd1117cd670337709620ad84e6d8 Reviewed-by: Edward Welbourne <[email protected]>
* Add some type annotations to main in qlocalexml2cpp.pyMate Barany2024-10-221-7/+7
| | | | | | | Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: Iaf5a25da86dd330bdab893b34c7c1288e239a182 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to three classes in qlocalexm2cpp.pyMate Barany2024-10-221-9/+12
| | | | | | | | | | Add type annotations to CalendarDataWriter, TestLocaleWriter and LocaleHeaderWriter. Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I2c9168fda9cb79cbef3e7ef32ec67270ce168a1b Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to LocaleDataWriterMate Barany2024-10-211-17/+21
| | | | | | | Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I63e4db06d92e7c2457a802f93372545f9ae749f1 Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to LocaleZoneDataWriterMate Barany2024-10-171-24/+28
| | | | | | | | Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I6c86669aaaddd191e1fbc84dadbd61083948c3a8 Reviewed-by: Cristian Maureira-Fredes <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Add type hints to LocaleSourceEditor and TimeZoneDataWriterMate Barany2024-10-171-44/+54
| | | | | | | Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I5dabb5e721b610bc9edb01b86aa173d03c36a48a Reviewed-by: Edward Welbourne <[email protected]>
* Add type annotations to ByteArrayData, StringDataToken and StringDataMate Barany2024-10-172-33/+34
| | | | | | | | | | Add some type hints to unicode2hex as well, it is used by ByteArrayData. Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I86b7ce8567483bf8a4d4db78c9585652526cb90d Reviewed-by: Edward Welbourne <[email protected]>
* Locale data extraction: deal with an old TODOEdward Welbourne2024-10-171-21/+8
| | | | | | | | | | | | | | | | | | | | Unify generation of the data on enum-related names (and their indices) with that of the data for the corresponding codes. This produces the same tables, just in a different order, putting each code table right after the name table and its indexing. It'll mean more conflicts on picking future updates back to 6.8 and before, but those should usually involve regenerating data anyway, even when they don't get (visible) conflicts, so this'll just encourage doing that. As the TODO comment noted, the reason for keeping the table separate was just that, during a major rewrite of the scripts (most of five years ago), I wanted to be sure data didn't change. We've stabilised plenty since then, so it's time to do that clean-up. Change-Id: I0c3ee9d41d85debdba8b8b2624f137fadb6d8a3f Reviewed-by: Mårten Nordheim <[email protected]>
* Add type annotations to LocaleKeySorterMate Barany2024-10-162-8/+10
| | | | | | | | Task-number: QTBUG-128634 Pick-to: 6.8 Change-Id: I9a4261746cac029b0abf26fbd03b1915a0035147 Reviewed-by: Edward Welbourne <[email protected]> Reviewed-by: Cristian Maureira-Fredes <[email protected]>
* Fix sorting of timezone alias table to be in case-insensitive orderEdward Welbourne2024-10-081-1/+2
| | | | | | | | | | | | The lookup into it is done case-insensitively (because user-supplied names of zones might not have the right case) but I forgot to make the sorting of the data table case-insensitive in the aliases. Regenerate data: only the qtimezone*_data_p.h are changed by the reindexing of zone aliases. Pick-to: 6.8 Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396 Reviewed-by: Thiago Macieira <[email protected]>
* Purge some archaic complications from CLDR parsingEdward Welbourne2024-09-202-38/+16
| | | | | | | | | | | | | | | | | | | | | | Apparently there used to be a mechanism where an alias element in a top-level LDML element could serve to provide a parent locale as its source attribute. That is long gone and, since at least a decade ago, alias elements only ever appear in root.xml, with source="locale" and a path that starts ../ (so is a relative XPath). Ditch some complications (that I transcribed faithfully five-ish years ago when transforming the scripts), replacing them with assertions that check what's now documented in the LDML spec and confirmed by my own grep-checks in the CLDR data. This incidentally made one prior (weaker) check redundant, so I've now removed that from the look-up for the tags that identify a locale. That look-up is only ever performed after the DOM root nodes it uses have come through the scan of locale roots that now does the stronger check. Makes no difference to generated data. Change-Id: I811ffbef5f5ecb69183d68fa8bda57281f2a579d Reviewed-by: Mate Barany <[email protected]>
* Use replace instead of rename in localetools.pyMate Barany2024-09-171-1/+1
| | | | | | | | | | | | | | On Unix, if target exists and it is a file, rename silently replaces it if the user has permission. However, on Windows, if the target exists, FileExistError will be raised. With replace, if target points to an existing file or empty directory, it will be unconditionally replaced. Pick-to: 6.8 Change-Id: I2774152fec78a00c4ca6c9d1b927e503df2f2e84 Reviewed-by: Mårten Nordheim <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
* Add a note to README about encoding errors on windowsMate Barany2024-09-171-0/+3
| | | | | | | | | | | | Using the default system encoding cldr2qlocalexml.py and qlocalexml2cpp.py may terminate with encoding errors on Windows. Warn the user to set the PYTHONUTF8 environment variable to 1 before running those scripts to avoid encoding errors. Pick-to: 6.8 Change-Id: I315a45072cb6ea516d3e9bb7613c6f251792ec59 Reviewed-by: Mårten Nordheim <[email protected]>
* Fix typo in cldr.pyMate Barany2024-09-171-1/+1
| | | | | | | | | The variable ianalist is not really used for anything, it was probably meant to be ianaList. Pick-to: 6.8 Change-Id: Ie9f42bf9716da28ee0017319dda96389c415ef4f Reviewed-by: Edward Welbourne <[email protected]>
* Include relevant Unicode Inc. copyright line in generated data filesEdward Welbourne2024-08-301-1/+3
| | | | | | | | | | This amends commit 880d1aef99a6826c8dd690b13e1ca6ea5574f403 and extends it to cover the testlocales program under util/. Pick-to: 6.8 6.7 6.5 Task-number: QTBUG-121653 Change-Id: I3efadc69ce08810876f8e20aa4636c7624728153 Reviewed-by: Lucie Gerard <[email protected]>
* Implement feature timezone_locale's CLDR halfEdward Welbourne2024-08-271-1/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim is to provide CLDR-derived localized timezone display names, enabling the MS, TZ and soon-to-be-added C++20 chrono::tzdb backends to deliver localized names when ICU is not available. Internal feature timezone_locale controls access to locale-appropriate names for QTimeZone's backends, which can be taken from ICU if avalable (even when not using its backend, as with TZ) or derived from CLDR data. The Android, Darwin and ICU backends take care of this for themselves, so do not need to enable this feature. When the feature is enabled and ICU is not available, include data extracted from CLDR from which to obtain the needed locale-appropriate namings. This is extracted in the same process as updates ../text/qlocale_data_p.h, the various q*calendar_data_p.h and qlocaleprivate_data_p.h (the last having now been brought into the fold ready for this change). This commit defines the locale-dependent data that complements an earlier addition of locale-independent data in QTZP_data_p.h in the QtTimeZoneCldr namespace. The new data goes in a QtTimeZoneLocale namespace in qtimezonelocale* files, but is not included in this commit, due to browsers having trouble display the full 12 MiB of source code. That data compiles down to 2.3 MiB (compared to the libicudata.so size of about 30 MB). Updated the CLDR qt_attribution.json entry to include the new generated file. In place of the full locale-dependent data, the present commit substitutes minimal dummy data, with comments indicating the real data's size. The expected failure of various testcases will only be cleared when that data lands and the feature to activate it is enabled. The new data also include (in this commit) one IANA ID, Europe/Kirov, listed in CLDR's bcp47/timezone.xml but neither as an alias nor with any aliases, so missing from the alias data previously stored. The addition of its naming data brings it in. [ChangeLog][Third-Party Code] The data extracted from the Unicode Consortium's Common Locale Data Repository (CLDR) now includes, on platforms where this is otherwise unavailable, data on how different locales name the world's various time-zones. Task-number: QTBUG-68812 Task-number: QTBUG-84297 Task-number: QTBUG-112909 Task-number: QTBUG-114914 Task-number: QTBUG-115158 Task-number: QTBUG-122448 Change-Id: I3a823cc92844c380723412d12303714b9ec493ef Reviewed-by: Mårten Nordheim <[email protected]>
* Prune timezone L10n data in preparation for writing it to C++ filesEdward Welbourne2024-08-272-0/+138
| | | | | | | | | | | | The data is very big but much of it is inherited by zones from those that they map to via likely-subtag reduction, so omit the data where it coincides with the result of such an inheritance; this shall complicate the reading of the data, but saves dramatically on its size, reducing it to "only" c. 2 MiB. Task-number: QTBUG-115158 Change-Id: I53ff13e29f1f73a551d73d75773373bb90673c8e Reviewed-by: Mate Barany <[email protected]>
* Read timezone L10n data from QLocaleXML filesEdward Welbourne2024-08-201-0/+75
| | | | | | | | | | This includes the data in the Locale objects read prior to writing CLDR data out to relevant files. Actually writing the new data out shall follow in a later commit. Task-number: QTBUG-115158 Change-Id: Iaf1466242eb31e66d8ace0bec2ffe7554f66fc10 Reviewed-by: Mate Barany <[email protected]>
* Include timezone L10n data in QLocaleXML filesEdward Welbourne2024-08-204-9/+77
| | | | | | | | | | This makes the XML file bigger by a factor of roughly 8, at about 30 MB. Code to read the new data out of it shall follow in a later commit. Task-number: QTBUG-115158 Change-Id: I7b9b6abe88be2457fa6cf0e8d7b6a68845136770 Reviewed-by: Mate Barany <[email protected]>
* Record the CLDR bug tracking the mn_Mong_MN number formatEdward Welbourne2024-08-161-0/+2
| | | | | | | | | | | | As previously commented, mn_Mong_MN would end up with the same decimal and group separators if we trusted its draft="contributed" amendment to the decimal separator. I reported this to the CLDR folk some time ago and they now have a Jira ticket for it, which turns out to be a duplicate, so we can track them and know when to remove my hack-around. Change-Id: Ib8f49dbdce090393ad20cd50969d6323818ee4ff Reviewed-by: Mate Barany <[email protected]>
* Extract locale-appropriate names for zones and metazonesEdward Welbourne2024-07-222-9/+127
| | | | | | Task-number: QTBUG-115158 Change-Id: Ie687c97b038604ab5ec4d65b3052a632d0f2292b Reviewed-by: Mate Barany <[email protected]>
* Include metazone data in QTZP_data_p.h when timezone_locale is activeEdward Welbourne2024-07-224-17/+175
| | | | | | | | | | | | | This also expands the IANA ID table (by about 5 KiB) even when the feature is inactive, since it includes all IANA zones referenced by the new data, as well as those for which CLDR has aliases. Add code to QTZlocale.cpp to use this locale-independent data. This shall need expanded once locale-dependent data is also available. Task-number: QTBUG-115158 Change-Id: I720f10cb9ae4cf87dfd8bb66af965a45d49c389a Reviewed-by: Thiago Macieira <[email protected]>
* Implement scanning of CLDR's supplemental data on meta-zonesEdward Welbourne2024-07-221-0/+146
| | | | | | | | | | This is the locale-independent part of the data, for inclusion in qtimezoneprivate_data_p.h in some form. Task-number: QTBUG-115158 Change-Id: Ic46f53dd22d45ddc999633bc1bb4a0a3cf6d5112 Reviewed-by: Mate Barany <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* QLocaleXML: improve handling of XML-unsafe element textEdward Welbourne2024-07-151-13/+26
| | | | | | | | Use CDATA when outside ASCII. Share the attribute-packing code for an open-tag in a static method. In passing, tweak a comment's text. Change-Id: Ic8b75afc56d537a1a51d13797c737d4bfcc1f910 Reviewed-by: Mate Barany <[email protected]>
* QLocaleXML: use attributes in the MS-naming data where practicalEdward Welbourne2024-07-152-9/+8
| | | | | | | | | | The msLandZones/territorycode and msZoneIana/iana can become attributes of their parent nodes instead of child elements, as territory codes and IANA IDs are plain ASCII and not unduly long. In the process, rename territorycode to territory. Change-Id: Iab9901da01d15abc8c5db7a7d57f925fce8bb521 Reviewed-by: Mate Barany <[email protected]>