DialectoInContext.Args (dialecto_in_context v0.1.0)

Copy Markdown View Source

What a marker records about the call that produced its text (spec-0017 §1.1), so the overlay can preview an edit exactly as gettext would render it:

  • every binding gettext could interpolate, as it would render — strings, integers and booleans as they are, everything else as its to_string/1 (a float renders 2.0 in gettext but 2 in JavaScript, so it travels as text); a binding that is itself a marked message is {"$marked": clean text} (spec-0016 §3). A value gettext can't interpolate (no String.Chars) is left out;
  • for a plural lookup, count (gettext binds it too), __n and __form;
  • __missing: true when gettext fell back to the msgid.

Summary

Functions

The JSON recorded in a marker's header.

Functions

json(bindings, extras \\ [])

@spec json(map(), keyword()) :: String.t()

The JSON recorded in a marker's header.