dreamworkAPI
Ctrl K
GitHub
classDocs / FluentResource

FluentResource

classsharedmenusource
Object → FluentResource

The parsed FTL ( Fluent Translation List ) source.

The parser is the runtime one from @fluent/bundle: comments are ignored and invalid entries are skipped, their errors are collected in errors.

Constructor

FluentResource(text: string?): FluentResource

Fields

NameTypeDescription
bodyfluent.Message[]The messages and terms in the source order.
errorsstring[]The syntax errors of skipped entries, e.g. line 4: Expected default variant in 'emails'.

Methods

#FluentResource:parse

sharedmenusource
function FluentResource:parse(text: string): FluentResource

Parses more FTL source into the resource.

Parameters
NameTypeDescription
textstringThe FTL source.
Returns
TypeNameDescription
FluentResourceresourceThe resource itself.
Generated from the dreamwork meta branch.