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

feat: _html translation key automatic safety support #837

Closed
jclusso opened this issue Feb 9, 2024 · 1 comment · Fixed by #842
Closed

feat: _html translation key automatic safety support #837

jclusso opened this issue Feb 9, 2024 · 1 comment · Fixed by #842
Milestone

Comments

@jclusso
Copy link
Contributor

jclusso commented Feb 9, 2024

Summary

Translation keys that end with _html would be nice if they automatically were marked safe so we can avoid using == or .html_safe in views. This is something that happens in Rails and I think it would be nice to have this feature. Going to make a PR for this when I have some time, but wanted to document it here and see if there are any objections.

@jclusso jclusso changed the title feat: _html translation keys feat: _html translation key automatic safety support Feb 9, 2024
@jclusso
Copy link
Contributor Author

jclusso commented Feb 9, 2024

Also wanted to further add that this is also recognized in other projects like i18n-tasks since it will mess up translating keys that are HTML if they don't have _html on them.

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

Successfully merging a pull request may close this issue.

2 participants