Have gulp importl10n
list locales which may be candidates for removal
Rather than having the script remove locales automatically, which seems like a heavy-handed approach at least initially, listing these for manual checking seems nice though.
This commit is contained in:
parent
8d74a9ae7f
commit
dee3da69d4
15
external/importL10n/locales.js
vendored
15
external/importL10n/locales.js
vendored
@ -110,6 +110,21 @@ async function downloadL10n(root, callback) {
|
||||
}
|
||||
await downloadLanguageFiles(root, langCode);
|
||||
}
|
||||
|
||||
var removeCodes = [];
|
||||
for (var entry of fs.readdirSync(root)) {
|
||||
var dirPath = path.join(root, entry), stat = fs.lstatSync(dirPath);
|
||||
|
||||
if (stat.isDirectory() && entry !== 'en-US' &&
|
||||
(!langCodes.includes(entry) || EXCLUDE_LANG_CODES.includes(entry))) {
|
||||
removeCodes.push(entry);
|
||||
}
|
||||
}
|
||||
if (removeCodes.length) {
|
||||
console.log('\nConsider removing the following unmaintained locales:\n' +
|
||||
removeCodes.join(', ') + '\n');
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user