Merge pull request #1098 from hapifhir/do-fix-fhirpathengine-plurals

Fix for #1091
This commit is contained in:
Grahame Grieve 2023-02-01 14:47:59 +11:00 committed by GitHub
commit 4a5985fe59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -299,6 +299,8 @@ public interface IWorkerContext {
String formatMessage(String theMessage, Object... theMessageArguments);
String formatMessagePlural(Integer pl, String theMessage, Object... theMessageArguments);
void setValidationMessageLanguage(Locale locale);
public class ValidationResult {

View File

@ -575,7 +575,7 @@ public class FHIRPathEngine {
}
private FHIRException makeExceptionPlural(Integer num, ExpressionNode holder, String constName, Object... args) {
String fmt = worker.formatMessage(constName, args);
String fmt = worker.formatMessagePlural(num, constName, args);
if (location != null) {
fmt = fmt + " "+worker.formatMessage(I18nConstants.FHIRPATH_LOCATION, location);
}