Skip to content

Policies (policies in config) ​

The config schema includes optional policies so sync, quality, and generate --resume can respect copy and exclusion rules without ad-hoc flags.

Who applies what (vs exclude) ​

knobApplied byEffect
exclude (scan config)Scanner / validate / cleanup pipelinesLimits which source files participate in discovery.
policies.preservesync, merges, cleanup, and resume flows that respect preserveKeys/prefixes that stay in targets, hydrate from source, and/or skip machine translation.
policies.parityquality, review, generate --resume heuristicsExcludes expected matches from parity-style checks.

policies.preserve ​

FieldSyncCleanupgenerate --resume (when respectPreserve)
copyKeysExact paths stay in the sync template; hydrate from source; retain on pruneNot removed as unusedVerbatim — skip MT (copy source)
copyPrefixesSame for any path under the prefix (e.g. navigation.)SameVerbatim — skip MT
uncertainPrefixesDeclared roots without scan anchors — hydrate + retain like auto uncertain prefixesProtected when uncertain-key policy is protect / warn_onlyShape — allowed to translate (not treated as verbatim preserve)

Trailing dots on prefixes (e.g. navigation.) are fine; sync normalizes them for keep matching.

Split semantics (no rename) ​

  • Verbatim: copyKeys / copyPrefixes — never machine-translate; sync keeps/hydrates from source.
  • Shape: uncertainPrefixes (and auto-detected uncertain prefixes from the scan) — keep trees in locale JSON through sync; generate --resume may still fill them when policy allows.

Prefer declaring uncertainPrefixes (or copyPrefixes when copy must stay source-language) instead of scan-only anchor files once you are on ≥ 1.0.3.

policies.parity ​

  • excludeKeys
  • excludePrefixes
  • excludeValues

Why init --rich shows this block ​

i18nprune init --rich includes a policies section so teams see where preserve/parity rules belong. You can keep it empty until needed.