Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocaleEditor cannot parse language tag with script like zh-Hans #33348

Closed
aperrillat opened this issue Aug 8, 2024 · 0 comments
Closed

LocaleEditor cannot parse language tag with script like zh-Hans #33348

aperrillat opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@aperrillat
Copy link

aperrillat commented Aug 8, 2024

When I tried to load locales from application.yml to List<Locale>, Spring Framework's LocaleEditor is called to map it, but locales with scripts like zh-Hans or zh-Hant are not handled correctly because the locale is not loaded with the Locale.forLanguageTag method.

In method setAsText of LocaleEditor, the call to StringUtils.parseLocaleString should probably be replaced with StringUtils.parseLocale like it is in StringToLocaleConverter.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 8, 2024
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 8, 2024
@jhoeller jhoeller self-assigned this Aug 8, 2024
@jhoeller jhoeller added this to the 6.1.12 milestone Aug 8, 2024
@sbrannen sbrannen changed the title LocalEditor can't manage locale with script like zh-Hans LocaleEditor cannot manage locale with script like zh-Hans Aug 8, 2024
@jhoeller jhoeller changed the title LocaleEditor cannot manage locale with script like zh-Hans LocaleEditor cannot parse language tag with script like zh-Hans Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants