|
| constexpr std::string_view | morph::forms::i18n::fieldSlotName (FieldSlot slot) noexcept |
| | The catalog-key suffix for slot.
|
| std::string | morph::forms::i18n::withSlot (std::string_view stem, FieldSlot slot) |
| | Appends .<slotName> to a message-key stem.
|
| std::string | morph::forms::i18n::fieldKeyStem (std::string_view actionTypeId, std::string_view wireField) |
| | The derived message-key stem for a field: <actionTypeId>.<wireField>.
|
| std::string | morph::forms::i18n::fieldKey (std::string_view actionTypeId, std::string_view wireField, FieldSlot slot) |
| | The fully-derived message key for one field text slot.
|
| std::optional< std::string > | morph::forms::i18n::explicitFieldKey (std::string_view i18nKeyOverride, FieldSlot slot) |
| | The explicit override key for one field text slot, when the field declares an x-i18nKey stem override.
|
| std::string | morph::forms::i18n::groupKey (std::string_view actionTypeId, std::size_t groupIndex) |
| | The derived message key for a layout group's title.
|
| std::string | morph::forms::i18n::ruleKey (std::string_view actionTypeId, std::size_t ruleIndex) |
| | The derived message key for a cross-field rule's violation message.
|
| std::string | morph::forms::i18n::wizardTitleKey (std::string_view wizardId) |
| | The derived message key for a wizard's own title.
|
| std::string | morph::forms::i18n::wizardStepTitleKey (std::string_view wizardId, std::size_t stepIndex) |
| | The derived message key for one wizard step's title.
|
| std::string | morph::forms::i18n::appTitleKey (std::string_view appId) |
| | The derived message key for an app shell's own title.
|
| std::string | morph::forms::i18n::appMenuLabelKey (std::string_view appId, std::size_t menuIndex) |
| | The derived message key for one app-menu entry's label.
|
Stable, schema-derived message-key vocabulary for renderer i18n.
A renderer that wants to translate a piece of GUI display text (a field's label/help/placeholder, a layout group's title, a cross-field rule's violation message, a wizard's or app-shell's title) needs a stable catalog key to look that text up under. This header is the single source of truth for how such a key is derived from identifiers the schema (or the actionType label a renderer already has, per docs/spec/forms/forms.md's renderer contract) already carries: morph::model::ActionTraits<A>::typeId(), a reflected wire field name, or a 0-based index into a schema array (x-layout.groups, x-rules, a wizard's steps, an app's menu).
No key derived here is written into the schema — a renderer computes it itself from data it already has, so the common (no-override) case adds zero bytes to any schema. See morph::render::resolveText (render/i18n.hpp) for how a derived key is looked up against a host-supplied catalog, with the schema's authored literal text as the fallback on a miss.
Definition in file i18n.hpp.
| std::optional< std::string > morph::forms::i18n::explicitFieldKey |
( |
std::string_view | i18nKeyOverride, |
|
|
FieldSlot | slot ) |
|
inlinenodiscard |
The explicit override key for one field text slot, when the field declares an x-i18nKey stem override.
A single FieldMeta::i18nKey override (see gui_field_metadata.md) replaces the derived <actionTypeId>.<wireField> stem for all three of a field's text slots; the .label / .help / .placeholder suffix is still appended per slot, exactly as it is for the derived key.
- Parameters
-
| i18nKeyOverride | The field's declared FieldMeta::i18nKey (empty = no override). |
| slot | Which of the field's texts this key names. |
- Returns
- std::nullopt when
i18nKeyOverride is empty; otherwise "<i18nKeyOverride>.<slot>".
Definition at line 105 of file i18n.hpp.