Pārlūkot izejas kodu

fix: translate each role

(cherry picked from commit eb1c9fff68)
version-14
Sagar Vora pirms 2 gadiem
committed by Mergify
vecāks
revīzija
6816f83fc2
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. +3
    -1
      frappe/__init__.py

+ 3
- 1
frappe/__init__.py Parādīt failu

@@ -836,7 +836,9 @@ def only_for(roles: list[str] | tuple[str] | str, message=False):
raise PermissionError

throw(
_("This action is only allowed for {}").format(bold(", ".join(roles))),
_("This action is only allowed for {}").format(
", ".join(bold(_(role)) for role in roles),
),
PermissionError,
_("Not Permitted"),
)


Notiek ielāde…
Atcelt
Saglabāt