Skip to content

Commit

Permalink
Console log when keys are removed (issue #148) (#151)
Browse files Browse the repository at this point in the history
* Log removed unused translation keys

* correct indentation
  • Loading branch information
marcinolek authored and cheton committed Jun 4, 2019
1 parent eac86df commit 0679261
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/parser.js
Expand Up @@ -721,6 +721,7 @@ class Parser {

for (let i = 0; i < unusedKeys.length; ++i) {
_.unset(resMerged[lng][ns], unusedKeys[i]);
this.log(`Removed an unused translation key { ${chalk.red(JSON.stringify(unusedKeys[i]))} from ${chalk.red(JSON.stringify(this.formatResourceLoadPath(lng, ns)))}`);
}

// Omit empty object
Expand Down

0 comments on commit 0679261

Please sign in to comment.