Migrate Comboboxes to react-aria-components (#2408)

* Initial

* wip

* AnyWeapon

* del

* wip

* import stuff

* gearselect

* brand images

* wip

* wip

* art

* Remove old

* Fix tournament map pool link

* Simplify GearSelect

* convert to todo
This commit is contained in:
Kalle
2025-06-21 13:44:26 +03:00
committed by GitHub
parent 4e6951e36b
commit 7ed1394fba
178 changed files with 1686 additions and 1547 deletions

View File

@@ -2,6 +2,7 @@
import fs from "node:fs";
import { abilitiesShort } from "~/modules/in-game-lists/abilities";
import { brandIds } from "~/modules/in-game-lists/brand-ids";
import invariant from "~/utils/invariant";
import {
LANG_JSONS_TO_CREATE,
@@ -116,6 +117,25 @@ async function main() {
translationsMap[`ABILITY_${ability}`] = translation;
}
for (const brandCode of brandIds) {
const translation = decodeURIComponent(
langDict["CommonMsg/Gear/GearBrandName"][brandCode],
);
translationsMap[`BRAND_${brandCode}`] = translation;
}
const jsonPath = path.join(
__dirname,
"..",
"locales",
translationJsonFolderName(langCode),
"game-misc.json",
);
const jsonCurrentContents = fs.readFileSync(jsonPath, "utf-8");
const jsonCurrent = JSON.parse(jsonCurrentContents);
fs.writeFileSync(
path.join(
__dirname,
@@ -124,7 +144,7 @@ async function main() {
translationJsonFolderName(langCode),
"game-misc.json",
),
`${JSON.stringify(translationsMap, null, 2)}\n`,
`${JSON.stringify({ ...jsonCurrent, ...translationsMap }, null, 2)}\n`,
);
}
}