betty.locale.translation 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.translation module

Manage translations of built-in translatable strings.

betty.locale.translation.assert_extension_assets_directory_path(extension: type[Extension]) → Path

  Check that the given extension has an assets directory, and return its path.

betty.locale.translation.find_source_files(source_directory_path: Path, *exclude_directory_paths: Path) → Iterable[Path]

  Find source files in a directory.

async betty.locale.translation.new_dev_translation(locale: str) → None

  Create a new translation for Betty itself.

async betty.locale.translation.new_extension_translation(locale: str, extension: type[Extension]) → None

  Create a new translation for the given extension.

async betty.locale.translation.new_project_translation(locale: str, project: Project) → None

  Create a new translation for the given project.

async betty.locale.translation.update_dev_translations(*, _output_assets_directory_path_override: Path | None = None) → None

  Update the translations for Betty itself.

async betty.locale.translation.update_extension_translations(extension: type[Extension], source_directory_path: Path | None = None, exclude_source_directory_paths: set[Path] | None = None, *, _output_assets_directory_path_override: Path | None = None) → None

  Update the translations for the given extension.

async betty.locale.translation.update_project_translations(project_directory_path: Path, source_directory_path: Path | None = None, exclude_source_directory_paths: set[Path] | None = None, *, _output_assets_directory_path_override: Path | None = None) → None

  Update the translations for the given project.