wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.EmailSubsystem.Template

Contents

Synopsis

Documentation

data Localised a Source #

Localised templates.

Constructors

Localised 

Fields

type TemplateBranding = Text -> Text Source #

See genTemplateBranding.

forLocale Source #

Arguments

:: Maybe Locale

Just the preferred locale or Nothing for the default locale.

-> Localised a

The Localised structure.

-> (Locale, a)

Pair of the effectively chosen locale and the associated value.

Lookup a localised item from a Localised structure.

renderTextWithBranding :: Template -> (Text -> Text) -> TemplateBranding -> Text Source #

Uses a replace and a branding function, to replaces all placeholders from the given template to produce a Text. To be used on plain text templates

renderHtmlWithBranding :: Template -> (Text -> Text) -> TemplateBranding -> Text Source #

Uses a replace and a branding function to replace all placeholders from the given template to produce a Text. To be used on HTML templates

Re-exports

data Template Source #

A representation of a Text template, supporting efficient rendering.

Instances

Instances details
Show Template 
Instance details

Defined in Data.Text.Template

Eq Template 
Instance details

Defined in Data.Text.Template