mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-01 23:58:36 -05:00
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:
@@ -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`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user