Added Bengali and Thai languages.

This commit is contained in:
Mike Cao 2022-08-01 17:14:36 -07:00
parent e4e3e74ec2
commit ab1e49e703
14 changed files with 1717 additions and 52 deletions

View file

@ -2,17 +2,12 @@ const fs = require('fs-extra');
const path = require('path');
const del = require('del');
const prettier = require('prettier');
const chalk = require('chalk');
const src = path.resolve(__dirname, '../lang');
const dest = path.resolve(__dirname, '../build');
const files = fs.readdirSync(src);
const removed = del.sync([path.join(dest, '*.json')]);
if (removed.length) {
console.log(removed.map(n => `${n} ${chalk.redBright('✗')}`).join('\n'));
}
del.sync([path.join(dest, '*.json')]);
async function run() {
await fs.ensureDir(dest);
@ -29,8 +24,6 @@ async function run() {
const json = prettier.format(JSON.stringify(formatted), { parser: 'json' });
fs.writeFileSync(path.resolve(dest, file), json);
console.log(path.resolve(src, file), chalk.greenBright('->'), path.resolve(dest, file));
});
}