Targeting interface now says "Select up to one..." when the target is optional (bug #7046).

This commit is contained in:
Daniel Bomar 2020-10-24 20:38:46 -05:00
parent 08d92831f1
commit 6b508ecacc

View file

@ -117,7 +117,11 @@ public abstract class TargetImpl implements Target {
|| targetName.startsWith("an ")
|| targetName.startsWith("any ")) {
return "Select " + targetName + suffix;
} else if (targetName.startsWith("a") || targetName.startsWith("e") || targetName.startsWith("i") || targetName.startsWith("o") || targetName.startsWith("u")) {
}
if (getMinNumberOfTargets() == 0 && getMaxNumberOfTargets() == 1) {
return "Select up to one " + targetName + suffix;
}
if (targetName.startsWith("a") || targetName.startsWith("e") || targetName.startsWith("i") || targetName.startsWith("o") || targetName.startsWith("u")) {
return "Select an " + targetName + suffix;
}
return "Select a " + targetName + suffix;