zazuko / rdf-validate-shacl

Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
MIT License
98 stars 13 forks source link

Customization of default failure messages #40

Closed Gnomus042 closed 3 years ago

Gnomus042 commented 3 years ago

Is there any opportunity for specifying custom failure messages for different types of failures (texts, that are defined in validators-registry.js)? I want to add localization to my project, so I need to replace these messages with translated ones. Thank you in advance for the answer :)

ktk commented 3 years ago

@Gnomus042 You can provide custom labels with sh:message, I used that quite a lot recently and it was enough for me to define "proper" texts about what is wrong and you can explicitly translate those, see the specification. Is that enough?

Gnomus042 commented 3 years ago

Should be fine, thanks!