mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Added Bengali and Thai languages.
This commit is contained in:
parent
e4e3e74ec2
commit
ab1e49e703
14 changed files with 1717 additions and 52 deletions
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue