In certain scenario's the cldr loader can attempt to load cldr-data that is does not exist, this can be due to incorrect casing of the locale or that data itself is not available.
We should/could probably do some normalisation of the configured locales:
1) Check if cldr-data exists for the locale (by looking at the directories in cldr-data/main?)
1) If exists, convert the import/require to use the correct locale casing, eg if en-gb is passed, which is a valid locale it will us en-GB to require the cldr-data.
1) if doesn't exist, use cldr to determine the correct language to use. I.e. using the attributes from new Cldr(locale).
When setting locale loaders with i18n, normalise the locales to lower case - This would need a complimentary change in i18n to lowercase locales passed.
Bug
In certain scenario's the cldr loader can attempt to load cldr-data that is does not exist, this can be due to incorrect casing of the locale or that data itself is not available.
We should/could probably do some normalisation of the configured locales:
1) Check if cldr-data exists for the locale (by looking at the directories in
cldr-data/main
?) 1) If exists, convert the import/require to use the correct locale casing, eg ifen-gb
is passed, which is a valid locale it will usen-GB
to require the cldr-data. 1) if doesn't exist, use cldr to determine the correct language to use. I.e. using theattributes
fromnew Cldr(locale)
.When setting locale loaders with i18n, normalise the locales to lower case - This would need a complimentary change in i18n to lowercase locales passed.