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

feat: include Uzbek variants in default DB locales #19783

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Philip-Larsen-Donnelly
Copy link
Contributor

This adds Uzbek variants to the default database locales.

The previous code parsed the default strings only one way; which could set the variants, but resulted in locales in the database that couldn't be handled by the core upon retrieval.

The changes here now parse the language, country, and variant parts separately, which results in a locale in the database that is supported without changes elsewhere.

Note that these changes do not affect any of the existing defaults, which remain the same, but only add the two new Uzbek variants in the supported format.
Note also that these defaults only apply to a blank database.

To Test:

  1. Run against a blank database.
  2. Check the list of default DB locales. They should include the two Uzbek variants (cyrillic and latin).
  3. Add a metadata object (like, at least an org unit).
  4. Add an Uzbek translation to the object

Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we know the rest of the system can actually handle the locales. There are plenty of Locale from String places in the code. Why would they now handle these correct when you had to introduce parseLocaleString here to make it work? I would think that if this hasn't produced an error yet for you, you just haven't tried the function that does.

In any case we should add at least one test that goes through the scenario you describe in the issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants