Say which translation file failed (#5196)
So we can see which i18n file is invalid when it failspull/5197/head
parent
20d2a6685f
commit
e39730d52e
|
@ -160,10 +160,15 @@ function genLangFile(lang, dest) {
|
||||||
let translations = {};
|
let translations = {};
|
||||||
[reactSdkFile, riotWebFile].forEach(function(f) {
|
[reactSdkFile, riotWebFile].forEach(function(f) {
|
||||||
if (fs.existsSync(f)) {
|
if (fs.existsSync(f)) {
|
||||||
|
try {
|
||||||
Object.assign(
|
Object.assign(
|
||||||
translations,
|
translations,
|
||||||
JSON.parse(fs.readFileSync(f).toString())
|
JSON.parse(fs.readFileSync(f).toString())
|
||||||
);
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.error("Failed: "+f, e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue