Fix inclusion of lanterna's resources + fix warning
[jvcard.git] / src / be / nikiroo / jvcard / resources / bundles / TransBundle.java
index c79b0b69b62734d7b308ed07a50247fa15b7188e..7199158bba8d227322e4cc00e4d3bc52af0dbcf2 100644 (file)
@@ -76,7 +76,7 @@ public class TransBundle extends Bundle<StringId> {
                }
 
                if (values != null && values.length > 0)
-                       return String.format(locale, result, (Object[]) values);
+                       return String.format(locale, result, values);
                else
                        return result;
        }
@@ -148,6 +148,17 @@ public class TransBundle extends Bundle<StringId> {
                StringId.writeHeader(writer, name);
        }
 
+       @Override
+       protected void writeValue(Writer writer, StringId id) throws IOException {
+               super.writeValue(writer, id);
+
+               String name = id.name() + "_NOUTF";
+               if (map.containsKey(name)) {
+                       String value = map.getString(name).trim();
+                       writeValue(writer, name, value);
+               }
+       }
+
        /**
         * Return the {@link Locale} representing the given language.
         * 
@@ -180,5 +191,4 @@ public class TransBundle extends Bundle<StringId> {
 
                return locale;
        }
-
 }