X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Flauncher%2FMain.java;h=1a77291c28903120079f430661ca181f7ac4a6dd;hb=9b8cb729d5105f34eb4b1e5975166c6c5f867fa2;hp=c3187a0591abefcd5dcd048e73e8dc3809f118c3;hpb=450d662e747604c633e4e851840e6805780f0634;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/launcher/Main.java b/src/be/nikiroo/jvcard/launcher/Main.java index c3187a0..1a77291 100644 --- a/src/be/nikiroo/jvcard/launcher/Main.java +++ b/src/be/nikiroo/jvcard/launcher/Main.java @@ -28,7 +28,7 @@ import be.nikiroo.jvcard.resources.Trans.StringId; */ public class Main { static public final String APPLICATION_TITLE = "jVcard"; - static public final String APPLICATION_VERSION = "1.0-beta3"; + static public final String APPLICATION_VERSION = "1.0-beta3-dev"; static private final int ERR_NO_FILE = 1; static private final int ERR_SYNTAX = 2; @@ -36,15 +36,18 @@ public class Main { static private Trans transService; /** - * Translate the given {@link StringId}. + * Translate the given {@link StringId} into user text. * - * @param id + * @param stringId * the ID to translate + * @param values + * the values to insert instead of the place holders in the + * translation * - * @return the translation + * @return the translated text with the given value where required */ - static public String trans(StringId id) { - return transService.trans(id); + static public String trans(StringId id, String... values) { + return transService.trans(id, (String[]) values); } /** @@ -160,7 +163,7 @@ public class Main { System.exit(ERR_SYNTAX); return; } - + i18nDir = args[index]; } else { filesTried = true; @@ -168,6 +171,12 @@ public class Main { } } + // Force headless mode if we run in forced-text mode + if (textMode != null && textMode) { + // same as -Djava.awt.headless=true + System.setProperty("java.awt.headless", "true"); + } + if (unicode) { utf8(); }