Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 2.0.0
* **[ BREAKING ]** `bs-platform >=7.2.2`.
* **[ BREAKING ]** `react-intl >=4.0.0`:
- Added `Intl.timeZone`
- Added `FormattedList`, `Intl.formatList` & `Intl.formatListWithOptions`
- Added `FormattedDisplayName`, `Intl.formatDisplayName` & `Intl.formatDisplayNameWithOptions`
- Added `FormattedDateParts`, `Intl.formatDateToParts` & `Intl.formatDateToPartsWithOptions`
- Added `FormattedTimeParts`, `Intl.formatTimeToParts` & `Intl.formatTimeToPartsWithOptions`
- Added `FormattedNumberParts`, `Intl.formatNumberToParts` & `Intl.formatNumberToPartsWithOptions`
- Removed `FormattedHTMLMessage`, `Intl.formatHTMLMessage` & `Intl.formatHtmlMessageWithValues`
- Removed `Intl.now`
- `FormattedRelative` has been renamed to `FormattedRelativeTime` and its API has been changed as well
- `Intl.formatRelative` has been renamed to `Intl.formatRelativeTime` and its API has been changed as well
* **[ BREAKING ]** Removed `ReactIntlCompat`.

# 1.1.0
* Added `createIntlCache`, `intlConfig`, `createIntl`, `RawIntlProvider`.

Expand Down
12 changes: 12 additions & 0 deletions examples/Page.re
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,17 @@ let make = (~locale, ~setLocale) => {
<FormattedDate value={Js.Date.make()} />
" (FormattedDate)"->React.string
</div>
<div>
<FormattedMessage
id="page.html"
defaultMessage="HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>"
values={
"bold": text => <strong> text </strong>,
"italic": text => <em> text </em>,
"combined": (italicBold, text) =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can model (...chunks) => <div> {chunks} </div> in BuckleScript.

<strong> italicBold text </strong>,
}
/>
</div>
</div>;
};
5 changes: 5 additions & 0 deletions examples/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"defaultMessage": "Hello",
"message": ""
},
{
"id": "page.html",
"defaultMessage": "HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>",
"message": ""
},
{
"id": "page.today",
"defaultMessage": "Today is",
Expand Down
5 changes: 5 additions & 0 deletions examples/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"defaultMessage": "Hello",
"message": "Привет"
},
{
"id": "page.html",
"defaultMessage": "HTML example: <bold>bold text</bold>, <combined><italic>italic bold</italic> text</combined>",
"message": "Пример HTML: <bold>полужирный текст</bold>, <combined><italic>полужирный курсивный</italic> текст</combined>"
},
{
"id": "page.today",
"defaultMessage": "Today is",
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bs-react-intl",
"version": "1.1.0",
"version": "2.0.0-beta.1",
"description": "BuckleScript bindings to react-intl",
"author": "Alex Fedoseev <alex.fedoseev@gmail.com>",
"license": "MIT",
Expand All @@ -17,19 +17,19 @@
"preversion": "yarn run clean"
},
"peerDependencies": {
"bs-platform": ">=5.0.3",
"react-intl": ">=3.0.0",
"bs-platform": ">=7.2.2",
"react-intl": ">=4.0.0",
"reason-react": ">=0.7.0"
},
"devDependencies": {
"bs-platform": "5.2.1",
"bs-react-intl-extractor-bin": "0.7.0",
"bs-platform": "7.3.2",
"bs-react-intl-extractor-bin": "0.8.0",
"bsb-js": "^1.1.7",
"parcel-bundler": "1.12.4",
"react": "16.8.6",
"react-dom": "16.8.6",
"react-intl": "3.4.0",
"reason-react": "0.7.0"
"react": "16.13.1",
"react-dom": "16.13.1",
"react-intl": "4.5.3",
"reason-react": "0.8.0"
},
"repository": {
"type": "git",
Expand Down
Loading