diff --git a/locales/extract.js b/locales/extract.js index 147a7dc5..ed5c0a32 100644 --- a/locales/extract.js +++ b/locales/extract.js @@ -300,7 +300,11 @@ function processFile(file) { source = source.split(fragment).join(replacement); setInDict(resDict, key, value); - if (originalKey === undefined || findInDict(prevResDict, originalKey) !== value) { + if ( + // If a key is formed from a value (e.g. t('Refresh') ) and and the same time already present in common.json, originalKey is undefined. Therefore the additional test here + (originalKey === undefined && findInDict(origResDict, key) !== value) || + (originalKey !== undefined && findInDict(prevResDict, originalKey) !== value) + ) { keysWithChangedValue.add(key); anyUpdates = true; } diff --git a/locales/package.json b/locales/package.json index 665aa4a2..42959f18 100644 --- a/locales/package.json +++ b/locales/package.json @@ -17,7 +17,6 @@ "deep-keys": "^0.5.0", "ellipsize": "^0.1.0", "fast-deep-equal": "^2.0.1", - "fs-extra": "^7.0.0", "klaw-sync": "^6.0.0", "slugify": "^1.3.3" }