Merge branch 'subtree'
[fanfix.git] / src / be / nikiroo / utils / resources / TransBundle.java
index fb9f29068171f12e8ffc7cc6ce8beebfefdae8b2..7b2edb1ca919b4bc9f31e85d968ca8ee771d538f 100644 (file)
@@ -137,7 +137,10 @@ public class TransBundle<E extends Enum<E>> extends Bundle<E> {
                } else if ("DUMMY".equals(id.name().toUpperCase())) {
                        result = "[" + key.toLowerCase() + "]";
                } else if (containsKey(key)) {
-                       result = getString(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
         */
@@ -326,8 +328,12 @@ public class TransBundle<E extends Enum<E>> extends Bundle<E> {
 
                String name = id.name() + "_NOUTF";
                if (containsKey(name)) {
-                       String value = getString(name);
-                       writeValue(writer, name, value);
+                       String value = getString(name, null);
+                       if (value == null) {
+                               value = getMetaDef(id.name());
+                       }
+                       boolean set = isSet(id, false);
+                       writeValue(writer, name, value, set);
                }
        }