پرش به محتویات

اسم‌ها

یک مجوز، یک بسته یا یک نقش، به زبان خواننده - و با clearance.translations، با اسمی که مدیر سیستم می‌دهد. توضیح‌های زیر از خود کد خوانده می‌شوند، و مثل کد به انگلیسی‌اند.

label_of

label_of(thing: Any, language: str | None = None) -> str

How thing reads in language.

labels_in

labels_in(language: str | None = None) -> Labels

The names in language - the active one when left out.

Labels

Labels(language: str)

Names as the code and the database give them: no translations kept apart.

of

of(thing: Any) -> str

How thing reads.

description_of

description_of(thing: Any) -> str

What thing is for - nothing, unless somebody wrote it down.

stored staticmethod

stored(thing: Any) -> str

What the code or the row says, in the active language where the code says it.

TranslationService

TranslationService(actor: User | None)

Every change to the names of a permission, a bundle or a role, made as actor - who needs clearance.permission_edit.

name

name(thing: Any, language: str, name: str, description: str = '') -> None

Name thing in language - or, with no name, stop naming it there.