PhoenixKitStaff.Gettext (PhoenixKitStaff v0.5.0)

Copy Markdown View Source

Gettext backend for staff-module-specific UI strings.

Files in this module that wrap domain strings (staff, person, department, team, membership UI) declare use Gettext, backend: PhoenixKitStaff.Gettext and call gettext(...). Translations live in priv/gettext/ of this repo — mix gettext.extract

  • mix gettext.merge priv/gettext keep them in sync.

Generic/common strings shared across the workspace (month names, date templates) stay on core's PhoenixKitWeb.Gettext backend — see PhoenixKitStaff.L10n, which keeps using it so those are translated once at the workspace level.

The Phoenix-request pipeline sets the locale globally via Gettext.put_locale/1, which every backend reads from the process dictionary — so a single locale switch in the parent app drives both this backend and PhoenixKitWeb.Gettext.

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.