ETS copy of MishkaCmsCore.Runtime.Translation, so t/1 is answered without a query.
The same shape as MishkaCmsCore.Runtime.States.SettingsState, for the same reasons: loaded once
at boot, then kept current off the resource's own PubSub broadcasts, which reach every node — a
translation saved on one server is on all of them without a restart.
Each entry is {{site_id, language, key}, value}, site_id nil for a global row. Only rows that
HAVE a value are kept: a registered key nobody has translated is the same to t/1 as no row at
all, and it would only cost memory.
Summary
Functions
Returns a specification to start this module under a supervisor.
Every language a cached translation is written in.
The value for key in language on site_id, falling back to the global row, else nil.
Put one translation in the cache directly (test and seed helper).
Reload every translation from the database.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec languages() :: [String.t()]
Every language a cached translation is written in.
The value for key in language on site_id, falling back to the global row, else nil.
Two lookups at most, no GenServer hop. Never raises: a table that is not there yet is the same as one with nothing in it, so a template rendered before this process starts shows its keys.
Put one translation in the cache directly (test and seed helper).
@spec refresh() :: :ok
Reload every translation from the database.