mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-07 19:55:46 -05:00
Add American Spanish language
Closes #985 Just in-game names are different. Rest is copied from EU translation.
This commit is contained in:
@@ -20,7 +20,11 @@ import invariant from "tiny-invariant";
|
||||
import type { MainWeaponParams, SubWeaponParams } from "~/modules/analyzer";
|
||||
import type { ParamsJson } from "~/modules/analyzer/types";
|
||||
import { z } from "zod";
|
||||
import { LANG_JSONS_TO_CREATE, loadLangDicts } from "./utils";
|
||||
import {
|
||||
LANG_JSONS_TO_CREATE,
|
||||
loadLangDicts,
|
||||
translationJsonFolderName,
|
||||
} from "./utils";
|
||||
|
||||
const CURRENT_SEASON = 1;
|
||||
|
||||
@@ -603,7 +607,7 @@ function writeTranslationsJsons(arr: TranslationArray) {
|
||||
"..",
|
||||
"public",
|
||||
"locales",
|
||||
langCode.slice(2),
|
||||
translationJsonFolderName(langCode),
|
||||
`weapons.json`
|
||||
),
|
||||
JSON.stringify(
|
||||
|
||||
@@ -8,7 +8,11 @@ import shoes from "./dicts/GearInfoShoes.json";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import invariant from "tiny-invariant";
|
||||
import { LANG_JSONS_TO_CREATE, loadLangDicts } from "./utils";
|
||||
import {
|
||||
LANG_JSONS_TO_CREATE,
|
||||
loadLangDicts,
|
||||
translationJsonFolderName,
|
||||
} from "./utils";
|
||||
|
||||
const CURRENT_SEASON = 1;
|
||||
const OUTPUT_DIR_PATH = path.join(__dirname, "output");
|
||||
@@ -117,7 +121,7 @@ async function main() {
|
||||
"..",
|
||||
"public",
|
||||
"locales",
|
||||
langCode.slice(2),
|
||||
translationJsonFolderName(langCode),
|
||||
`gear.json`
|
||||
),
|
||||
JSON.stringify(translationsMap, null, 2) + "\n"
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* eslint-disable */
|
||||
// @ts-nocheck
|
||||
|
||||
import { LANG_JSONS_TO_CREATE, loadLangDicts } from "./utils";
|
||||
import {
|
||||
LANG_JSONS_TO_CREATE,
|
||||
loadLangDicts,
|
||||
translationJsonFolderName,
|
||||
} from "./utils";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import invariant from "tiny-invariant";
|
||||
@@ -61,7 +65,7 @@ async function main() {
|
||||
"..",
|
||||
"public",
|
||||
"locales",
|
||||
langCode.slice(2),
|
||||
translationJsonFolderName(langCode),
|
||||
`game-misc.json`
|
||||
),
|
||||
JSON.stringify(translationsMap, null, 2) + "\n"
|
||||
|
||||
@@ -12,6 +12,7 @@ export const LANG_JSONS_TO_CREATE = [
|
||||
"CNzh",
|
||||
"EUde",
|
||||
"EUes",
|
||||
"USes",
|
||||
"EUfr",
|
||||
"EUit",
|
||||
"EUnl",
|
||||
@@ -36,3 +37,9 @@ export async function loadLangDicts() {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export function translationJsonFolderName(langCode: string) {
|
||||
if (langCode === "EUes") return "es-ES";
|
||||
if (langCode === "USes") return "es-US";
|
||||
return langCode.slice(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user