Clean dirty first attempt at pluralization

This commit is contained in:
dotasek 2022-10-27 17:29:05 -04:00
parent cd5c9efcec
commit 44656f7e77
1 changed files with 2 additions and 4 deletions

View File

@ -518,9 +518,7 @@ public class QuestionnaireValidator extends BaseValidator {
if (values.get(0).getName().equals("value" + Utilities.capitalize(s))) if (values.get(0).getName().equals("value" + Utilities.capitalize(s)))
return (s); return (s);
} }
if (types.length == 1)
ok.see(rule(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, I18nConstants.QUESTIONNAIRE_QR_ITEM_WRONGTYPE, types[0]));
else
ok.see(rulePL(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, types.length, I18nConstants.QUESTIONNAIRE_QR_ITEM_WRONGTYPE_PLURAL, l.toString())); ok.see(rulePL(errors, IssueType.STRUCTURE, values.get(0).line(), values.get(0).col(), ns.getLiteralPath(), false, types.length, I18nConstants.QUESTIONNAIRE_QR_ITEM_WRONGTYPE_PLURAL, l.toString()));
} }
return null; return null;