Skip to content

Commit 8fa467e

Browse files
committed
Update CHANGELOG and README
1 parent 429c099 commit 8fa467e

File tree

2 files changed

+11
-49
lines changed

2 files changed

+11
-49
lines changed

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.13.0 - 2022-09-18
4+
5+
- Updated ReScript parser version to 241fefd (ReScript 10.0.1).
6+
- Removed Reason support.
7+
- Unescape extracted strings to fix issue with duplicate newlines.
8+
- Build with OCaml 4.14.0.
9+
- Perform Linux build on ubuntu-20.04 as ubuntu-18.04 is deprecated.
10+
311
## 0.12.0 - 2021-05-29
412

513
- [bs-react-intl-ppx](https://github.com/ahrefs/bs-react-intl-ppx) support added.

Diff for: README.md

+3-49
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# rescript-react-intl-extractor
22

3-
Extracts messages for localization from [ReScript] source files. Also supports the legacy [Reason] syntax.
3+
Extracts messages for localization from [ReScript] source files.
44

55
This assumes that you are using the [rescript-react-intl] bindings for [react-intl].
66

@@ -23,7 +23,7 @@ Alternatively, the binaries are also available for download on the [releases pag
2323
rescript-react-intl-extractor [--allow-duplicates] [path...]
2424
```
2525

26-
where `path` is a ReScript (`*.res`) or Reason (`*.re`) source file or a directory containing such source files. Multiple files/directories may be specified.
26+
where `path` is a ReScript (`*.res`) source file or a directory containing such source files. Multiple files/directories may be specified.
2727

2828
The `--allow-duplicates` option allows messages with identical `id` props if the `defaultMessage` props are identical as well.
2929

@@ -85,58 +85,13 @@ You also can pass descriptions to the records with:
8585
let foo = @intl.description("Hello description") {id: "message.hello", defaultMessage: "Hello"}
8686
```
8787

88-
## Message Definition (Legacy Reason Syntax)
89-
90-
Formatted messages may be defined in your source files in one of the following ways:
91-
92-
1. inline in `FormattedMessage`:
93-
94-
```reason
95-
<ReactIntl.FormattedMessage id="some.message.id" defaultMessage="Some message" />
96-
```
97-
98-
or
99-
100-
```reason
101-
open ReactIntl;
102-
...
103-
<FormattedMessage id="some.message.id" defaultMessage="Some message" />
104-
```
105-
106-
2. within a module with the `[@intl.messages]` attribute:
107-
108-
```reason
109-
open ReactIntl;
110-
111-
module Msg = {
112-
[@intl.messages];
113-
114-
let hello = {id: "message.hello", defaultMessage: "Hello"};
115-
let world = {id: "message.world", defaultMessage: "World"};
116-
};
117-
```
118-
119-
You also can pass descriptions to the records with:
120-
121-
```reason
122-
let foo = [@intl.description "Hello description"] {id: "message.hello", defaultMessage: "Hello"};
123-
```
124-
125-
3. within [intl-ppx](https://github.com/ahrefs/bs-react-intl-ppx)
126-
[ReScript team recommends not to use PPXes](https://forum.rescript-lang.org/t/some-thoughts-on-community-building/1474/25)
127-
128-
```reason
129-
let hello = [%intl "hello"]
130-
let world = [%intl {msg: "world", desc: "Some description"}]
131-
```
132-
13388
## Building and Testing
13489

13590
The ReScript parser is included as a git submodule. Therefore, after checking out the sources, first run
13691

13792
git submodule update --init --recursive
13893

139-
Install Ocaml and OPAM, and create an OPAM switch with OCaml version 4.06.1.
94+
Install OCaml and OPAM, and create an OPAM switch with OCaml version 4.14.0.
14095

14196
Then run
14297

@@ -152,7 +107,6 @@ To run the tests, do
152107
opam exec -- dune runtest
153108

154109
[rescript]: https://rescript-lang.org/
155-
[reason]: https://reasonml.github.io
156110
[rescript-react-intl]: https://github.com/cca-io/rescript-react-intl
157111
[bs-react-intl-ppx]: https://github.com/ahrefs/bs-react-intl-ppx
158112
[react-intl]: https://github.com/yahoo/react-intl

0 commit comments

Comments
 (0)