Call as
Functions.presentation.phrase(template, values)
Record it as a dependency named Functions.presentation.phrase (accepting the completion does this), then call it by that name.
What it does
Create a transient named condition summary. Use {name} for scalar values and {{positive|negative}} for predicate alternatives; prefix a primary alternative with !. Escape literal double braces as {{{{ and }}}}. Values are inserted literally without parsing their percent signs, links, colors or braces. Typed predicate values participate in primary selection. Templates, values and rendered text are bounded; malformed input renders a localized unavailable summary. This changes presentation only and runs no condition observations.
Arguments
| Name | Type | What it does |
|---|---|---|
template | string | Localized complete sentence with named slots and optional explicit predicate alternatives. |
values | table | Identifier-keyed scalar values or typed predicates. Strings, finite numbers and booleans are supported; referenced slots must be present. Values are captured when the phrase is created. |
Returns
| 1 | RMConditionPhrase | Transient trusted phrase recognized by condition summary rendering; do not persist it as condition data. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
- Buff Present (print)
return AuraLiteral.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!have|do not have}} {aura}"], L["{unit} {{!has|does not have}} {aura}"]), { - Buff Time Remaining (print)
return AuraSummary.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!have|do not have}} {aura} where {remaining} {comparison} {duration}"], L["{unit} {{!has|does not have}} {aura} where {remaining} {comparison} {duration}"]), { - Buff Stacks (print)
return AuraSummary.phrase(L["the number of stacks of {aura} on {unit} {comparison} {quantity}"], { - Have Item In Bags (print)
return Summary.phrase(L["the number of {item} you are carrying {comparison} {quantity}"], { - Specific Spell Casting (print)
return LiteralSummary.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!are|are not}} currently casting {spell}"], L["{unit} {{!is|is not}} currently casting {spell}"]), { - Specific Spell Channeling (print)
return LiteralSummary.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!are|are not}} currently channeling {spell}"], L["{unit} {{!is|is not}} currently channeling {spell}"]), { - Debuff Present (print)
return AuraLiteral.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!have|do not have}} {aura}"], L["{unit} {{!has|does not have}} {aura}"]), { - Debuff Time Remaining (print)
return AuraSummary.phrase(Functions.presentation.playerize(value.unit, L["{unit} {{!have|do not have}} {aura} where {remaining} {comparison} {duration}"], L["{unit} {{!has|does not have}} {aura} where {remaining} {comparison} {duration}"]), {
and 18 more: Debuff Stacks (print), Extended Character Stat (print), Extended Character Stat Percentage (print), Have Item Equipped (print), Item Available (print), Item Cooldown (print), Item In Range (print), Have Named Pet (print), Health Within Range (print), Health Percentage Within Range (print), Health Percentage Count Within Range (print), Health Count Within Range (print), Mana Within Range (print), Mana Percentage Within Range (print), Mana Percentage Count Within Range (print), Mana Count Within Range (print), Item Set Pieces Equipped (print), Zone (print)
Source
Functions/presentation.lua, line 86. Read only in game; Duplicate makes an editable copy.
Functions.presentation.phrase(template, values)
return addon:CreateConditionSummaryPhrase(template, values)