diff --git a/framework/base/src/base/org/ofbiz/base/util/UtilProperties.java b/framework/base/src/base/org/ofbiz/base/util/UtilProperties.java index b44dcf0b26..91e7d9cba7 100644 --- a/framework/base/src/base/org/ofbiz/base/util/UtilProperties.java +++ b/framework/base/src/base/org/ofbiz/base/util/UtilProperties.java @@ -56,7 +56,7 @@ import org.ofbiz.base.util.cache.UtilCache; *
The locale-specific class of properties files can be in any one of three * formats: the standard text-based key=value format (*.properties file), the Java * XML properties format, and the OFBiz-specific XML file format - * (see the toProperties + * (see the xmlToProperties * method).
*/ @SuppressWarnings("serial") @@ -477,7 +477,14 @@ public class UtilProperties implements java.io.Serializable { ResourceBundle bundle = null; try { bundle = UtilResourceBundle.getBundle(resource, locale, (ClassLoader) null); - } catch (MissingResourceException e) { + } catch (MissingResourceException e) {} + if (bundle == null && !resource.endsWith(".xml")) { + try { + // Try custom XML format + bundle = UtilResourceBundle.getBundle(resource + ".xml", locale, (ClassLoader) null); + } catch (MissingResourceException e) {} + } + if (bundle == null) { String resourceCacheKey = resource + "_" + locale.toString(); if (!resourceNotFoundMessagesShown.contains(resourceCacheKey)) { resourceNotFoundMessagesShown.add(resourceCacheKey); diff --git a/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml b/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml index 7669749daa..b1ca359653 100644 --- a/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml +++ b/framework/example/script/org/ofbiz/example/ExamplePermissionServices.xml @@ -31,7 +31,7 @@ under the License.