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

docs(messageformat): cleanup docs and remove duplication #129

Merged
merged 1 commit into from Oct 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions projects/ngneat/transloco-messageformat/README.md
Expand Up @@ -16,7 +16,7 @@ npm i messageformat @ngneat/transloco-messageformat

The `MessageFormatTranspiler` is compatible with the `DefaultTranspiler` and therefore you can switch without worry that it will break your current translations.

It then enables support for the following within your i18n translation files:
It enables support for the following within your i18n translation files:

```js
{
Expand All @@ -25,7 +25,7 @@ It then enables support for the following within your i18n translation files:
}
```

Add the following to the imports array in your `app.module.ts`:
To enable this plugin, add the following to the imports array in your `app.module.ts`:

```ts
import { TranslocoMessageFormatModule } from '@ngneat/transloco-messageformat';
Expand All @@ -41,15 +41,6 @@ import { TranslocoMessageFormatModule } from '@ngneat/transloco-messageformat';

```

It then enables support for the following within your i18n translation files:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why remove the usage example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was duplicated.
The usage example is still in the readme.

If you check out the readme as it is now, you will see the usage example has been duplicated. I removed the second instance of it.


```js
{
"mySelectRule": "{myVar, select, val1 {Value 1} val2 {Value 2} other {Other Value}}",
"myPluralRule": "{myCount, plural, =0 {no results} one {1 result} other {# results}}"
}
```

### Locale initialization

By default, messageformat initializes _all_ locales. You could also provide the locales you will need:
Expand Down