Skip to content

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

@michael-o

Description

@michael-o

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions