PhoenixKitOG.Gettext (PhoenixKitOG v0.2.0)

Copy Markdown View Source

Gettext backend for OpenGraph-module-specific UI strings.

Modules wrapping domain strings (template editor, assignments, variable/global labels, save-state badges, sample copy) declare use Gettext, backend: PhoenixKitOG.Gettext and call gettext(...). Translations live in this repo's priv/gettext/ — keep them in sync with mix gettext.extract + mix gettext.merge priv/gettext.

The Phoenix pipeline sets the locale once via Gettext.put_locale/1 (read from the process dictionary), so a single locale switch in the host drives this backend and core's PhoenixKitWeb.Gettext together.

Summary

Functions

handle_missing_bindings(exception, incomplete)

Callback implementation for Gettext.Backend.handle_missing_bindings/2.

handle_missing_plural_translation(locale, domain, msgctxt, msgid, msgid_plural, n, bindings)

Callback implementation for Gettext.Backend.handle_missing_plural_translation/7.

handle_missing_translation(locale, domain, msgctxt, msgid, bindings)

Callback implementation for Gettext.Backend.handle_missing_translation/5.