X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Futils%2Fresources%2FTransBundle.java;h=7b2edb1ca919b4bc9f31e85d968ca8ee771d538f;hb=abfeadcc2c0da88e32dd49291e8163880fe270f1;hp=fb9f29068171f12e8ffc7cc6ce8beebfefdae8b2;hpb=9695f59152be45182d3156f1aca76f57424a2536;p=nikiroo-utils.git diff --git a/src/be/nikiroo/utils/resources/TransBundle.java b/src/be/nikiroo/utils/resources/TransBundle.java index fb9f290..7b2edb1 100644 --- a/src/be/nikiroo/utils/resources/TransBundle.java +++ b/src/be/nikiroo/utils/resources/TransBundle.java @@ -137,7 +137,10 @@ public class TransBundle> extends Bundle { } 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> extends Bundle { } /** - * 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> extends Bundle { 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); } }