diff --git a/src/main/java/io/github/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java b/src/main/java/io/github/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java index f1ac6e3..a974641 100644 --- a/src/main/java/io/github/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java +++ b/src/main/java/io/github/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java @@ -78,7 +78,7 @@ public CallLevelWrapper(String[] args) throws IOException { } } } else { - strings = new StringProvider(new Locale(Locale.getDefault().getLanguage())); + strings = new StringProvider(Locale.ENGLISH); } } catch (Exception e) { strings = new StringProvider(Locale.ENGLISH); @@ -103,7 +103,7 @@ public CallLevelWrapper(String[] args) throws IOException { if (cmd.hasOption("help") || (cmd.hasOption("language") && cmd.getOptions().length == 1)) { printHelp(); } - + cmd = parser.parse(this.options, args, false); username = cmd.getOptionValue("user"); @@ -255,11 +255,12 @@ private Options getOptions() { options.addOption(Option.builder("l") .longOpt("language") + .required() .hasArg() .argName("en|de") .desc(cliStrings.get("LangDescription")) .build()); - + options.addOption(Option.builder("u") .longOpt("user") .required() @@ -299,6 +300,11 @@ private Options getOptions() { // @formatter:off options.addOption(Option.builder("l").longOpt("language").hasArg().build()); options.addOption(Option.builder("h").longOpt("help").build()); + options.addOption(Option.builder("u").longOpt("user").hasArg().argName("user").build()); + options.addOption(Option.builder("p").longOpt("pass").hasArg().argName("pass").build()); + options.addOption(Option.builder("e").longOpt("echo").build()); + options.addOption(Option.builder("c").longOpt("cache-dir").hasArg().argName("dir").build()); + options.addOption(Option.builder("o").longOpt("output").hasArg().argName("file").build()); // @formatter:on } return options; diff --git a/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel.properties b/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel.properties index 72acf55..e6ed9f7 100644 --- a/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel.properties +++ b/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel.properties @@ -1,7 +1,6 @@ AppName=stine_calendar_bot HelpDescription=Print this message. -LangDescription=Select the language.\n\ - If not specified, your system language will be used. +LangDescription=Select the language. Usage=Usage: UserDescription=Username for STiNE. PassDescription=Password for STiNE. Use -- for stdin. diff --git a/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel_de.properties b/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel_de.properties index 16aa8c8..1f533e3 100644 --- a/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel_de.properties +++ b/src/main/resources/io/github/felsenhower/stine_calendar_bot/HumanReadable/CallLevel_de.properties @@ -1,6 +1,5 @@ HelpDescription=Diese Nachricht anzeigen. -LangDescription=Die Sprache ausw\u00e4hlen.\n\ - Wenn nicht angegeben, wird die Systemsprache ausgew\u00e4hlt. +LangDescription=Die Sprache ausw\u00e4hlen. UserDescription=Benutzername f\u00fcr STiNE. PassDescription=Passwort f\u00fcr STiNE. Benutze -- f\u00fcr stdin. EchoDescription=W\u00e4hrend des Browsings alle Seiteninhalte auf stdout ausgeben.