angular/packages/common
Paul Gschwendtner b280b97d5a refactor(common): include locale extra data in closure locale file (#46167)
The recent update to CLDR 41 highlighted (internally) that some time
formats have changed to rely on locale-specific day periods. In
particular the `zh_TW` (or canonical: `zh_Hant`) has changed some
time formats/patterns from the universal `AM/PM` symbols (`a`) to `B`.

The `b`/`B` symbols rely on locale-specific day period rules. This data
is only extracted from CLDR into the so-called extra locale data that
Angular provides.

To fix this, and to be able to reverse the internal workaround that
doesn't allow us to use the actual CLDR 41 data here, we always provide
the locale extra data when conditonally loading CLDR data based on
`goog.LOCALE`.

This will result in additional payload cost that locale-specific JS
bundles have to pay, but the only alternative would be to break
Angular's `b`/`B` symbol support in favor of falling back to `AM/PM`
rules (similar to how Closure Libray itself does it).

For our external users (something I want to note here), they will be
able to load the extra data easily (like it was possible before).
Angular has some good erroring if the extra data is required. Most of
our users will always use the global locale files anyway (the Angular
CLI always uses them). These come with the extra data by default.

Resources:

- 0d538327d1
- 0d538327d1/common/main/zh_Hant.xml
- 6a4353cb40/packages/common/src/i18n/format_date.ts (L609-L639)
- https://cldr.unicode.org/translation/date-time/date-time-symbols
- 4be7cdce82/packages/angular_devkit/build_angular/src/utils/i18n-options.ts (L23)

PR Close #46167
2022-06-07 10:14:14 -07:00
..
http fix(common): properly cast http param values to strings (#42643) 2022-05-04 12:43:37 -07:00
locales refactor(common): include locale extra data in closure locale file (#46167) 2022-06-07 10:14:14 -07:00
src refactor(common): remove unused method in internal SubscriptionStrategy interface (#46128) 2022-06-02 13:42:38 -07:00
test refactor(common): clear ChangeDetectorRef when AsyncPipe is destroyed (#46128) 2022-06-02 13:42:38 -07:00
testing feat(common): add getState method to LocationStrategy interface (#45648) 2022-04-25 10:41:30 -07:00
upgrade feat(bazel): speed up dev-turnaround by bundling types only when packaging (#45405) 2022-04-21 11:09:39 -07:00
BUILD.bazel feat(bazel): speed up dev-turnaround by bundling types only when packaging (#45405) 2022-04-21 11:09:39 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json feat(core): drop support for Node.js 12 (#45286) 2022-03-08 12:05:03 -08:00
PACKAGE.md docs: add api doc to sub-packages (#33801) 2019-11-20 14:48:50 -08:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00