Merge commit '77d3a60869e7a780c6ae069e51530e1eacece5e2'
[fanfix.git] / src / be / nikiroo / utils / resources / TransBundle.java
index 426112900ef6d4ebcf4ef5057812dcd90ae2329f..7b2edb1ca919b4bc9f31e85d968ca8ee771d538f 100644 (file)
@@ -138,6 +138,9 @@ public class TransBundle<E extends Enum<E>> extends Bundle<E> {
                        result = "[" + key.toLowerCase() + "]";
                } else if (containsKey(key)) {
                        result = getString(key, null);
+                       if (result == null) {
+                               result = getMetaDef(id.name());
+                       }
                } else {
                        result = null;
                }
@@ -169,8 +172,7 @@ public class TransBundle<E extends Enum<E>> extends Bundle<E> {
        }
 
        /**
-        * Return all the languages known by the program.
-        * 
+        * Return all the languages known by the program for this bundle.
         * 
         * @return the known language codes
         */
@@ -327,6 +329,9 @@ public class TransBundle<E extends Enum<E>> extends Bundle<E> {
                String name = id.name() + "_NOUTF";
                if (containsKey(name)) {
                        String value = getString(name, null);
+                       if (value == null) {
+                               value = getMetaDef(id.name());
+                       }
                        boolean set = isSet(id, false);
                        writeValue(writer, name, value, set);
                }