-
Notifications
You must be signed in to change notification settings - Fork 9
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
Translate error messages from auth.js #23
Comments
I'm not aware of any best practices for translating string ins JS files in a symfony environment, but this bundle looks promising. But using it would add another dependency to this bundle... |
Using a bundle to translate just a couple of short error messages seems somehow overkill to me. Maybe we should do something like this:
|
Yes, that sounds reasonable. |
Let's pick this up together with #25. I think we should translate the https://github.com/grantila/u2f-api#user-content-errors or https://developers.yubico.com/U2F/Libraries/Client_error_codes.html
|
In #22 I've added a Dutch translation for one single message ('press button').
However, I didn't translate the error messages (yet): https://github.com/darookee/u2f-two-factor-bundle/blob/master/Resources/public/js/auth.js#L10
What's the best way to translate error messages in a Javascript file? I know how translations in Symfony/Twig work, but I'm not sure what's the best way to translate strings from a Javascript files.
The text was updated successfully, but these errors were encountered: