|
|
|
@ -26,6 +26,7 @@ async function recFindByExt(base,ext,files,result)
|
|
|
|
|
|
|
|
|
|
|
|
// outputs array of supported locales
|
|
|
|
// outputs array of supported locales
|
|
|
|
async function createLocalizationJSON() {
|
|
|
|
async function createLocalizationJSON() {
|
|
|
|
|
|
|
|
xliffToJSON.convert('src/assets/i18n');
|
|
|
|
const files = await recFindByExt(path.join('src', 'assets', 'i18n'), 'json');
|
|
|
|
const files = await recFindByExt(path.join('src', 'assets', 'i18n'), 'json');
|
|
|
|
const locales = [];
|
|
|
|
const locales = [];
|
|
|
|
|
|
|
|
|
|
|
|
@ -35,7 +36,6 @@ async function createLocalizationJSON() {
|
|
|
|
locales.push(file_parts[1]);
|
|
|
|
locales.push(file_parts[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
xliffToJSON.convert('src/assets/i18n');
|
|
|
|
|
|
|
|
fs.unlinkSync('src/assets/i18n/messages.en.json');
|
|
|
|
fs.unlinkSync('src/assets/i18n/messages.en.json');
|
|
|
|
fs.writeJSONSync('src/assets/i18n/supported_locales.json', {supported_locales: locales});
|
|
|
|
fs.writeJSONSync('src/assets/i18n/supported_locales.json', {supported_locales: locales});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|