fix: Format Locale objects scriptcode correctly#773
fix: Format Locale objects scriptcode correctly#773PartyDonut merged 2 commits intoDonutWare:developfrom
Locale objects scriptcode correctly#773Conversation
|
One thing to note: since the original implementation already saves language codes in BCP 47's format, existing users' selected language won't be affected by this change as tested by migrating from version 9.0. |
PartyDonut
left a comment
There was a problem hiding this comment.
Looks good to me, small change request just to make sure.
Never mind, I understand it now. For reference, the code in question: It defines both
And given this block: if (supportedLocales.contains(locale)) {
return locale;
}the If we were changing it to If everything checks out, please feel free to merge the PR, thanks! |
Locale objects correctly (#641)Locale objects correctly
Locale objects correctlyLocale objects scriptcode correctly
Pull Request Description
The existing logic for:
Doesn't take
Locale.scriptCodeinto account during formatting/serialization, turning language codes likezh_Hantintozh. This PR addresses the issue and formats/parses language codes according to the pattern of BCP 47. (i.e.EN_US→en_US,ZH_HANT→zh_Hant)Issue Being Fixed
Resolves #641
Checklist