fluent-react 0.7.0 (May 18, 2018)
Pre-release-
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.