gecko-dev/intl
André Bargull 3d58656e00 Bug 1693575 - Part 3: Implement support for "calendar" option. r=tcampbell
This last part to support "calendar" requires a bit more code.

`GetCalendarDisplayName()` performs the following steps:
1. Validate the input matches the `type` nonterminal, per
   CanonicalCodeForDisplayNames, step 4.a.
2. Then convert it to lower case, because ICU expects lower case names and it
   needs to be in lower case for `LanguageTag::replaceUnicodeExtensionType()`.
3. Replace calendar name aliases with the preferred name, e.g. use "ethioaa"
   instead of "ethiopic-amete-alem".
4. Check the input isn't too large, just in case ICU somehow doesn't properly
   handle large string inputs.
5. Retrieve the old-style value of the calendar name, for example "gregorian"
   for the calendar name "gregory".
6. And finally call `uldn_keyValueDisplayName` to search for the localised name.

Our ICU data file doesn't yet include calendar names. To include calendar names
we need to enable them in "data_filter.json", rebuild the ICU data file, and
then reapply the update for tzdata 2021a. (Reapplying the tzdata changed
"intl/tzdata/GIT-INFO", but otherwise didn't change any time zone files.)

Adding the calendar names to the ICU data file results in a slight increase of
the overall data file size (79,184 bytes).

The existing "calendar.js" test file was renamed to "month-calendar.js", so
the test file for the new "calendar" type can be named "calendar.js".

Differential Revision: https://phabricator.services.mozilla.com/D116008
2021-06-01 07:45:44 +00:00
..
build Bug 1686616 - register all Services.py services with components.conf. r=kmag,necko-reviewers,valentin 2021-02-18 13:26:28 +00:00
components Bug 1705156 - Add a unified DateTimeFormat component; r=dminor,anba 2021-05-27 23:03:43 +00:00
docs
encoding_glue Bug 673087 - Honor encoding declared via XML declaration in text/html. r=emk 2021-03-23 09:52:04 +00:00
gtest Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
hyphenation Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika 2021-02-26 09:11:46 +00:00
icu Bug 1693575 - Part 3: Implement support for "calendar" option. r=tcampbell 2021-06-01 07:45:44 +00:00
icu-patches Bug 1706949 part 13 - Fix icu and intl for wasi. r=anba,glandium 2021-05-26 06:44:09 +00:00
l10n Bug 1705156 - Add a unified DateTimeFormat component; r=dminor,anba 2021-05-27 23:03:43 +00:00
locale Bug 1711246 - Make OSPreferences refcounting thread-safe, because of potential OMT usage from gfxDWriteFontFamily. r=dminor 2021-05-14 17:45:16 +00:00
locales Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
lwbrk Bug 1703213 - Disallow soft line break between adjacent IDEOGRAPHIC SPACE characters. r=m_kato 2021-04-08 09:41:48 +00:00
strres Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika 2021-03-24 17:56:49 +00:00
tzdata Bug 1693575 - Part 3: Implement support for "calendar" option. r=tcampbell 2021-06-01 07:45:44 +00:00
uconv Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
unicharutil Bug 1697076 - Drop assertion from mozilla::unicode::GetNaked. r=jfkthame 2021-03-11 09:42:18 +00:00
Encoding.h
EncodingDetector.h Bug 1686463 - Gather telemetry about automatic encoding detection outcomes. r=chutten,emk 2021-01-24 00:11:07 +00:00
JapaneseDetector.h Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
icu_sources_data.py Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
moz.build Bug 1695937 - Add intl::NumberFormat to components; r=zbraniecki,tcampbell,jandem 2021-04-08 14:56:33 +00:00
update-icu.sh Bug 1706949 part 13 - Fix icu and intl for wasi. r=anba,glandium 2021-05-26 06:44:09 +00:00
update-tzdata.sh