semgrep-rules icon indicating copy to clipboard operation
semgrep-rules copied to clipboard

Column labels don't have to be translatable

Open barredterra opened this issue 2 years ago • 1 comments

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 avatar Apr 24 '23 12:04 barredterra

Resolved by https://github.com/frappe/frappe/pull/21606

barredterra avatar Jul 06 '23 14:07 barredterra