Gå til hovedinnhold

Learn kapi › Add languages

Recycle first, draft the rest

One verb catches every language up, and asks a provider only for what is left.

kapi up runs the loop: it reuses the wording the project has established, drafts the remainder with the configured provider, checks what it produced, and holds back for review what a machine cannot decide. This lab runs it on Compass with the built-in demo provider and reads what shipped and what waits for review.

  1. Convergekapi upOne verb. Approved wording is recycled first; only what is left reaches a provider, here the built-in demo stub, keyless and offline, which marks everything it writes. Thirty-seven of Norwegian's thirty-eight units come back out of the project's own memory. Norwegian and German clear the gate. Dutch waits for review: one of its units fails the project's bound checks.
  2. Two offered, one heldkapi statusTwo languages are offered on translated work. Dutch is held until somebody looks at the unit that failed. Its drafts are safe in the store; what the gate withholds is delivery.
  3. Write the manifest where the site reads itkapi status --ship --emit site/ship.jsonThe same answer, written to the file the page fetches.
  4. The contract with the delivery edgecat site/ship.jsonPer language, two answers: is it safe to offer at all, and is every string in it established or only translated. Dutch also notes that no terms govern it.
  5. The stub marks its outputgrep -n '⟦' site/locales/nb.jsonThe materialized Norwegian catalog carries the recycled wording and, for the four new strings, the stub's marked drafts. Nobody mistakes them for a translation.
  6. What the recycle step readkapi memory search berth | head -8The project's content memory: approved pairs per language, including what the committed catalogs taught it on this first pass.
  7. The pre-release barkapi check --ship --gate voicekapi check --ship names what holds Dutch back: a failing check and no approval yet. Exit 3 in CI, until a review clears it. An ordinary build never runs this.