Rename hintPL to hintPlural
This commit is contained in:
parent
aeeaf06d62
commit
64770b7630
|
@ -320,7 +320,7 @@ public class BaseValidator implements IValidationContextResourceLoader {
|
||||||
return thePass;
|
return thePass;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hintPL(List<ValidationMessage> errors, IssueType type, int line, int col, String path, boolean thePass, int num, String theMessage, Object... theMessageArguments) {
|
protected boolean hintPlural(List<ValidationMessage> errors, IssueType type, int line, int col, String path, boolean thePass, int num, String theMessage, Object... theMessageArguments) {
|
||||||
if (!thePass && doingHints()) {
|
if (!thePass && doingHints()) {
|
||||||
String message = context.formatMessagePlural(num, theMessage, theMessageArguments);
|
String message = context.formatMessagePlural(num, theMessage, theMessageArguments);
|
||||||
addValidationMessage(errors, type, line, col, path, message, IssueSeverity.INFORMATION, theMessage);
|
addValidationMessage(errors, type, line, col, path, message, IssueSeverity.INFORMATION, theMessage);
|
||||||
|
|
|
@ -5661,7 +5661,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
}
|
}
|
||||||
if (ed.getMin() > 0) {
|
if (ed.getMin() > 0) {
|
||||||
if (problematicPaths.contains(ed.getPath()))
|
if (problematicPaths.contains(ed.getPath()))
|
||||||
hintPL(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count >= ed.getMin(), count, I18nConstants.VALIDATION_VAL_PROFILE_NOCHECKMIN_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), Integer.toString(ed.getMin()));
|
hintPlural(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count >= ed.getMin(), count, I18nConstants.VALIDATION_VAL_PROFILE_NOCHECKMIN_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), Integer.toString(ed.getMin()));
|
||||||
else {
|
else {
|
||||||
if (count < ed.getMin()) {
|
if (count < ed.getMin()) {
|
||||||
ok = rulePlural(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), Integer.toString(ed.getMin())) && ok;
|
ok = rulePlural(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MINIMUM_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), Integer.toString(ed.getMin())) && ok;
|
||||||
|
@ -5670,7 +5670,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
}
|
}
|
||||||
if (ed.hasMax() && !ed.getMax().equals("*")) {
|
if (ed.hasMax() && !ed.getMax().equals("*")) {
|
||||||
if (problematicPaths.contains(ed.getPath()))
|
if (problematicPaths.contains(ed.getPath()))
|
||||||
hintPL(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count <= Integer.parseInt(ed.getMax()), count, I18nConstants.VALIDATION_VAL_PROFILE_NOCHECKMAX_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), ed.getMax());
|
hintPlural(errors, IssueType.NOTSUPPORTED, element.line(), element.col(), stack.getLiteralPath(), count <= Integer.parseInt(ed.getMax()), count, I18nConstants.VALIDATION_VAL_PROFILE_NOCHECKMAX_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), ed.getMax());
|
||||||
else if (count > Integer.parseInt(ed.getMax())) {
|
else if (count > Integer.parseInt(ed.getMax())) {
|
||||||
ok = rulePlural(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MAXIMUM_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), ed.getMax(), Integer.toString(count)) && ok;
|
ok = rulePlural(errors, IssueType.STRUCTURE, element.line(), element.col(), stack.getLiteralPath(), false, count, I18nConstants.VALIDATION_VAL_PROFILE_MAXIMUM_PLURAL, profile.getUrl(), ed.getPath(), ed.getId(), ed.getSliceName(),ed.getLabel(), stack.getLiteralPath(), ed.getMax(), Integer.toString(count)) && ok;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue