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