We're updating the issue view to help you get more done. 

LocaleUtils.java_dots_ to_underscores_i18n _bundles

Description

I am developing a plugin named like xxx.server.openfire.yyy, following the naming convention of a bigger project and using that as root package name for the plugin's classes.

The resource bundle for internationalization was named like the plugin, but was not found since the file had dots in its name and the classloader would look for it in folders that are not there (and won't get packaged by the ant script if you make them).

The solution was to rename the file with underscores xxx_server_openfire_yyy_i18n.properties and apply this patch.

This should not break any other plugin in the source tree.
It should be documented on the plugin developer guide.

Environment

Linux

Acceptance Test - Entry

None

Activity

Show:
Daryl Herzmann
February 13, 2014, 9:52 PM

assigning to next release in hopes of a code review.

csh
March 6, 2014, 4:24 PM

Reviewed the patch. It should work fine.

The problem is that java.util.ResourceBundle treats dots as packages/folders:

It generates a path name from the candidate bundle name by replacing all "." characters with "/" and appending the string ".properties".

Daryl Herzmann
April 30, 2014, 5:43 PM

Moving unfixed 3.9.2 issues to 3.9.3 for consideration.

Daryl Herzmann
October 27, 2014, 6:11 PM

Assignee

Dave Cridland

Reporter

Andrea Ratto

Labels

Expected Effort

None

Components

Fix versions

Affects versions

Priority

Trivial
Configure