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

Allowed errors messages translations #7

Open
babeou opened this issue Jun 22, 2018 · 4 comments
Open

Allowed errors messages translations #7

babeou opened this issue Jun 22, 2018 · 4 comments

Comments

@babeou
Copy link

babeou commented Jun 22, 2018

Right now we can't translate errors messages like "Field myFieldName required.".
It could be nice to do so.

@Awkan
Copy link
Contributor

Awkan commented Oct 5, 2018

According to me these errors must not be translated at all. However error messages could be improved to add more context on it (eg. we don't know why and where myFieldName is required).

This issue would also hide a huge development : create a system like Symfony form errors, to handle & translate errors (cc @Nek-)

@babeou
Copy link
Author

babeou commented Oct 5, 2018

At least it could be nice to had a key on the error to identify which field is in error (and some other context as you suggested).
Thus the translation could be processed on the app side.

@Nek-
Copy link
Contributor

Nek- commented Oct 5, 2018

I guess that's what @Awkan meant by adding more context to errors. Adding the field name in the exception would be a great improvement.

@Valouleloup
Copy link
Contributor

Translations are out of the scope of this library.
But yes, we can add a context with the field name.

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

4 participants