﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17169	Missing MessageFormat arguments in OptionParser	simon04	team	"Related to #16866.

A few `{0}`/`{1}` arguments are missing in `OptionParser` (not sure what to insert for `xxx`, though):

{{{#!diff
diff --git a/src/org/openstreetmap/josm/tools/OptionParser.java b/src/org/openstreetmap/josm/tools/OptionParser.java
index baaef005b..6f967f516 100644
--- a/src/org/openstreetmap/josm/tools/OptionParser.java
+++ b/src/org/openstreetmap/josm/tools/OptionParser.java
@@ -163,7 +163,7 @@ public void runFor(String parameter) {
                         parameter = split[1];
                     } else {
                         if (toHandle.isEmpty() || ""--"".equals(toHandle.getFirst())) {
-                            throw new OptionParseException(tr(""{0}: option ''{1}'' requires an argument"", program));
+                            throw new OptionParseException(tr(""{0}: option ''{1}'' requires an argument"", program, optionName));
                         }
                         parameter = toHandle.removeFirst();
                     }
@@ -180,10 +180,10 @@ public void runFor(String parameter) {
             long count = options.stream().filter(p -> def.equals(p.option)).count();
             if (count < def.getRequiredCount().min) {
                 // min may be 0 or 1 at the moment
-                throw new OptionParseException(tr(""{0}: option ''{1}'' is required""));
+                throw new OptionParseException(tr(""{0}: option ''{1}'' is required"", program, xxx));
             } else if (count > def.getRequiredCount().max) {
                 // max may be 1 or MAX_INT at the moment
-                throw new OptionParseException(tr(""{0}: option ''{1}'' may not appear multiple times""));
+                throw new OptionParseException(tr(""{0}: option ''{1}'' may not appear multiple times"", program, xxx));
             }
         });
 
@@ -221,7 +221,7 @@ private AvailableOption findParameter(String optionName) {
             if (alternatives.size() == 1) {
                 return alternatives.get(0);
             } else if (alternatives.size() > 1) {
-                throw new OptionParseException(tr(""{0}: option ''{1}'' is ambiguous"", program));
+                throw new OptionParseException(tr(""{0}: option ''{1}'' is ambiguous"", program, optionName));
             }
         }
         throw new OptionParseException(tr(""{0}: unrecognized option ''{1}''"", program, optionName));
}}}"	defect	closed	normal	19.01	Core		fixed		michael2402
