Show current locale in error message in localize-ftl. Fix #4302
This commit is contained in:
parent
4866c467dc
commit
76caebdd8a
1 changed files with 11 additions and 5 deletions
|
@ -75,11 +75,17 @@ async function getFTL() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ftl = JSONToFtl(Object.fromEntries(translated), baseFTL);
|
try {
|
||||||
const outFtlPath = join(getLocaleDir(locale), sourceFileBaseName + '.ftl');
|
const ftl = JSONToFtl(Object.fromEntries(translated), baseFTL);
|
||||||
await fs.outputFile(outFtlPath, ftl);
|
const outFtlPath = join(getLocaleDir(locale), sourceFileBaseName + '.ftl');
|
||||||
onProgress(`${locale}/${sourceFileBaseName}.ftl`, null, 'localize');
|
await fs.outputFile(outFtlPath, ftl);
|
||||||
count++;
|
onProgress(`${locale}/${sourceFileBaseName}.ftl`, null, 'localize');
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
e.message = `Failed to localize "${locale}": ${e.message}`;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue