mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
57a9c17e7c
While generating locales, two sets of data (both derived from the [CLDR project][1]) are used: - JSON data with the [`cldrjs` package][2], which is used for most operations. - XML data with the [`cldr` package][3], which is used for generating plural-related data. The JSON data is brought in from the [unicode-org/cldr-json][4] repository. Since we control the version of the repository that we use, we can control the CLDR version that these correspond to. Previously, however, we used the XML data that were bundled with the [`cldr` package[3]. As a result, the two sets of data could correspond to different CLDR versions, resulting in incorrect/inconsistent locales files. This commit addresses the problem by utilizing the `load()` method of the [`cldr` package][3], which allows passing in a custom path to the CLDR XML data (instead of using the bundled data. This way, we can ensure that the data used for all operations correspond to the same CLDR version. Related discussion: #43301 [1]: https://github.com/unicode-org/cldr [2]: https://www.npmjs.com/package/cldrjs [3]: https://www.npmjs.com/package/cldr [4]: https://github.com/unicode-org/cldr-json PR Close #45714
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT