Releases: projectfluent/fluent.js
fluent 0.8.0
-
Rename
MessageContext
toFluentBundle
. (#222)The following renames have been made to the public API:
- Rename
MessageContext
toFluentBundle
. - Rename
MessageArgument
toFluentType
. - Rename
MessageNumberArgument
toFluentNumber
. - Rename
MessageDateTimeArgument
toFluentDateTime
.
- Rename
-
Move
mapContext*
functions tofluent-sequence
. (#273)The
mapContextSync
andmapContextAsync
functions previously exported
by thefluent
package have been moved to the newfluent-sequence
package.fluent-sequence
0.1.0 corresponds to the exact
implementation of these functions fromfluent
0.7.0.In later versions of
fluent-sequence
, these functions are called
mapBundleSync
andmapBundleAsync
, which is consistent with the naming
used influent
0.8.0.
fluent-sequence 0.2.0
fluent-sequence 0.1.0 (August 17, 2018)
The initial release based on fluent 0.7.0.
fluent-dom 0.4.0 (August 8, 2018)
-
Drop support for IE and old evergreen browsers. (#133)
Currently supported are: Firefox 52+, Chrome 55+, Edge 15+, Safari 10.1+,
iOS Safari 10.3+ and node 8.9+. -
Add the
cached-iterable
runtime dependency.CachedAsyncIterable
is now available from its own package rather than
from thefluent
package. -
Modify the constructor to not require
window
element to be passed.
fluent-syntax 0.8.1 (August 1, 2018)
fluent 0.7.0 (July 24, 2018)
-
Implement support for Fluent Syntax 0.6.
Syntax 0.6 keeps the syntax unchanged and makes many small changes to the
previousl underspecified areas of the spec. The runtime parser now
supports Unicode escapes and properly trims whitespace in TextElements. -
Add
FluentResource
. (#244)FluentResource
is a class representing a parsed Fluent document. It was
added with caching in mind. It's now possible to parse a Fluent document
inton an instance ofFluentResouce
once and use it to construct new
MessageContexts
. For this end,MessageContext
now has the
addResource
method which takes an instance ofFluentResource
. -
Add the
transform
option toMessageContext
. (#213)MessageContext
now accepts a new option,transform
, which may be a
function. If passed it will be used to transform the string parts of
patterns. This may be used to implement programmatic transformations of
translations, e.g. to create pseudo-localizations. -
Drop support for IE and old evergreen browsers. (#133)
Currently supported are: Firefox 52+, Chrome 55+, Edge 15+, Safari 10.1+,
iOS Safari 10.3+ and node 8.9+. -
Move
CachedSyncIterable
andCachedAsyncIterable
to a dependency.They are now available from the
cached-iterable
package.fluent
depends on it for running tests.
fluent-syntax 0.8.0 (July 24, 2018)
-
Implement support for Fluent Syntax 0.6. (#253)
Syntax 0.6 keeps the syntax unchanged but makes many changes to the AST.
Consult https://github.com/projectfluent/fluent/releases/tag/v0.6.0
for the list of changes. -
Drop support for IE and old evergreen browsers. (#133)
Currently supported are: Firefox 52+, Chrome 55+, Edge 15+, Safari 10.1+,
iOS Safari 10.3+ and node 8.9+.
fluent-react 0.7.0 (May 18, 2018)
-
Protect void elements against translated text content. (#174)
Text content found in the translated markup is now ignored when the
element passed as a prop to<Localized>
is a known void element. This
prevents the element is a void element tag and must neither have
children nor use dangerouslySetInnerHTML error in React.For instance,
<input>
is a known void element and it must not have the
text content set by the buggy translation in the following example:<Localized id="hello" text-input={<input type="text" />}> <div /> </Localized>
hello = Hello, <text-input>invalid text content</text-input>.
Due to this change some build setups might now require the
@babel/plugin-proposal-object-rest-spread
or the
@babel/plugin-syntax-object-rest-spread
plugin. -
Support HTML entities in translations. (#183)
Translations with HTML entities will now trigger the markup sanitization
logic and will be consequently parsed into the characters they represent. -
Re-render
withLocalization
-components on l10n changes. (#196)Components enhanced by the
withLocalization
are now re-rendered when
the enclosing<LocalizationProvider>
receives a new value of the
messages
prop. -
Use compat dependencies only in fluent-react/compat. (#193)
When
fluent-react
is imported asfluent-react
it will now use the
untranspiled version of itsfluent
dependency for consistency. When
it's imported asfluent-react/compat
it will usefluent/compat
too.Due to this change some build setups might now require the
@babel/plugin-proposal-async-generator-functions
or the
@babel/plugin-syntax-async-generators
plugin. -
Upgrade to Babel 7. (#126)
fluent-react/compat
is now built with Babel 7.
fluent-dom 0.3.0 (May 14, 2018)
fluent-syntax 0.7.0 (April 17, 2018)
-
Add the
ref
field toVariantExpression
.The
Identifier
-typedid
field ofVariantExpression
has been removed
and replaced by anExpression
-typedref
field. The newref
field
can now holdMessageReference
nodes. The range of valid expressions for
ref
may be extended in the future.