Tamas Szendrei created WICKET-5706: -------------------------------------- Summary: ResourceUtils.getLocaleFromFilename bug Key: WICKET-5706 URL: https://issues.apache.org/jira/browse/WICKET-5706 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 6.17.0 Reporter: Tamas Szendrei
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)) { path = data.path; locale = data.locale; } 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('.'); -- This message was sent by Atlassian JIRA (v6.3.4#6332)