mirror of https://github.com/espruino/BangleApps
Let language_scan optionally add stubbed translations
This lets it refresh existing languages with the latest strings, without using the auto-translate feature. The strings will all simply be the English equivalent.pull/1673/head
parent
dc273a7a12
commit
adb053ef1c
|
@ -3,6 +3,9 @@
|
||||||
outputs a list of strings that have been found.
|
outputs a list of strings that have been found.
|
||||||
|
|
||||||
See https://github.com/espruino/BangleApps/issues/1311
|
See https://github.com/espruino/BangleApps/issues/1311
|
||||||
|
|
||||||
|
If you want to auto-add new string (with *only english text*), set the
|
||||||
|
environment variable AUTOREFRESH.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let translate = false;
|
let translate = false;
|
||||||
|
@ -234,6 +237,11 @@ for (let language of languages) {
|
||||||
translations.GLOBAL[translationItem.str] = translation;
|
translations.GLOBAL[translationItem.str] = translation;
|
||||||
resolve()
|
resolve()
|
||||||
}))
|
}))
|
||||||
|
} else if(process.env.AUTOREFRESH && !translate) {
|
||||||
|
translationPromises.push(new Promise(async (resolve) => {
|
||||||
|
translations.GLOBAL[translationItem.str] = translationItem.str;
|
||||||
|
resolve()
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue