How to translate constraints alerts messages?

Is it possible to translate constraints error messages?
https://doc.cuba-platform.com/manual-6.4/constraints.html

For example, where do I translate:
Operation delete is denied for the instance of entity “xxxx”

see screenshot

Screenshot 2017-04-14 22.42.38

These messages are defined in the GUI main message pack of the platform: com/haulmont/cuba/gui/messages.properties:

rowLevelSecurity.entityAndOperationMessage=Operation "%s" is denied for the instance of entity "%s"
rowLevelSecurity.entityMessage=Access denied for the instance of entity "%s"
rowLevelSecurity.caption=Access denied

So you can redefine them in the corresponding file of your project, e.g. com/company/sample/web/messages.properties. This file is specified in the cuba.mainMessagePack property of the web-app.properties file and marked as “main message pack” in Studio.

See also this document for how to translate all common elements of the platform.

thank you Konstantin!

IMHO, the complet set of key=value should already be included once a new fresh project is created in studio.

You are welcome.

Not sure about including all common messages, because it can hinder migration to a new platform version later. However, we are thinking about facilitating translations, now the process is too complicated.