mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-18 06:21:29 +03:00
Fixed issue where language file generation occured after supported_locales.json was created
This commit is contained in:
@@ -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});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user