Improve expansion error messages

This commit is contained in:
Grahame Grieve 2023-11-24 08:51:47 +11:00
parent 5ee11cb3a8
commit 623760d887
3 changed files with 35 additions and 27 deletions

View File

@ -63,9 +63,11 @@ public abstract class I18nBase {
private boolean messageExistsForLocale(String message, boolean hasArgs) {
checkResourceBundleIsLoaded();
if (!messageKeyExistsForLocale(message)) {
if (warnAboutMissingMessages && (hasArgs || !message.contains(" "))) {
System.out.println("Attempting to localize message " + message + ", but no such equivalent message exists for" +
" the locale " + getLocale());
if (!message.contains(" ")) {
if (warnAboutMissingMessages && (hasArgs || !message.contains(" "))) {
System.out.println("Attempting to localize message " + message + ", but no such equivalent message exists for" +
" the locale " + getLocale());
}
}
}
return messageKeyExistsForLocale(message);

View File

@ -1027,6 +1027,9 @@ public class I18nConstants {
public static final String BUNDLE_ENTRY_URL_MATCHES_NO_ID = "BUNDLE_ENTRY_URL_MATCHES_NO_ID";
public static final String BUNDLE_ENTRY_URL_ABSOLUTE = "BUNDLE_ENTRY_URL_ABSOLUTE";
public static final String BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE = "BUNDLE_BUNDLE_ENTRY_FOUND_MULTIPLE";
public static final String FHIRPATH_COLLECTION_STATUS_PARAMETER = "FHIRPATH_COLLECTION_STATUS_PARAMETER";
public static final String FHIRPATH_COLLECTION_STATUS_CONTEXT = "FHIRPATH_COLLECTION_STATUS_CONTEXT";
public static final String SEARCHPARAMETER_MISSING_COMPONENTS = "SEARCHPARAMETER_MISSING_COMPONENTS";
}

View File

@ -53,7 +53,7 @@ Extension_EXT_SubExtension_Invalid = Sub-extension url ''{0}'' is not defined by
Extension_EXT_Type = The Extension ''{0}'' definition allows for the types {1} but found type {2}
Extension_EXT_URL_Absolute = Extension.url must be an absolute URL
Extension_EXT_Unknown = Unknown extension {0}
Extension_EXT_Unknown_NotHere = The extension {0} is unknown, and not allowed here
Extension_EXT_Unknown_NotHere = The extension {0} could not be found so is not allowed here
Extension_EXT_Url_NotFound = Extension.url is required
Extension_EXT_Version_Internal = Extension url ''{0}'' evaluation state invalid
Extension_EXT_Version_Invalid = Extension url ''{0}'' is not valid (invalid Version ''{1}'')
@ -78,7 +78,7 @@ Profile_VAL_NotAllowed = The element {0} is present in the instance but not allo
Measure_MR_M_None = No Measure is identified, so no validation can be performed against the Measure
Measure_MR_M_NotFound = The Measure ''{0}'' could not be resolved, so no validation can be performed against the Measure
Questionnaire_QR_Item_BadOption = The code provided {1} in the system {0}) is not in the options value set ({2}) in the questionnaire: {3}
QUESTIONNAIRE_QR_ITEM_BADOPTION_CS = The code provided {1} cannot be validated in the options value set ({2}) in the questionnaire because the system {0} is unknown
QUESTIONNAIRE_QR_ITEM_BADOPTION_CS = The code provided {1} cannot be validated in the options value set ({2}) in the questionnaire because the system {0} could not be found
Questionnaire_QR_Item_Coding = Error {0} validating Coding against Questionnaire Options
Questionnaire_QR_Item_CodingNoOptions = Cannot validate Coding option because no option list is provided
Questionnaire_QR_Item_DateNoOptions = Cannot validate date answer option because no option list is provided
@ -157,7 +157,7 @@ Terminology_TX_Coding_Count = Expected {0} but found {1} coding elements
Terminology_TX_Confirm_1_CC = Could not confirm that the codings provided are in the value set {0} and a coding from this value set is required (class = {1})
Terminology_TX_Confirm_2_CC = Could not confirm that the codings provided are in the value set {0} and a coding should come from this value set unless it has no suitable code (the validator cannot judge what is suitable) (class = {1})
Terminology_TX_Confirm_3_CC = Could not confirm that the codings provided are in the value set {0} and a coding is recommended to come from this value set (class = {1})
Terminology_TX_Confirm_4a = The code provided ({2}) is not in the value set {0}, and a code from this value set is required: {1}
Terminology_TX_Confirm_4a = The code provided ({2}) was not found in the value set {0}, and a code from this value set is required: {1}
Terminology_TX_Confirm_4b = The codes provided ({2}) are not in the value set {0}, and a code from this value set is required: {1}
Terminology_TX_Confirm_5 = Could not confirm that the codes provided are in the value set {0}, and a code should come from this value set unless it has no suitable code (the validator cannot judge what is suitable)
Terminology_TX_Confirm_6 = Could not confirm that the codes provided are in the value set {0}, and a code is recommended to come from this value set
@ -169,24 +169,24 @@ Terminology_TX_Error_Coding2 = Error {0} validating Coding: {1}
Terminology_TX_NoValid_1_CC = None of the codings provided are in the value set {0}, and a coding from this value set is required) (codes = {1})
Terminology_TX_NoValid_10 = The code provided is not in the maximum value set {0}, and a code from this value set is required) (code = {1}#{2})
Terminology_TX_NoValid_11 = The code provided is not in the maximum value set {0}, and a code from this value set is required) (code = {1}#{2}), error = {3})
Terminology_TX_NoValid_12 = The Coding provided ({2}) is not in the value set {0}, and a code is required from this value set. {1}
Terminology_TX_NoValid_13 = The Coding provided ({2}) is not in the value set {0}, and a code should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable). {1}
Terminology_TX_NoValid_14 = The Coding provided ({2}) is not in the value set {0}, and a code is recommended to come from this value set. {1}
Terminology_TX_NoValid_12 = The Coding provided ({2}) was not found in the value set {0}, and a code is required from this value set. {1}
Terminology_TX_NoValid_13 = The Coding provided ({2}) was not found in the value set {0}, and a code should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable). {1}
Terminology_TX_NoValid_14 = The Coding provided ({2}) was not found in the value set {0}, and a code is recommended to come from this value set. {1}
Terminology_TX_NoValid_15 = The value provided (''{0}'') could not be validated in the absence of a terminology server
Terminology_TX_NoValid_15A = The value provided (''{0}'') could not be validated because the code system {1} is not known
Terminology_TX_NoValid_16 = The value provided (''{0}'') is not in the value set {1}, and a code is required from this value set {2}
Terminology_TX_NoValid_17 = The value provided (''{0}'') is not in the value set {1}, and a code should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) {2}
Terminology_TX_NoValid_18 = The value provided (''{0}'') is not in the value set {1}, and a code is recommended to come from this value set){2}
Terminology_TX_NoValid_16 = The value provided (''{0}'') was not found in the value set {1}, and a code is required from this value set {2}
Terminology_TX_NoValid_17 = The value provided (''{0}'') was not found in the value set {1}, and a code should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) {2}
Terminology_TX_NoValid_18 = The value provided (''{0}'') was not found in the value set {1}, and a code is recommended to come from this value set){2}
Terminology_TX_NoValid_2_CC = None of the codings provided are in the value set {0}, and a coding should come from this value set unless it has no suitable code (note that the validator cannot judge what is suitable) (codes = {1})
Terminology_TX_NoValid_3_CC = None of the codings provided are in the value set {0}, and a coding is recommended to come from this value set) (codes = {1})
Terminology_TX_NoValid_4 = The Coding provided ({2}) is not in the value set {0}, and a code is required from this value set {1}
Terminology_TX_NoValid_5 = The Coding provided ({2}) is not in the value set {0}, and a code should come from this value set unless it has no suitable code (the validator cannot judge what is suitable) {1}
Terminology_TX_NoValid_6 = The Coding provided ({2}) is not in the value set {0}, and a code is recommended to come from this value set {1}
Terminology_TX_NoValid_4 = The Coding provided ({2}) was not found in the value set {0}, and a code is required from this value set {1}
Terminology_TX_NoValid_5 = The Coding provided ({2}) was not found in the value set {0}, and a code should come from this value set unless it has no suitable code (the validator cannot judge what is suitable) {1}
Terminology_TX_NoValid_6 = The Coding provided ({2}) was not found in the value set {0}, and a code is recommended to come from this value set {1}
Terminology_TX_NoValid_7 = None of the codes provided could be validated against the maximum value set {0}, (error = {2})
Terminology_TX_NoValid_8 = None of the codes provided are in the maximum value set {0}, and a code from this value set is required) (codes = {1})
Terminology_TX_NoValid_9 = The code provided ({2}) could not be validated against the maximum value set {0}, (error = {1})
Terminology_TX_System_Invalid = Invalid System URI: {0}
Terminology_TX_System_NotKnown = Code System URI ''{0}'' is unknown so the code cannot be validated
Terminology_TX_System_NotKnown = Code System URI ''{0}'' could not be found so the code cannot be validated
TERMINOLOGY_TX_SYSTEM_NOT_USABLE = The definition for the Code System with URI ''{0}'' doesn't provide any codes so the code cannot be validated
Terminology_TX_System_Relative = Coding.system must be an absolute reference, not a local reference
Terminology_TX_System_Unknown = Unknown Code System ''{0}''
@ -257,10 +257,10 @@ Validation_VAL_Profile_NotAllowed = This element is not allowed by the profile {
Validation_VAL_Profile_NotSlice = This element does not match any known slice {0} and slicing is CLOSED: {1}
Validation_VAL_Profile_OutOfOrder = As specified by profile {0}, Element ''{1}'' is out of order (found after {2})
Validation_VAL_Profile_SliceOrder = As specified by profile {0}, Element ''{1}'' is out of order in ordered slice
Validation_VAL_Profile_Unknown = Profile reference ''{0}'' has not been checked because it is unknown
VALIDATION_VAL_PROFILE_UNKNOWN_NOT_POLICY = Profile reference ''{0}'' has not been checked because it is unknown, and the validator is set to not fetch unknown profiles
VALIDATION_VAL_PROFILE_UNKNOWN_ERROR = Profile reference ''{0}'' has not been checked because it is unknown, and fetching it resulted in the error {1}
VALIDATION_VAL_PROFILE_UNKNOWN_ERROR_NETWORK = Profile reference ''{0}'' has not been checked because it is unknown, and the host {1} cannot be found
Validation_VAL_Profile_Unknown = Profile reference ''{0}'' has not been checked because it could not be found
VALIDATION_VAL_PROFILE_UNKNOWN_NOT_POLICY = Profile reference ''{0}'' has not been checked because it could not be found, and the validator is set to not fetch unknown profiles
VALIDATION_VAL_PROFILE_UNKNOWN_ERROR = Profile reference ''{0}'' has not been checked because it could not be found, and fetching it resulted in the error {1}
VALIDATION_VAL_PROFILE_UNKNOWN_ERROR_NETWORK = Profile reference ''{0}'' has not been checked because it could not be found, and the host {1} cannot be found
Validation_VAL_Unknown_Profile = Unknown profile {0}
VALIDATION_VAL_PROFILE_DEPENDS_NOT_RESOLVED = Profile {1} identifies {2} as a dependency (using the extension http://hl7.org/fhir/StructureDefinition/structuredefinition-dependencies), but this profile could not be found
XHTML_XHTML_Attribute_Illegal = Invalid attribute name in the XHTML (''{0}'' on ''{1}'')
@ -476,7 +476,7 @@ Display_Name_WS_for__should_be_one_of__instead_of_other = Wrong whitespace in Di
Unknown_Code__in_ = Unknown Code ''{0}'' in the system ''{1}''
UNKNOWN_CODE__IN_FRAGMENT = Unknown Code ''{0}'' in the system ''{1}'' - note that the code system is labeled as a fragment, so the code may be valid in some other fragment
Code_found_in_expansion_however_ = Code found in expansion, however: {0}
None_of_the_provided_codes_are_in_the_value_set_one = The provided code {2} is not in the value set ''{1}''
None_of_the_provided_codes_are_in_the_value_set_one = The provided code {2} was not found in the value set ''{1}''
None_of_the_provided_codes_are_in_the_value_set_other = None of the provided codes [{2}] are in the value set ''{1}''
Coding_has_no_system__cannot_validate = Coding has no system - cannot validate
Unable_to_handle_system__concept_filter_with_op__ = Unable to handle system {0} concept filter with op = {1}
@ -484,7 +484,7 @@ UNABLE_TO_HANDLE_SYSTEM__PROPERTY_FILTER_WITH_OP__ = Unable to handle system {0}
Unable_to_handle_system__filter_with_property__ = Unable to handle system {0} filter with property = {1}, op = {2}
Unable_to_resolve_system__value_set_has_include_with_no_system = Unable to resolve system - value set {0} include #{1} has no system
UNABLE_TO_RESOLVE_SYSTEM_SYSTEM_IS_INDETERMINATE = The code system {1} referred to from value set {0} has a grammar, and the code might be valid in it
Unable_to_resolve_system__value_set_has_include_with_unknown_system = Unable to resolve system - value set {0} include #{1} has system {2} which is unknown, and the server return error {3}
Unable_to_resolve_system__value_set_has_include_with_unknown_system = Unable to resolve system - value set {0} include #{1} has system {2} which icould not be found, and the server returned error {3}
Unable_to_resolve_system__value_set_has_include_with_filter = Unable to resolve system - value set {0} include #{1} has a filter on system {2}
Unable_to_resolve_system__value_set_has_imports = Unable to resolve system - value set has imports
Unable_to_resolve_system__value_set_has_multiple_matches = Unable to resolve system - value set expansion has multiple matches: {0}
@ -568,6 +568,7 @@ SEARCHPARAMETER_NOTFOUND = Unable to find the base Search Parameter {0} so can''
SEARCHPARAMETER_BASE_WRONG = The resource type {1} is not listed as a base in the SearchParameter this is derived from ({0})
SEARCHPARAMETER_TYPE_WRONG = The type {1} is different to the type {0} in the derivedFrom SearchParameter
SEARCHPARAMETER_EXP_WRONG = The expression ''{2}'' is not compatible with the expression ''{1}'' in the derivedFrom SearchParameter {0}, and this likely indicates that the derivation relationship is not valid
SEARCHPARAMETER_MISSING_COMPONENTS = When the SearchParameter has a type of 'composite', then the SearchParameter must define two or more components
VALUESET_NO_SYSTEM_WARNING = No System specified, so Concepts and Filters can't be checked
VALUESET_INCLUDE_INVALID_CONCEPT_CODE = The code ''{1}'' is not valid in the system {0}
VALUESET_INCLUDE_INVALID_CONCEPT_CODE_VER = The code ''{2}'' is not valid in the system {0} version {1}
@ -728,7 +729,7 @@ SD_VALUE_TYPE_IILEGAL = The element {0} has a {1} of type {2}, which is not in t
SD_VALUE_TYPE_REPEAT_HINT = The repeating element has a {1}. The {1} will apply to all the repeats (this has not been clear to all users)
SD_VALUE_TYPE_REPEAT_WARNING_DOTNET = The repeating element has a {1} value for a primitive type. The DotNet validator will not apply this to all the repeats - this is an error
SD_NO_TYPES_OR_CONTENTREF = The element {0} has no assigned types, and no content reference
CODESYSTEM_CS_UNK_EXPANSION = The code provided ({2}) is not in the expansion in the value set {0}, and a code is required from this value set. The system {1} is unknown.
CODESYSTEM_CS_UNK_EXPANSION = The code provided ({2}) is not in the expansion in the value set {0}, and a code is required from this value set. The system {1} could not be found.
BUNDLE_SEARCH_NOSELF = SearchSet Bundles should have a self link that specifies what the search was
BUNDLE_SEARCH_SELF_NOT_UNDERSTOOD = No types could be determined from the search string, so the types can''t be checked
BUNDLE_SEARCH_ENTRY_NO_RESOURCE = SearchSet Bundle Entries must have resources
@ -917,13 +918,13 @@ CONCEPTMAP_GROUP_TARGET_PROPERTY_INVALID = The property code ''{0}'' is not know
CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_MISMATCH = The type of this property should be {1} not {0}
CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_NO_SYSTEM = Since no system has been provided, a plain code cannot be used
CONCEPTMAP_GROUP_TARGET_PROPERTY_CODE_INVALID = The code {0} is invalid in the system {1}
CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_UNKNOWN_SYSTEM = The system {0} is unknown, so code values can''t be checked
CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_UNKNOWN_SYSTEM = The code system {0} could not be found, so code values can''t be checked
SM_DEPENDENT_PARAM_TYPE_MISMATCH_DUPLICATE = The group {0} has already been used with different parameters, so the type checking may be incorrect (other = [{1}]; this = [{2}])
CONCEPTMAP_GROUP_SOURCE_INCOMPLETE = Source Code System {0} doesn''t have all content (content = {1}), so the source codes cannot be checked
CONCEPTMAP_GROUP_TARGET_INCOMPLETE = Target Code System {0} doesn''t have all content (content = {1}), so the target codes cannot be checked
SD_NO_TYPE_CODE_ON_CODE = Snapshot for {1} element {0} has type.code without a value
UNKNOWN_CODESYSTEM = The CodeSystem {0} is unknown
UNKNOWN_CODESYSTEM_VERSION = The CodeSystem {0} version {1} is unknown. Valid versions: {2}
UNKNOWN_CODESYSTEM = The code system {0} could not be found
UNKNOWN_CODESYSTEM_VERSION = The code system {0} version {1} could not be found. Valid versions: {2}
UNABLE_TO_INFER_CODESYSTEM = The System URI could not be determined for the code {0} in the ValueSet {1}
VALUESET_TOO_COSTLY = The value set {0} has too many codes to display ({1})
VALUESET_TOO_COSTLY_TIME = The value set {0} took too long to process (>{1}sec)
@ -1046,7 +1047,7 @@ VALUESET_CIRCULAR_REFERENCE = Found a circularity pointing to {0} processing Val
VALUESET_SUPPLEMENT_MISSING_one = Required supplement not found: {1}
VALUESET_SUPPLEMENT_MISSING_other = Required supplements not found: {1}
CONCEPTMAP_VS_TOO_MANY_CODES = The concept map has too many codes to validate ({0})
CONCEPTMAP_VS_CONCEPT_CODE_UNKNOWN_SYSTEM = The code ''{1}'' comes from the system {0} which is unknown, so it''s not known whether it''s valid in the value set ''{2}''
CONCEPTMAP_VS_CONCEPT_CODE_UNKNOWN_SYSTEM = The code ''{1}'' comes from the system {0} which could not be found, so it''s not known whether it''s valid in the value set ''{2}''
CONCEPTMAP_VS_INVALID_CONCEPT_CODE = The code ''{1}'' in the system {0} is not valid in the value set ''{2}''
CONCEPTMAP_VS_INVALID_CONCEPT_CODE_VER = The code ''{2}'' in the system {0} version {1} is not valid in the value set ''{3}''
VALUESET_INC_TOO_MANY_CODES = The value set include has too many codes to validate ({0})
@ -1085,3 +1086,5 @@ FHIRPATH_ARITHMETIC_MINUS = Error in date arithmetic: Unable to subtract type {0
BUNDLE_ENTRY_URL_MATCHES_NO_ID = The fullUrl ''{0}'' looks like a RESTful server URL, but the resource has no id
BUNDLE_ENTRY_URL_MATCHES_TYPE_ID = The fullUrl ''{0}'' looks like a RESTful server URL, so it must end with the correct type and id (/{1}/{2})
BUNDLE_ENTRY_URL_ABSOLUTE = The fullUrl must be an absolute URL (not ''{0}'')
FHIRPATH_COLLECTION_STATUS_PARAMETER = Parameter {1} is inherently a collection, and so the expression ''{0}'' may fail, create an error, or return false if there is more than one item in the parameter value ({2})
FHIRPATH_COLLECTION_STATUS_CONTEXT = The context is inherently a collection, and so the expression ''{0}'' may fail, create an error, or return false if there is more than one item in the context ({2})