-
Notifications
You must be signed in to change notification settings - Fork 690
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
Investigate use of semgrep to catch untranslated strings #6380
Comments
Why are these omissions so difficult to catch during manual testing in the string-freeze process? At that point in the localization cycle, strings not (or incorrectly) marked for translation are indistinguishable from strings not yet translated. |
Time-boxed a cranky stab at this using 38c97bb as my tricky target case. As I expected, regex is Semgrep's only view into our Targeting c33cbe4 would be an easier first iteration, to catch the basic one-line |
We could solve this problem at least for human eyes by turning on Weblate's "pseudolocale generation":
I'll bring this up next week when we revisit our localization roadmap for v2.6.0 and beyond. |
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
This lints .format() calls being inside gettext(), which has caused us problems in the past. This is not a complete solution to #6380 since it doesn't look at HTML templates. See <https://beta.ruff.rs/docs/rules/#flake8-gettext-int> for full details. Refs #6380.
freedomofpress/securedrop-client#1272 added a set of handy
semgrep
rules to thesecuredrop-client
repo to catch untranslated GUI strings. It'd be good to investigate if similar rules would be helpful in this repo, bearing in mind that the actual patterns would of course need to be different and not generate too many false positives.The text was updated successfully, but these errors were encountered: