Update of extract.js to process translations in other languages.

This commit is contained in:
Tomas Bures 2019-05-13 01:07:01 +02:00
parent 79164c5fe5
commit 8eae6d6c41
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}

View file

@ -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"
}