fabricatio_locale.actions.localize

Module containing the LocalizePoFile action for localizing .po files.

Classes

LocalizePoFile

Action class to localize messages in a .po file.

Module Contents

class fabricatio_locale.actions.localize.LocalizePoFile(/, **data: Any)

Bases: fabricatio_core.Action, fabricatio_locale.capabilities.localize.Localize

Action class to localize messages in a .po file.

ctx_override: ClassVar[bool] = True

Whether to override the instance attr by the context variable.

pofile: str | pathlib.Path = 'file.po'

Path to the source .po file containing messages to localize.

target_lang: str = 'en'

Target language code (e.g., ‘es’ for Spanish) to translate messages into.

output_path: str | pathlib.Path | None = 'locale_file.po'

Optional path to save the updated .po file. Defaults to same as input if not specified.