提交 cfb9d2fb 编写于 作者: L Larry North

Externalized "Cannot build..." messages to Messages.properties.

上级 7ed3dbd3
......@@ -132,13 +132,13 @@ public class BuildCommand extends CLICommand {
}
if (!job.isBuildable()) {
String reason = " for unknown reasons";
String msg = Messages.BuildCommand_CLICause_CannotBuildUnknownReasons(job.getFullDisplayName());
if (job.isDisabled()) {
reason = "because it is disabled";
msg = Messages.BuildCommand_CLICause_CannotBuildDisabled(job.getFullDisplayName());
} else if (job.isHoldOffBuildUntilSave()){
reason = "because its configuration has not been saved";
msg = Messages.BuildCommand_CLICause_CannotBuildConfigNotSaved(job.getFullDisplayName());
}
stderr.println("Cannot build "+job.getFullDisplayName()+" " + reason + ".");
stderr.println(msg);
return 0;
}
......
......@@ -57,3 +57,9 @@ UpdateJobCommand.ShortDescription=\
UpdateNodeCommand.ShortDescription=\
Updates the node definition XML from stdin. The opposite of the get-node command
BuildCommand.CLICause.ShortDescription=Started by command line by {0}
BuildCommand.CLICause.CannotBuildDisabled=\
Cannot build {0} because it is disabled.
BuildCommand.CLICause.CannotBuildConfigNotSaved=\
Cannot build {0} because its configuration has not been saved.
BuildCommand.CLICause.CannotBuildUnknownReasons=\
Cannot build {0} for unknown reasons.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册