ember-intl-analyzer
Find unused translations in your Ember.js projects
Usage
npx ember-intl-analyzer
Configuration
ember-intl-analyzer can be configured by creating a config/ember-intl-analyzer.js
file in your app:
export default {
whitelist: [
/^countries\./,
/^currency\./,
/^validations\.errors\./,
/^[^.]+\.warnings\.[^.]+$/,
],
};
whitelist
If you use dynamic translations keys like this:
this.intl.t(`countries.${code}`)
then ember-intl-analyzer can not easily understand what translation keys are being used here. In that case it will ignore the dynamic translation key and show the corresponding translations as unused.
To prevent that from happening you can configure a whitelist
, which accepts an
array of regular expressions that will be checked when looking for unused
translations.
Caveats
There are a number of things that we do not support yet. Have a look at the Issues before using this project.
Related
- ember-intl – Internationalization addon for Ember.js
License
This projects is developed by and © simplabs GmbH and contributors. It is released under the MIT License.