fluent
Safe HaskellNone
LanguageHaskell2010

Language.Fluent.Bundle

Synopsis

Documentation

data Bundle locale Source #

A collection of Fluent resources and the configuration needed to resolve and format messages for a locale.

Constructors

Bundle 

Fields

Instances

Instances details
Locale locale => Show (Bundle locale) Source # 
Instance details

Defined in Language.Fluent.Bundle

Methods

showsPrec :: Int -> Bundle locale -> ShowS #

show :: Bundle locale -> String #

showList :: [Bundle locale] -> ShowS #

Locale locale => Eq (Bundle locale) Source #

Only the names of the functions are compared, since their implementations cannot be compared for equality.

Instance details

Defined in Language.Fluent.Bundle

Methods

(==) :: Bundle locale -> Bundle locale -> Bool #

(/=) :: Bundle locale -> Bundle locale -> Bool #

Locale locale => Translate (Bundle locale -> Either String Text) Source # 
Instance details

Defined in Language.Fluent.Translate

data Override Source #

A change to a Bundle.

Constructors

UseIsolating Bool

Whether to use isolation marks around placeables.

WithFunction Identifier ([Pattern] -> HashMap Identifier Value -> Either String Pattern)

Add a function, shadowing the builtin of the same name.

Instances

Instances details
Translate r => Translate (Override -> r) Source # 
Instance details

Defined in Language.Fluent.Translate

Methods

translate :: Reference -> Override -> r Source #

override :: Override -> Bundle locale -> Bundle locale Source #

Apply an Override to a Bundle.

localeCodes :: Locale locale => Bundle locale -> NonEmpty Text Source #

The codes of the locales of a bundle.

bundle :: NonEmpty locale -> [Resource] -> Bundle locale Source #

A bundle of Resources for the given Locales, with the default configuration.

message :: Identifier -> Bundle locale -> Maybe Message Source #

The first message of a Bundle with the identifier.

term :: Identifier -> Bundle locale -> Maybe Term Source #

The first term of a Bundle with the identifier.

pattern :: Locale locale => Bundle locale -> HashMap Identifier Value -> Pattern -> Either String Pattern Source #

Resolve all the selections and interpolations of an AST Pattern to a simple Pattern.