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
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.4.0 - 2018-05-25

* Directly use Reason parser api instead of forking the refmt exe for each file.
Message extraction is now lightning fast! 😀
* Command line args
* allow multiple source directories to be specified
* support -v and -help options
* Support message extraction when `open ReactIntl;` was used.
* Added tests + Travis CI.

## 0.3.0 - 2018-05-16

* Support `[@intl.messages]` for marking messages for extraction.
Expand All @@ -11,4 +21,4 @@

## 0.1.0 - 2018-05-13

Initial Release.
* Initial Release.
36 changes: 14 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,21 @@
[![Build Status](https://travis-ci.org/cknitt/bs-react-intl-extractor.svg?branch=master)](https://travis-ci.org/cknitt/bs-react-intl-extractor)

Extracts messages for localization from [Reason] source files.
This assumes that you are using the [bs-react-intl] bindings for [react-intl].

This assumes that you are using the [bs-react-intl] bindings for [react-intl]
and your source files define formatted messages in one of the following three ways:
## Installation

macOS and Linux binaries are available for download on the [releases page].

## Usage

```sh
bs-react-intl-extractor [path...]
```

where `path` is a Reason source file or a directory containing Reason source files. Multiple files/directories may be specified.

Formatted messages may be defined in your source files in one of the following three ways:

1. inline in `FormattedMessage`:

Expand Down Expand Up @@ -91,26 +103,6 @@ The output (a JSON array of all extracted messages sorted by id) is written to s
]
```

## Download

macOS and Linux binaries are available for download on the [releases page].

After you have downloaded a binary, make it executable using `chmod +x`.

## Usage

```sh
bs-react-intl-extractor directory ...
```

where `directory` is a directory containing Reason source files. Multiple directories may be specified.

The reason formatter (`refmt`) needs to be on the path.

## Known Issues

Performance is not optimal right now as the `refmt` executable is forked for the processing of each file.

## How to build

Install [esy] as follows:
Expand Down