Description
When I try to get PathLocale with ResourceUtils, than get wrong values, when the files contains '.' in name.
Example: 'jquery.test.js'
PathLocale.path=jquery, PathLocale.locale = null
or jquery.test_hu.js'.
PathLocale.path=jquery, PathLocale.locale = null
That's why I'd like to use
jquery.test_hu.js' as resource, the ResourceStreamLocator try to find
jquery.test_hu_hu_HU.js, jquery.test_hu_hu.js, and after jquery.test_hu.js.
Because the
ResourceStreamLocator.locate
PathLocale data = ResourceUtils.getLocaleFromFilename(path);
if ((data != null) && (data.locale != null))
doesn't work in this case.
Should change the
ResourceUtils
public static PathLocale getLocaleFromFilename(String path) {
int pos = path.indexOf('.');
----------------
To
int pos = path.lastIndexOf('.');
Attachments
Issue Links
- breaks
-
WICKET-5966 ResourceUtils.getLocaleFromFilename can't handle minimized resources well
- Closed