Skip to content

Commit d7df6b0

Browse files
authored
Merge pull request #30 from reasonml-community/bump-react-intl
Bump react-intl
2 parents b2223f1 + 50d865d commit d7df6b0

File tree

8 files changed

+381
-892
lines changed

8 files changed

+381
-892
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 2.0.0
2+
* **[ BREAKING ]** `bs-platform >=7.2.2`.
3+
* **[ BREAKING ]** `react-intl >=4.0.0`:
4+
- Added `Intl.timeZone`
5+
- Added `FormattedList`, `Intl.formatList` & `Intl.formatListWithOptions`
6+
- Added `FormattedDisplayName`, `Intl.formatDisplayName` & `Intl.formatDisplayNameWithOptions`
7+
- Added `FormattedDateParts`, `Intl.formatDateToParts` & `Intl.formatDateToPartsWithOptions`
8+
- Added `FormattedTimeParts`, `Intl.formatTimeToParts` & `Intl.formatTimeToPartsWithOptions`
9+
- Added `FormattedNumberParts`, `Intl.formatNumberToParts` & `Intl.formatNumberToPartsWithOptions`
10+
- Removed `FormattedHTMLMessage`, `Intl.formatHTMLMessage` & `Intl.formatHtmlMessageWithValues`
11+
- Removed `Intl.now`
12+
- `FormattedRelative` has been renamed to `FormattedRelativeTime` and its API has been changed as well
13+
- `Intl.formatRelative` has been renamed to `Intl.formatRelativeTime` and its API has been changed as well
14+
* **[ BREAKING ]** Removed `ReactIntlCompat`.
15+
116
# 1.1.0
217
* Added `createIntlCache`, `intlConfig`, `createIntl`, `RawIntlProvider`.
318

examples/Page.re

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,17 @@ let make = (~locale, ~setLocale) => {
3333
<FormattedDate value={Js.Date.make()} />
3434
" (FormattedDate)"->React.string
3535
</div>
36+
<div>
37+
<FormattedMessage
38+
id="page.html"
39+
defaultMessage="HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>"
40+
values={
41+
"bold": text => <strong> text </strong>,
42+
"italic": text => <em> text </em>,
43+
"combined": (italicBold, text) =>
44+
<strong> italicBold text </strong>,
45+
}
46+
/>
47+
</div>
3648
</div>;
3749
};

examples/translations/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"defaultMessage": "Hello",
55
"message": ""
66
},
7+
{
8+
"id": "page.html",
9+
"defaultMessage": "HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>",
10+
"message": ""
11+
},
712
{
813
"id": "page.today",
914
"defaultMessage": "Today is",

examples/translations/ru.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"defaultMessage": "Hello",
55
"message": "Привет"
66
},
7+
{
8+
"id": "page.html",
9+
"defaultMessage": "HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>",
10+
"message": "Пример HTML: <bold>полужирный текст</bold>, <combined><italic>полужирный курсивный</italic> текст</combined>"
11+
},
712
{
813
"id": "page.today",
914
"defaultMessage": "Today is",

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bs-react-intl",
3-
"version": "1.1.0",
3+
"version": "2.0.0-beta.1",
44
"description": "BuckleScript bindings to react-intl",
55
"author": "Alex Fedoseev <alex.fedoseev@gmail.com>",
66
"license": "MIT",
@@ -17,19 +17,19 @@
1717
"preversion": "yarn run clean"
1818
},
1919
"peerDependencies": {
20-
"bs-platform": ">=5.0.3",
21-
"react-intl": ">=3.0.0",
20+
"bs-platform": ">=7.2.2",
21+
"react-intl": ">=4.0.0",
2222
"reason-react": ">=0.7.0"
2323
},
2424
"devDependencies": {
25-
"bs-platform": "5.2.1",
26-
"bs-react-intl-extractor-bin": "0.7.0",
25+
"bs-platform": "7.3.2",
26+
"bs-react-intl-extractor-bin": "0.8.0",
2727
"bsb-js": "^1.1.7",
2828
"parcel-bundler": "1.12.4",
29-
"react": "16.8.6",
30-
"react-dom": "16.8.6",
31-
"react-intl": "3.4.0",
32-
"reason-react": "0.7.0"
29+
"react": "16.13.1",
30+
"react-dom": "16.13.1",
31+
"react-intl": "4.5.3",
32+
"reason-react": "0.8.0"
3333
},
3434
"repository": {
3535
"type": "git",

0 commit comments

Comments
 (0)