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.
|
||||
|
||||
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;
|
||||
|
@ -234,6 +237,11 @@ for (let language of languages) {
|
|||
translations.GLOBAL[translationItem.str] = translation;
|
||||
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