git://git.nikiroo.be
/
jvcard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translation: update system to support arguments, add some translations
[jvcard.git]
/
src
/
be
/
nikiroo
/
jvcard
/
launcher
/
Main.java
diff --git
a/src/be/nikiroo/jvcard/launcher/Main.java
b/src/be/nikiroo/jvcard/launcher/Main.java
index 5fea28d7530748890d88a0eb32e50809487e779e..1a77291c28903120079f430661ca181f7ac4a6dd 100644
(file)
--- a/
src/be/nikiroo/jvcard/launcher/Main.java
+++ b/
src/be/nikiroo/jvcard/launcher/Main.java
@@
-36,15
+36,18
@@
public class Main {
static private Trans transService;
/**
static private Trans transService;
/**
- * Translate the given {@link StringId}.
+ * Translate the given {@link StringId}
into user text
.
*
*
- * @param
i
d
+ * @param
stringI
d
* the ID to translate
* the ID to translate
+ * @param values
+ * the values to insert instead of the place holders in the
+ * translation
*
*
- * @return the translat
ion
+ * @return the translat
ed 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;
}
System.exit(ERR_SYNTAX);
return;
}
-
+
i18nDir = args[index];
} else {
filesTried = true;
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();
}
if (unicode) {
utf8();
}