LANG_JSONS_TO_CREATE from one constant in scripts

This commit is contained in:
Kalle 2022-09-05 21:11:50 +03:00
parent 1a34a39359
commit ee9f78d0b0
3 changed files with 15 additions and 4 deletions

View File

@ -5,11 +5,10 @@ import shoes from "./dicts/GearInfoShoes.json";
import fs from "node:fs";
import path from "node:path";
import invariant from "tiny-invariant";
import { loadLangDicts } from "./utils";
import { LANG_JSONS_TO_CREATE, loadLangDicts } from "./utils";
const CURRENT_SEASON = 0;
const OUTPUT_DIR_PATH = path.join(__dirname, "output");
const LANG_JSONS_TO_CREATE = ["EUen"];
async function main() {
const allGear: Array<{

View File

@ -2,11 +2,10 @@ import weapons from "./dicts/WeaponInfoMain.json";
import fs from "node:fs";
import path from "node:path";
import invariant from "tiny-invariant";
import { loadLangDicts } from "./utils";
import { LANG_JSONS_TO_CREATE, loadLangDicts } from "./utils";
const INTERNAL_NAMES_TO_IGNORE: readonly string[] = ["Free"] as const;
const OUTPUT_DIR_PATH = path.join(__dirname, "output");
const LANG_JSONS_TO_CREATE = ["EUen"];
async function main() {
const result: Array<{

View File

@ -3,6 +3,19 @@ import fs from "node:fs";
const LANG_DICTS_PATH = path.join(__dirname, "dicts", "langs");
export const LANG_JSONS_TO_CREATE = [
"EUen",
"CNzh",
"EUde",
"EUes",
"EUfr",
"EUit",
"EUnl",
"EUru",
"JPja",
"KRko",
];
export async function loadLangDicts() {
const result: Array<
[langCode: string, translations: Record<string, string>]