Reuse what you've translated
Goal: never re-translate a sentence you've already translated. When you ship an update, most text is unchanged; kapi brings back what it recognizes from earlier releases and sends only the new and changed parts forward, marking anything still untranslated so nothing slips out blank. Deterministic, seconds, no API key. Concepts: Content memory and Terminology; where each store lives: Memory & terms storage.
- Desktop
- Agent (Claude)
- CLI
The Content Memory view is where the project's memory lives:
- Bring in past work. Load a content-memory bundle (or, coming from another system, a TMX export) with
kapi memory import, or commit the bundle the recipe binds withdefaults.memory_source; the view lists entries and language pairs as they land. - Run the flow. A project flow whose first step is
recyclefills every exact match from memory before any translate step runs; Bring up to date applies it across locales, and only the misses go forward. - Watch leverage accumulate. Every finished run absorbs its results, so the next release starts warmer.
Ask for the leverage pass:
Import
project.memory.jsoninto the project's content memory, pre-translate the French catalog from it, and tell me what's left.
The assistant runs kapi memory import, then recycle, and reports the residue (the blocks with no match) so you decide what goes to a model or a vendor. Approved sentence pairs it encounters along the way can be banked for the future with a kind:"memory" change-set entry through kapi apply.
Three deterministic steps: leverage, make the gaps visible, pre-flag terms:
kapi memory import project.memory.json # 1. load past work (see kapi memory stats)
kapi exec recycle messages_en.json -o step1.json \
--source-lang en --target-lang fr # 2. fill exact + fuzzy matches
kapi pseudo-translate step1.json -o step2.json # 3. mark what memory missed
kapi exec term-check step2.json --source-lang en --target-lang fr \
--termstore product-terms # 4. pre-flag terminology drift
Tune matching with --fuzzy-threshold (default 70) and --fill-target-threshold (default 95); how matching works. To machine-translate the misses instead of pseudo-filling them, swap step 3 for kapi translate and keep term-check as the guardrail.
Reuse has a second, governed form on the translate step itself. A block whose source was edited keeps its earlier approved translation in the memory; with reuse: prior (the translate tool's default), that translation goes into the prompt as reference, offered only when the same governing context (voice, terms, point) is in force, so the model redrafts from wording a person already accepted rather than from nothing. The recycle thresholds above stay on the paths that run without a translate step; reuse: none turns the reference off for a cheap run.
In a project, declare it once as a flow and drop every flag:
defaults:
source_language: en
target_languages: [fr]
flows:
pretranslate:
steps:
- tool: recycle
- tool: pseudo-translate
- tool: term-check
kapi run pretranslate resolves the project's content memory, terms store, and languages automatically, and a recycle step at the head of the default flow gives kapi up the same leverage on every pass.
Try it
The in-browser build pre-seeds a content memory and a terms store. The rail tops up the memory from a TMX export (the interop path in from another system), then runs the pipeline; open the intermediate files to watch each step feed the next:
Loading the walkthrough…
Next
- Memory & terms storage: loose file, named store, or project store.
- Keep terms consistent: the validation side of the same terms store.
kapi memoryandkapi exec recycle: command references.