README.md in i18n-js-4.0.0.alpha4 vs README.md in i18n-js-4.0.0.alpha5
- old
+ new
@@ -22,11 +22,11 @@
<a href="https://rubygems.org/gems/i18n-js"><img src="https://img.shields.io/gem/v/i18n-js.svg" alt="Gem"></a>
<a href="https://rubygems.org/gems/i18n-js"><img src="https://img.shields.io/gem/dt/i18n-js.svg" alt="Gem"></a>
<a href="https://tldrlegal.com/license/mit-license"><img src="https://img.shields.io/:License-MIT-blue.svg" alt="MIT License"></a>
</p>
-![This branch contains the code for v4, our next major release.](https://messages-svg.herokuapp.com/warning.svg?message=This%20branch%20contains%20the%20code%20for%20v4%2C%20our%20next%20major%20release.)
+> **Warning**: This branch contains the code for v4, our next major release.
## Installation
```bash
gem install i18n-js
@@ -108,9 +108,35 @@
![`i18n check` command in action](https://github.com/fnando/i18n-js/raw/main/images/i18njs-check.gif)
This command will exist with status 1 whenever there are missing translations.
This way you can use it as a CI linting.
+
+You can ignore keys by adding a list to the config file:
+
+```yml
+---
+translations:
+ - file: app/frontend/locales/en.json
+ patterns:
+ - "*"
+ - "!*.activerecord"
+ - "!*.errors"
+ - "!*.number.nth"
+
+ - file: app/frontend/locales/:locale.:digest.json
+ patterns:
+ - "*"
+
+check:
+ ignore:
+ - en.mailer.login.subject
+ - en.mailer.login.body
+```
+
+> **Note**: In order to avoid mistakenly ignoring keys, this configuration
+> option only accepts the full translation scope, rather than accepting a
+> pattern like `pt.ignored.scope.*`.
## Automatically export translations
### Using watchman