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

[Feature Request] i18n support for error message #88

Open
jesseXu opened this issue Sep 12, 2023 · 4 comments
Open

[Feature Request] i18n support for error message #88

jesseXu opened this issue Sep 12, 2023 · 4 comments
Labels
Feature New feature or request

Comments

@jesseXu
Copy link
Contributor

jesseXu commented Sep 12, 2023

Feature description:

It would be good the error message has the i18n feature or can integrate with some i18n libs, then the error message can come out with different language support.

Problem it solves or use case:

Proposed implementation or solution:

This seems not an important feature or even shouldn't be done in this repo, still would be good to have some extra custom fields leave in violations that we can use it as a i18n key or something.

Contribution:

Can help for golang implementation if have a clear goal.

Examples or references:

Additional context:

@jesseXu jesseXu added the Feature New feature or request label Sep 12, 2023
@rodaine
Copy link
Member

rodaine commented Sep 12, 2023

Totally agree, @jesseXu! We're exploring ways to make that happen. The ID on the violation is intended to be used as an i18n key, but we'll need to provide ways of translating the templates contained within the format CEL expressions and potentially include the rules that applied to the message or field that caused the violation (see #17)

@TENX-S
Copy link

TENX-S commented May 11, 2024

Any updates?

@zishiguo
Copy link

Any updates?

+1

@rodaine
Copy link
Member

rodaine commented Nov 20, 2024

Hi! The work in #265 is the first step in exposing the information necessary to support i18n. Once that functionality lands in the libraries, you'll be able to customize the validation errors appropriately.

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

No branches or pull requests

4 participants