You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi team,
There is a discrepancy between openUI5 sap.ui.core.LocaleData and the ui5 webcomponent asset-registries.LocaleData when the locale is Serbian "sh". The ui5-wc code has a mapping that converts 'sh' to 'sr' M_ISO639_OLD_TO_NEW LocaleData.js#L16 while sap.ui.core.LocaleData converts 'sh' to 'sr_Latn' sap.ui.core.LocaleData.js#L2079-L2083. This discrepancy will cause a CLDR error on line asset-registries/LocaleData.js#L95. This can happen when you use the date formatter calling fetchCldr. ex:
getLocaleData will internally create a new LocaleData instance via sap.ui.core.LocaleData and through the constructor is will call getDataui5-wc getLocaleData.js#L21 -> [sap.ui.core.LocaleData.js#L28 constructor|https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L28]. Loader extension calls getLocaleData with the wrong locale: [LoaderExtensions.js#L10|https://github.com/SAP/ui5-webcomponents/blob/v1.1.2/packages/localization/src/sap/base/util/LoaderExtensions.js#L10] and it fails to fallback to English because the localeDataMap only has the 'sr' object in its mapping. Please see:
'sr_Latn' locale being passed to getLocaleData:
supported locale map:
loader map:
localeDataMap
Stack:
Expected Behavior
ui5-wc should accept 'sr_Latn' as a supported locale
no CLDR error should occur when locale is Serbian
Since ui5-wc uses openui5 under the covers, internal logic should align.
Steps to Reproduce
Please reach out to me via our internal slack channel if you need an instance and replication steps.
Priority
Low
Medium
High
Very High
Organization: SF
Business impact: High
The text was updated successfully, but these errors were encountered:
Support for Serbian Latin has been added in UI5, now we add support for the same in UI5 Web Components.
For Serbian, there are Cyrillic and Latin scripts - "sr" maps to Cyrillic (supported prior to the change), while "sh" and "sr_latn" map to "Latin" (now supported with the current change).
FIXES: #4904
Support for Serbian Latin has been added in UI5, now we add support for the same in UI5 Web Components.
For Serbian, there are Cyrillic and Latin scripts - "sr" maps to Cyrillic (supported prior to the change), while "sh" and "sr_latn" map to "Latin" (now supported with the current change).
FIXES: #4904
Bug Description
Hi team,
There is a discrepancy between openUI5 sap.ui.core.LocaleData and the ui5 webcomponent asset-registries.LocaleData when the locale is Serbian "sh". The ui5-wc code has a mapping that converts 'sh' to 'sr' M_ISO639_OLD_TO_NEW LocaleData.js#L16 while sap.ui.core.LocaleData converts 'sh' to 'sr_Latn' sap.ui.core.LocaleData.js#L2079-L2083. This discrepancy will cause a CLDR error on line asset-registries/LocaleData.js#L95. This can happen when you use the date formatter calling fetchCldr. ex:
getLocaleData
will internally create a new LocaleData instance via sap.ui.core.LocaleData and through the constructor is will callgetData
ui5-wc getLocaleData.js#L21 -> [sap.ui.core.LocaleData.js#L28 constructor|https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/sap/ui/core/LocaleData.js#L28]. Loader extension calls getLocaleData with the wrong locale: [LoaderExtensions.js#L10|https://github.com/SAP/ui5-webcomponents/blob/v1.1.2/packages/localization/src/sap/base/util/LoaderExtensions.js#L10] and it fails to fallback to English because the localeDataMap only has the 'sr' object in its mapping. Please see:'sr_Latn' locale being passed to
getLocaleData
:supported locale map:
loader map:
localeDataMap
Stack:
Expected Behavior
Steps to Reproduce
Priority
Low
Medium
High
Very High
Organization: SF
Business impact: High
The text was updated successfully, but these errors were encountered: