Improve UI event support
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / LocaleUtils.java
index 415a0954dff41d4526e39ccf5b8413c3b7573b79..4bfda139d686345f261dd9675de1c500b9cb2eda 100644 (file)
@@ -59,9 +59,10 @@ public class LocaleUtils {
        /** Where the search for a message is actually performed. */
        public static String local(String key, Locale locale, String resource, ClassLoader classLoader) {
                ResourceBundle rb = ResourceBundle.getBundle(resource, locale, classLoader);
-               assert key.length() > 2;
-               if (isLocaleKey(key))
+               if (isLocaleKey(key)) {
+                       assert key.length() > 1;
                        key = key.substring(1);
+               }
                if (rb.containsKey(key))
                        return rb.getString(key);
                else // for simple cases, the key will actually be the English word