Expand description
Render candidate groups as text (colored) or json, with identical structure.
Tiers are reported independently (a duplicate that holds under several tiers
appears once per section) — there is no cross-tier dedup. JSON lives in the
library core (serde_json is always available); the colored text renderer is
behind the cli feature, alongside the colored dependency it needs.
§JSON schema
{
"groups": [
{
"tier": "exact",
"agree_locales": 3,
"total_locales": 3,
"cross_domain": false,
"keys": [{"domain": "messages", "msgctxt": null,
"msgid": "Save", "msgid_plural": null}],
"shared": {"en": "Save", "ru": "Сохранить"},
"differ": []
}
],
"summary": {"groups": 1, "keys": 120, "candidate_keys": 2}
}Functions§
- to_json
- Serialize groups to pretty JSON.
total_keysis the number of keys examined (the summary denominator). Order is preserved as given (deterministic). - to_text
- Render groups as colored text: a section per tier (exact→normalized→fuzzy),
within each ordered by match level; a footer summary. Empty cell under
ownshows as∅; cross-domain groups carry a unify hint.