betty.locale.localizable.gettext module

Gettext translations.

betty.locale.localizable.gettext.gettext(message: str, /) Localizable

Like gettext.gettext().

Positional arguments are identical to those of gettext.gettext(). Keyword arguments are identical to those of str.format(), except that any betty.locale.localizable.Localizable will be localized before string formatting.

betty.locale.localizable.gettext.ngettext(message_singular: str, message_plural: str, n: int, /) Localizable
betty.locale.localizable.gettext.ngettext(message_singular: str, message_plural: str, n: None = None, /) CountableLocalizable

Like gettext.ngettext().

Positional arguments are identical to those of gettext.ngettext(). Keyword arguments are identical to those of str.format(), except that any betty.locale.localizable.Localizable will be localized before string formatting.

Messages MUST have a {count} placeholder.

betty.locale.localizable.gettext.npgettext(context: str, message_singular: str, message_plural: str, n: int, /) Localizable
betty.locale.localizable.gettext.npgettext(context: str, message_singular: str, message_plural: str, n: None = None, /) CountableLocalizable

Like gettext.npgettext().

Positional arguments are identical to those of gettext.npgettext(). Keyword arguments are identical to those of str.format(), except that any betty.locale.localizable.Localizable will be localized before string formatting.

betty.locale.localizable.gettext.pgettext(context: str, message: str, /) Localizable

Like gettext.pgettext().

Positional arguments are identical to those of gettext.pgettext(). Keyword arguments are identical to those of str.format(), except that any betty.locale.localizable.Localizable will be localized before string formatting.