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

HOP-4597: Ignore variant value and script code when match default locale #1798

Merged
merged 1 commit into from Nov 16, 2022

Conversation

shlxue
Copy link
Contributor

@shlxue shlxue commented Nov 16, 2022

The current localeCodes only contains: language and country information.

JDK 11 Supported Locales

@hansva
Copy link
Contributor

hansva commented Nov 16, 2022

isn't the fact that String defaultLocaleString = HopConfig.readOptionString(STRING_DEFAULT_LOCALE, null); returns the value from our default hop-config.json the issue that is goes to english?

@shlxue
Copy link
Contributor Author

shlxue commented Nov 16, 2022

If the file(hop-config.json) not exist, or not found key LocaleDefault(STRING_DEFAULT_LOCALE) in the config file, HOP always using en_US, but my default locale is zh_CN.
we should automatically match the environment language.

@shlxue
Copy link
Contributor Author

shlxue commented Nov 16, 2022

When found key LocaleDefault(STRING_DEFAULT_LOCALE) in hop-config.json, It work fine.
But I found that some users would clear the config directory.

@shlxue
Copy link
Contributor Author

shlxue commented Nov 16, 2022

In Chinese environment: Locale.getDefault().toString() return: zh_CN_#Hans
But in GlobalMessages.localeCodes: zh_CN

@hansva
Copy link
Contributor

hansva commented Nov 16, 2022

thanks for testing this out! I thought the error was because of the hop-config.json we added by default. but I checked and the defaultlocale is not in there !

@hansva hansva merged commit 0809e24 into apache:master Nov 16, 2022
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.

None yet

2 participants