mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-12-01 16:46:07 +01:00
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:
Vendored
+15
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user