diff --git a/gclc/src/main/java/fr/bigeon/gclc/command/ScriptExecution.java b/gclc/src/main/java/fr/bigeon/gclc/command/ScriptExecution.java index 081f38e..91129c3 100644 --- a/gclc/src/main/java/fr/bigeon/gclc/command/ScriptExecution.java +++ b/gclc/src/main/java/fr/bigeon/gclc/command/ScriptExecution.java @@ -107,8 +107,8 @@ public class ScriptExecution extends Command { application.executeSub(command, ps.toArray(new String[0])); } } catch (CommandParsingException e) { - throw new CommandRunException("Invalid command in script (" + //$NON-NLS-1$ - e.getLocalizedMessage() + ")", //$NON-NLS-1$ + throw new CommandRunException(MessageFormat.format( + "Invalid command in script ({0})", e.getLocalizedMessage()), //$NON-NLS-1$ e, this); } catch (IOException e) { throw new CommandRunException("Unable to read script", //$NON-NLS-1$ @@ -166,21 +166,22 @@ public class ScriptExecution extends Command { /* (non-Javadoc) * @see fr.bigeon.gclc.command.Command#usageDetail() */ + @SuppressWarnings("nls") @Override protected String usageDetail() { StringBuilder builder = new StringBuilder(); builder.append( - " scriptfile: path to the file containing the script to execute."); //$NON-NLS-1$ + " scriptfile: path to the file containing the script to execute."); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); builder.append( - " The script file must contain one line commands. The lines must never"); //$NON-NLS-1$ + " The script file must contain one line commands. The lines must never"); builder.append(System.lineSeparator()); builder.append( - "start with whitespace characters. The lines starting with"); //$NON-NLS-1$ + "start with whitespace characters. The lines starting with"); builder.append(System.lineSeparator()); - builder.append("\"" + commentPrefix + //$NON-NLS-1$ - "\" will be ignored as well as empty lines."); //$NON-NLS-1$ + builder.append("\"" + commentPrefix + + "\" will be ignored as well as empty lines."); builder.append(System.lineSeparator()); return builder.toString(); @@ -188,6 +189,7 @@ public class ScriptExecution extends Command { /* (non-Javadoc) * @see fr.bigeon.gclc.command.Command#usagePattern() */ + @SuppressWarnings("nls") @Override protected String usagePattern() { return super.usagePattern() + " "; @@ -195,9 +197,10 @@ public class ScriptExecution extends Command { /* (non-Javadoc) * @see fr.bigeon.gclc.command.ICommand#tip() */ + @SuppressWarnings("nls") @Override public String tip() { - return "Execute a script"; //$NON-NLS-1$ + return "Execute a script"; } }