zonemaster / zonemaster-engine

The Zonemaster Engine - part of the Zonemaster project
Other
34 stars 33 forks source link

Internationalize validation errors from the Profile module #1375

Open mattias-p opened 2 months ago

mattias-p commented 2 months ago

In CLI we present error messages in response to user errors. I believe it is our policy to internationalize these error messages. Whenever CLI users specify overrides to profile property values, the validation of these values should be performed by the Zonemaster::Engine::Profile module. When you attempt to set a profile property to an illegal value an exception is thrown.

Today the profile property validation exception messages are a simple strings in English. These messages should be internationalized so they can be localized for presentation in user feedback.

In Zonemaster we sometimes check for API contract violations in the code and throw exceptions if they do occur. When this happens in a Backend agent, the handling of the request is terminated and the exception is logged. Since we want to avoid writing multi-lingual logs, the API contract violation exception messages should not be internationalized.