mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Say which translation file failed (#5196)
So we can see which i18n file is invalid when it fails
This commit is contained in:
parent
20d2a6685f
commit
e39730d52e
@ -160,10 +160,15 @@ function genLangFile(lang, dest) {
|
||||
let translations = {};
|
||||
[reactSdkFile, riotWebFile].forEach(function(f) {
|
||||
if (fs.existsSync(f)) {
|
||||
Object.assign(
|
||||
translations,
|
||||
JSON.parse(fs.readFileSync(f).toString())
|
||||
);
|
||||
try {
|
||||
Object.assign(
|
||||
translations,
|
||||
JSON.parse(fs.readFileSync(f).toString())
|
||||
);
|
||||
} catch (e) {
|
||||
console.error("Failed: "+f, e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user