72ece75b11
* ci(semgrep): add translation checks for report labels * refactor: shift report tests to it's own yml path can't be applied on a test id basis * ci: ignore regional report in translation checks [skip ci]
22 lines
630 B
YAML
22 lines
630 B
YAML
rules:
|
|
- id: frappe-missing-translate-function-in-report-python
|
|
paths:
|
|
include:
|
|
- "**/report"
|
|
exclude:
|
|
- "**/regional"
|
|
pattern-either:
|
|
- patterns:
|
|
- pattern: |
|
|
{..., "label": "...", ...}
|
|
- pattern-not: |
|
|
{..., "label": _("..."), ...}
|
|
- patterns:
|
|
- pattern: dict(..., label="...", ...)
|
|
- pattern-not: dict(..., label=_("..."), ...)
|
|
message: |
|
|
All user facing text must be wrapped in translate function. Please refer to translation documentation. https://frappeframework.com/docs/user/en/guides/basics/translations
|
|
languages: [python]
|
|
severity: ERROR
|
|
|