Terms and translations

Terms and translations

The atomic units of LangSync — translation keys (marks) and their per-language values, with the rules that govern them.

Not verified yet

A term is a translation key — welcome.title, errors.network, button.submit. A translation is the actual string for that term in one specific language. In LangSync's own vocabulary (you'll see this in the dashboard dialogs and the CLI), the key itself is called the mark.

namespace: marketing-site
  term (mark): welcome.title
    en-US: "Welcome"        ← default language value (the source)
    de-DE: "Willkommen"
    fr-FR: "Bienvenue"

Terms live inside namespaces. The same mark in two different namespaces refers to two unrelated keys.

A term has

FieldWhat it's forRules
MarkThe key your code references.Unique within the namespace (creating a duplicate is rejected with a conflict error).
ContextA free-text note about where and how the string is used, for your team, translators, and the AI, which gets it with the key on every automatic translation.Optional. A sync can set it from your repository (context_file).
Default language valueThe string in the namespace's default language. This is the source every AI translation is generated from.Required when creating a term in the dashboard.
TranslationsOne value per attached target language.Filled by humans, single-cell AI suggestions, or batch auto-translate.

A translation itself carries its value, its language, audit metadata (who last changed it and when), whether the text is still exactly what the AI wrote (aiGenerated), and when a person marked it reviewed (reviewedAt, see Review state).

In a namespace whose message syntax is icu, every value is checked before it is stored, whoever writes it; see ICU messages.

Where terms come from

Four ways to get terms into a namespace, all interchangeable:

  1. One at a time in the dashboard — Manage terms.
  2. Bulk import from CSV, TSV, XLSX, or XLS — Bulk import.
  3. The CLI — nrc langsync terms add, or wholesale from your repository's JSON files via nrc langsync sync.
  4. The API — see the API reference.

Best practices for marks

  • Hierarchical dotted keys. auth.signin.title reads better than signinTitle, groups related keys when sorted, and searches well.
  • Stable mark, mutable value. Never rename a mark to change its meaning — your deployed code references the old mark.
  • Source string ≠ mark. Don't use the English copy as the key. When the copy changes, you don't want every code reference to break.
  • Write context. "Hero heading on the homepage" takes five seconds and pays off every time someone else (or future you) reviews the namespace, and the AI reads it too, so a short key like close is translated as the button it is.

Empty vs. missing translations

A translation can be missing entirely (no value stored for that language) or explicitly empty (saved as an empty string). Both show up in the missing translations filters and both are candidates for auto-translate. Billing counts only non-empty stored translations — empty values cost nothing.

One consequence worth knowing: the Public API returns only terms that have a stored translation in the requested language, so a term that was never translated into German simply won't appear in the German response. Build your app-side fallback (usually "fall back to the default language") with that in mind.

Review state

A translation can be marked reviewed: a person has read its current text and approves it. LangSync records who and when, and clears the mark as soon as the text changes, so reviewed always means this text was read.

In the dashboard, pick a language in the namespace's Review strip, filter by Unreviewed or AI translated, and mark one text, the selected terms or all shown terms reviewed; the translation dialog and the side-by-side view show the state too. See Review translations.

Over the API:

  • Mark reviewed: POST /namespaces/{namespaceName}/translations/{languageId}/review with {"termIds": [1234, 1235]}, 1 to 1,000 terms of one language. Only translations that have text and are not reviewed yet are marked; terms of another namespace are skipped. The answer {"reviewed": 2} says how many were marked. An empty or longer list is refused with 400 TERM_REVIEW_INVALID (data.reason no_terms or too_many_terms), a language the namespace doesn't have with 404 LANGUAGE_NOT_IN_NAMESPACE.
  • Who may: anyone allowed to edit translations in that language (langsync:UpdateTermTranslation on the namespace and the language). Marking is a person's approval, so MCP connections, CI tokens and scoped CLI sign-ins can't do it, and Norcube AI never proposes it.
  • Cleared on change: any write that changes the text clears the mark, whatever makes it: an edit, an AI translation, a CLI push, an import, or a sync with --retranslate-on-source-change emptying the translation. Saving the same text again keeps it.
  • Find what's left: the term list returns reviewedAt on each translation (null while unreviewed) and filters with languageId plus reviewed=true|false and/or aiGenerated=true|false. Either filter needs languageId (400 TERM_FILTER_LANGUAGE_REQUIRED otherwise). languageId=17&reviewed=false&aiGenerated=true lists the AI's texts in language 17 that nobody has checked yet.
  • Counts: the dashboard's Review strip shows each target language's unreviewed count. GET /namespaces/{namespaceName}/languages returns unreviewedCount per language (0 for the default language, which is what the others are translated from), a completed sync job returns unreviewedPerLanguage, and nrc langsync sync prints the count per language in its summary.
  • Audit: each request is recorded as translation.reviewed with how many terms were asked for and how many were marked.

Review state is separate from the AI label: the label says whose text it is, review state whether a person approved it. A person can approve an AI text without changing it.

Behaviour and edge cases

  • Deleting a term removes the term and every translation across every language. No undo. Both the dashboard and the CLI ask for confirmation first.
  • Renaming a mark takes effect immediately. Any deployed app fetching by the old mark stops finding it — treat mark renames like API breaking changes.
  • Editing the default-language value does not re-translate the other languages. They keep showing their existing values until you re-run auto-translate, edit them manually, or use the CLI's --retranslate-on-source-change sync flag, which clears stale translations so the AI regenerates them.
  • Concurrent edits are last-write-wins. If two people edit the same translation at the same time, the later save overwrites the earlier one. There is no per-translation history: the audit log records that a term or one of its translations changed and by whom, never the previous or the new value.

On this page