-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
$.i18n.Tr
should not output fallback strings in production mode
#12579
Comments
I believe #12581 solves this in a way.. |
The PR solves that one case but similar cases can pop up somewhere else anytime. |
That's true. |
The fallback string should always be outputed, otherwise users would see nothing and know nothing, they would report issues like "I see empty UI", which is worse than reporting the invalid translation key. And the i18n module has been refactored recently. |
Extracted from #12564
If an invalid translation key is passed, the function will render strings like
signing.wont_sign.%!s(<nil>)
into HTML which is ugly. We should only do that when gitea is in development mode, otherwise output empty string only.The text was updated successfully, but these errors were encountered: