Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document: .i18nrc is conf file, not .babelrc #10

Merged
merged 2 commits into from
Mar 3, 2017
Merged
Changes from 1 commit
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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ npm install --save signavio-i18n

## Setup

Add the configuration for gettext message extraction to your `.babelrc`:
Add a section like the following to your `packages.json`:

```json
{
"scripts": {
"i18n-init": "cd src/locales && msginit --no-translator --input messages.pot --locale",
"i18n": "i18n-extract \"src/**/*.js\" src/locales/messages.pot && i18n-merge src/locales/messages.pot src/locales/*.po"
}
}
```

Create the file `.i18nrc` and add a configuration object for gettext message extraction:

```json
Copy link
Contributor

Choose a reason for hiding this comment

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

It should without the "extra" and "gettext" wrapping

{
Expand All @@ -35,17 +46,6 @@ Add the configuration for gettext message extraction to your `.babelrc`:
All available options are documented here: https://github.com/getsentry/babel-gettext-extractor


Add a section like the following to the `packages.json`:

```json
{
"scripts": {
"i18n-init": "cd src/locales && msginit --no-translator --input messages.pot --locale",
"i18n": "i18n-extract \"src/**/*.js\" src/locales/messages.pot && i18n-merge src/locales/messages.pot src/locales/*.po"
}
}
```

## Usage

Add the translations to the PO files, and initialize the i18n module in your application using the `init` function:
Expand Down