How to translate constraints alerts messages?

Is it possible to translate constraints error messages?

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/

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/ This file is specified in the cuba.mainMessagePack property of the 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.