Skip to content

Commit 5786bf9

Browse files
committed
fluent-react 0.7.0
1 parent 3ffba61 commit 5786bf9

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

fluent-react/CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## fluent-react 0.7.0 (May 18, 2018)
4+
5+
- Protect void elements against translated text content. (#174)
6+
7+
Text content found in the translated markup is now ignored when the
8+
element passed as a prop to `<Localized>` is a known void element. This
9+
prevents the _element is a void element tag and must neither have
10+
children nor use dangerouslySetInnerHTML_ error in React.
11+
12+
For instance, `<input>` is a known void element and it must not have the
13+
text content set by the buggy translation in the following example:
14+
15+
```jsx
16+
<Localized id="hello" text-input={<input type="text" />}>
17+
<div />
18+
</Localized>
19+
```
20+
21+
```properties
22+
hello = Hello, <text-input>invalid text content</text-input>.
23+
```
24+
25+
Due to this change some build setups might now require the
26+
`@babel/plugin-proposal-object-rest-spread` or the
27+
`@babel/plugin-syntax-object-rest-spread` plugin.
28+
29+
- Support HTML entities in translations. (#183)
30+
31+
Translations with HTML entities will now trigger the markup sanitization
32+
logic and will be consequently parsed into the characters they represent.
33+
34+
- Re-render `withLocalization`-components on l10n changes. (#196)
35+
36+
Components enhanced by the `withLocalization` are now re-rendered when
37+
the enclosing `<LocalizationProvider>` receives a new value of the
38+
`messages` prop.
39+
40+
- Use compat dependencies only in fluent-react/compat. (#193)
41+
42+
When `fluent-react` is imported as `fluent-react` it will now use the
43+
untranspiled version of its `fluent` dependency for consistency. When
44+
it's imported as `fluent-react/compat` it will use `fluent/compat` too.
45+
46+
Due to this change some build setups might now require the
47+
`@babel/plugin-proposal-async-generator-functions` or the
48+
`@babel/plugin-syntax-async-generators` plugin.
49+
50+
- Upgrade to Babel 7. (#126)
51+
52+
`fluent-react/compat` is now built with Babel 7.
53+
354
## fluent-react 0.6.1 (February 19, 2018)
455
556
- Preserve children of wrapped components if translation value is null. (#154)

fluent-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "fluent-react",
33
"description": "Fluent bindings for React",
4-
"version": "0.6.1",
4+
"version": "0.7.0",
55
"homepage": "http://projectfluent.org",
66
"author": "Mozilla <l10n-drivers@mozilla.org>",
77
"license": "Apache-2.0",

0 commit comments

Comments
 (0)