Index: /trunk/src/gnu/getopt/Getopt.java
===================================================================
--- /trunk/src/gnu/getopt/Getopt.java	(revision 12891)
+++ /trunk/src/gnu/getopt/Getopt.java	(revision 12892)
@@ -21,9 +21,8 @@
 package gnu.getopt;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.Function;
 
 /**************************************************************************/
@@ -582,5 +581,21 @@
 /**************************************************************************/
 
+private static Function<String, String> tr = Function.identity();
+
+/**
+ * Set the global translation handler for Getopt.
+ *
+ * This needs to be done before any call to {@link Getopt} or {@link LongOpt}
+ * constructor.
+ * @param tr function that takes messages in English and returns the localized message
+ */
+public static void setI18nHandler(Function<String, String> tr) {
+    Getopt.tr = tr;
+}
+
 static class OptI18n {
+
+    private final Map<String, String> trns = new HashMap<>();
+
     public  OptI18n() {
         add("getopt.ambigious", tr("{0}: option ''{1}'' is ambiguous"));
@@ -596,5 +611,7 @@
     }
 
-    Map<String, String> trns = new HashMap<String, String>();
+    private String tr(String s) {
+        return Getopt.tr.apply(s);
+    }
 
     private void add(String key, String value) {
Index: /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 12891)
+++ /trunk/src/org/openstreetmap/josm/data/projection/ProjectionCLI.java	(revision 12892)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.coor.conversion.LatLonParser;
+import org.openstreetmap.josm.tools.I18n;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -43,4 +44,5 @@
     @Override
     public void processArguments(String[] argArray) {
+        Getopt.setI18nHandler(I18n::tr);
         Getopt getopt = new Getopt("JOSM projection", argArray, "Irh", new LongOpt[] {
                 new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h')});
Index: /trunk/src/org/openstreetmap/josm/gui/ProgramArguments.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ProgramArguments.java	(revision 12891)
+++ /trunk/src/org/openstreetmap/josm/gui/ProgramArguments.java	(revision 12892)
@@ -14,4 +14,5 @@
 import java.util.stream.Stream;
 
+import org.openstreetmap.josm.tools.I18n;
 import org.openstreetmap.josm.tools.Logging;
 
@@ -115,4 +116,5 @@
         LongOpt[] los = Stream.of(Option.values()).map(Option::toLongOpt).toArray(LongOpt[]::new);
 
+        Getopt.setI18nHandler(I18n::tr);
         Getopt g = new Getopt("JOSM", args, "hv", los);
 
