mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
* 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]
(cherry picked from commit 72ece75b11)
Co-authored-by: Alan <2.alan.tom@gmail.com>
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
|
|
|