FluentResource
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?): FluentResourceFields
| Name | Type | Description |
|---|---|---|
body | fluent.Message[] | The messages and terms in the source order. |
errors | string[] | The syntax errors of skipped entries, e.g. line 4: Expected default variant in 'emails'. |
Methods
#FluentResource:parse
function FluentResource:parse(text: string): FluentResource
Parses more FTL source into the resource.
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The FTL source. |
Returns
| Type | Name | Description |
|---|---|---|
FluentResource | resource | The resource itself. |