1
0

merge translations (based part)

This commit is contained in:
piuvas
2024-10-07 20:38:42 -03:00
parent 5145afb625
commit 6f7c0c2de3
3 changed files with 1031 additions and 769 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as yaml from 'js-yaml';
import ts from 'typescript';
import { merge } from './index.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
@@ -56,7 +57,10 @@ function createMembers(record) {
}
export default function generateDTS() {
const locale = yaml.load(fs.readFileSync(`${__dirname}/ja-JP.yml`, 'utf-8'));
const sharkeyLocale = yaml.load(fs.readFileSync(`${__dirname}/../sharkey-locales/ja-JP.yml`, 'utf-8'));
const misskeyLocale = yaml.load(fs.readFileSync(`${__dirname}/ja-JP.yml`, 'utf-8'));
const locale = merge(misskeyLocale, sharkeyLocale);
const members = createMembers(locale);
const elements = [
ts.factory.createVariableStatement(