This class uses the default ResourceBundle
s 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.