Skip to content

Localization#

CommandLocaleRequest #

Bases: LocaleRequest

A request to localize a command.

command property #

command: CommandProto

The command that is requesting localization.

description property #

description: str | None

The description of the command to be localized, if any.

locale property #

locale: Locale

The locale that is being requested.

name property #

name: str

The name of the command to be localized.

qualified_name property #

qualified_name: Sequence[str]

The qualified name of the command that is requesting localization.

type property #

The type of locale request.

CustomLocaleRequest #

Bases: LocaleRequest

A custom locale request made by the user.

command property #

command: CommandProto

The command that is requesting localization.

context property #

context: Context[Any]

The context that is requesting localization.

key property #

key: str

The key that is to be localized.

locale property #

locale: Locale

The locale that is being requested.

qualified_name property #

qualified_name: Sequence[str]

The qualified name of the command that is requesting localization.

type property #

The type of locale request.

LocaleRequest #

Bases: ABC

The base class for all locale requests.

command property #

command: CommandProto

The command that is requesting localization.

locale property #

locale: Locale

The locale that is being requested.

qualified_name property #

qualified_name: Sequence[str]

The qualified name of the command that is requesting localization.

type abstractmethod property #

The type of locale request.

LocaleRequestType #

Bases: IntEnum

The type of locale request.

COMMAND class-attribute instance-attribute #

COMMAND = 0

A command locale request.

CUSTOM class-attribute instance-attribute #

CUSTOM = 2

A custom locale request.

OPTION class-attribute instance-attribute #

OPTION = 1

An option locale request.

LocaleResponse #

The response to a command or option locale request.

description class-attribute instance-attribute #

description: str | None = field(default=None)

The localized description of the command or option.

name class-attribute instance-attribute #

name: str | None = field(default=None)

The localized name of the command or option.

OptionLocaleRequest #

Bases: LocaleRequest

A request to localize a command option.

command property #

command: CommandProto

The command that is requesting localization.

description property #

description: str

The description of the option to be localized.

locale property #

locale: Locale

The locale that is being requested.

name property #

name: str

The name of the option to be localized.

option property #

option: OptionBase[Any]

The option that is requesting localization.

qualified_name property #

qualified_name: Sequence[str]

The qualified name of the command that is requesting localization.

type property #

The type of locale request.