The dev server's in-context state, in a protected ETS table this process owns: whether marking is on (spec-0017 §1.3) and the saved drafts the overlay sent (§1.2). Every gettext lookup reads it, so reads go straight to ETS; writes are serialized through the process.
Marking lasts marking_ttl_ms/0 after the last set_marking(true) — the
overlay heartbeats while the editor is open, so a closed tab or a crashed
overlay can't leave markers on for good.
Summary
Types
A saved draft: one text, or one text per plural form.
Functions
Returns a specification to start this module under a supervisor.
True while marking is on.
How long marking stays on after the overlay last asked for it.
The draft for {domain, key, locale}, or nil.
Replaces every draft with edits ({domain, key, locale, override}
tuples) — the overlay always sends the full set, so an empty list restores
the catalogs. Unchanged drafts never disappear mid-swap.
Turns marking on (for ttl_ms, default marking_ttl_ms/0) or off.
{marking?, any_overrides?} — the lookup's fast path reads only this.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec marking?() :: boolean()
True while marking is on.
@spec marking_ttl_ms() :: pos_integer()
How long marking stays on after the overlay last asked for it.
The draft for {domain, key, locale}, or nil.
Replaces every draft with edits ({domain, key, locale, override}
tuples) — the overlay always sends the full set, so an empty list restores
the catalogs. Unchanged drafts never disappear mid-swap.
@spec set_marking(boolean(), non_neg_integer()) :: boolean()
Turns marking on (for ttl_ms, default marking_ttl_ms/0) or off.
{marking?, any_overrides?} — the lookup's fast path reads only this.