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

Column labels don't have to be translatable #23

Open
barredterra opened this issue Apr 24, 2023 · 1 comment
Open

Column labels don't have to be translatable #23

barredterra opened this issue Apr 24, 2023 · 1 comment

Comments

@barredterra
Copy link
Contributor

barredterra commented Apr 24, 2023

Assuming you want to translate the source string to the target language only once (and not re-translate the translation), the rules in https://github.com/frappe/semgrep-rules/blob/c0a1c4fcc4eb9fd7813187fa2420872cba8a3770/rules/report.py seem to be incorrect. Report column labels should not be translated in the backend since they will get translated in the frontend anyway.

One argument for this rule would be to mark translatable strings. But then the translation function will be run twice, what brings its own problems.

@ankush can we remove these rules? Or maybe the better way would be to remove the second translation in the frontend?

@barredterra barredterra changed the title Field definitions don't have to be translatable Column labels don't have to be translatable Apr 24, 2023
@barredterra
Copy link
Contributor Author

Resolved by frappe/frappe#21606

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

1 participant