betty.locale.localizable.config module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.locale.localizable.config module

Provide localizable configuration.

final class betty.locale.localizable.config.StaticTranslationsLocalizableConfiguration

  Bases: `Configuration`, `StaticTranslationsLocalizable`

  Provide configuration for a `betty.locale.localizable.Localizable`.

  Read more at multiple translations.

  dump() → bool | int | float | str | None | MutableSequence[bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | MutableMapping[str, bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | type[Void]

    Dump this instance to a portable format.

  load(dump: bool | int | float | str | None | MutableSequence[bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | MutableMapping[str, bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]]) → None

    Load dumped configuration.

    Raises:

      betty.assertion.error.AssertionFailed – Raised if the dump contains invalid configuration.

  update(other: Self) → None

    Update this configuration with the values from `other`.

final class betty.locale.localizable.config.StaticTranslationsLocalizableConfigurationAttr

  Bases: `MutableAttr`[`object`, `StaticTranslationsLocalizableConfiguration`, `Mapping`[`str`, `str`] | `str`]

  An instance attribute that contains `betty.locale.localizable.config.StaticTranslationsLocalizableConfiguration`.

  __init__(attr_name: str, *, required: bool = True)
  del_attr(instance: object) → None

    Delete the attribute value.

  new_attr(instance: object) → StaticTranslationsLocalizableConfiguration

    Create a new attribute value.

  set_attr(instance: object, value: Mapping[str, str] | str) → None

    Set the attribute value.