# stapel-translate 0.5.6

AI-powered content translation: a TranslationEntry/TranslationValue store across a configurable language set, an LLM-routed translate.resolve comm Function with English-fallback, autofill/verification workflows, a staff dashboard (stats, per-language editing, LLM help, export/import, orphan cleanup), a Figma plugin API, and pluggable key collectors (backend error keys, notification templates, project-specific) so keys enter without any module importing another.

Contract: axes 2 · extension points 4.
Generated from docs/capabilities.json by `stapel-llms-txt` — do not edit; drift-gated by `make contract-check`.

## Configuration axes — what a product switches on
Settings keys; `default` is what you get by saying nothing. Turning an axis off unmounts the operations it gates.
- DEFAULT_LANGUAGE [enum, default "en"] — Source/fallback language
  Source/fallback language for translate.resolve and autofill (conf.py, MODULE.md Settings table).
- LLM_PROVIDER [enum, default "stapel_translate.providers.AgentProvider"] — LLM backend for translation
  Which backend performs a single-string translation for translate/verify/autofill. Default routes to stapel-agent by HTTP; CommAgentProvider routes through the llm.complete comm Function instead (in-process in a monolith); OpenAICompatibleProvider talks to any OpenAI-compatible endpoint directly (conf.py, MODULE.md Settings table).

## Extension points — what a product replaces, fork-free
- LLM_PROVIDER [dotted_path]
  Resolved via import_string in get_llm_provider(); contract: translate(key, english_text, target_language, context) -> str; subclass providers.BaseTranslationProvider to reuse prompt building (conf.py, MODULE.md 'Settings').
- collectors [named_registry]
  register_collector('name', callable_or_dotted_path) (collectors.py): a zero-arg callable returning a stats dict, run by collect_translations and the dashboard 'Collect keys' button — the project-specific-keys channel (MODULE.md 'Adding / overriding translations').
- serializer_seams [class_override]
  mixins.SerializerSeamMixin: views declare request_serializer_class/response_serializer_class (or purpose-prefixed variants) instantiated only through matching get_*_serializer_class() getters (MODULE.md 'Serializer seams').
- translate.resolve [comm_function]
  Provided Function: {keys, language} -> {values}, DEFAULT_LANGUAGE fallback, missing keys omitted (never null), soft-deleted entries never resolved (functions.py, MODULE.md 'Functions').

## Fits with — fleet dependencies
- stapel-agent (optional) — default LLM_PROVIDER (AgentProvider) calls stapel-agent over HTTP (AGENT_SERVICE_URL) or via the llm.complete comm Function (CommAgentProvider); no direct Python import either way (conf.py AGENT_SERVICE_URL, MODULE.md Settings table)
- stapel-core (required) — comm bus (translate.resolve Function, translations.changed emit, task_handler), RevisionMixin, access categories, error registry (pyproject.toml dependency)
