Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalize validation errors from the Profile module #1375

Open
mattias-p opened this issue Jul 22, 2024 · 0 comments
Open

Internationalize validation errors from the Profile module #1375

mattias-p opened this issue Jul 22, 2024 · 0 comments

Comments

@mattias-p
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant