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

DefaultI18N is prope to loading default locale data even if not requested #4

Open
michael-o opened this issue May 1, 2023 · 0 comments
Labels

Comments

@michael-o
Copy link
Member

This class uses the default ResourceBundles behavior to use the default locale when no bundle for the desired one is not present. With default locale de_DE:

		DefaultI18N i18n = new DefaultI18N();
		i18n.initialize();
		System.out.println(i18n.getString("project-info-reports", new Locale("iw", "IL"), "report.ci-management.access")); 

expected is to get the root bundle with: "Access". But we get: "Zugriff" because of the locale.

This class misses to pass ResourceBundle.Control.getNoFallbackControl(ResourceBundle.Control.FORMAT_PROPERTIES) to the resource bundle.

This was found during work on Maven Project Info Reports Plugin and Maven Surefire while working with custom bundles.

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

No branches or pull requests

2 participants