NLS fixes in script command definition
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
b4df39491e
commit
6d496d701d
@ -107,8 +107,8 @@ public class ScriptExecution extends Command {
|
|||||||
application.executeSub(command, ps.toArray(new String[0]));
|
application.executeSub(command, ps.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
} catch (CommandParsingException e) {
|
} catch (CommandParsingException e) {
|
||||||
throw new CommandRunException("Invalid command in script (" + //$NON-NLS-1$
|
throw new CommandRunException(MessageFormat.format(
|
||||||
e.getLocalizedMessage() + ")", //$NON-NLS-1$
|
"Invalid command in script ({0})", e.getLocalizedMessage()), //$NON-NLS-1$
|
||||||
e, this);
|
e, this);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new CommandRunException("Unable to read script", //$NON-NLS-1$
|
throw new CommandRunException("Unable to read script", //$NON-NLS-1$
|
||||||
@ -166,21 +166,22 @@ public class ScriptExecution extends Command {
|
|||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see fr.bigeon.gclc.command.Command#usageDetail() */
|
* @see fr.bigeon.gclc.command.Command#usageDetail() */
|
||||||
|
@SuppressWarnings("nls")
|
||||||
@Override
|
@Override
|
||||||
protected String usageDetail() {
|
protected String usageDetail() {
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
builder.append(
|
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(System.lineSeparator());
|
builder.append(System.lineSeparator());
|
||||||
builder.append(
|
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(System.lineSeparator());
|
||||||
builder.append(
|
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(System.lineSeparator());
|
||||||
builder.append("\"" + commentPrefix + //$NON-NLS-1$
|
builder.append("\"" + commentPrefix +
|
||||||
"\" will be ignored as well as empty lines."); //$NON-NLS-1$
|
"\" will be ignored as well as empty lines.");
|
||||||
builder.append(System.lineSeparator());
|
builder.append(System.lineSeparator());
|
||||||
|
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
@ -188,6 +189,7 @@ public class ScriptExecution extends Command {
|
|||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see fr.bigeon.gclc.command.Command#usagePattern() */
|
* @see fr.bigeon.gclc.command.Command#usagePattern() */
|
||||||
|
@SuppressWarnings("nls")
|
||||||
@Override
|
@Override
|
||||||
protected String usagePattern() {
|
protected String usagePattern() {
|
||||||
return super.usagePattern() + " <scriptfile>";
|
return super.usagePattern() + " <scriptfile>";
|
||||||
@ -195,9 +197,10 @@ public class ScriptExecution extends Command {
|
|||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see fr.bigeon.gclc.command.ICommand#tip() */
|
* @see fr.bigeon.gclc.command.ICommand#tip() */
|
||||||
|
@SuppressWarnings("nls")
|
||||||
@Override
|
@Override
|
||||||
public String tip() {
|
public String tip() {
|
||||||
return "Execute a script"; //$NON-NLS-1$
|
return "Execute a script";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user