Korean translation, refactor code

This commit is contained in:
EnochG1 2024-09-19 13:28:10 +09:00
parent dd29eae9e9
commit 8c3b26824d
2 changed files with 49 additions and 49 deletions

View File

@ -1,5 +1,5 @@
{
"pikachu": "Normal",
"pikachu": "일반",
"pikachuCosplay": "옷갈아입기",
"pikachuCoolCosplay": "하드록",
"pikachuBeautyCosplay": "마담",
@ -7,9 +7,9 @@
"pikachuSmartCosplay": "닥터",
"pikachuToughCosplay": "마스크드",
"pikachuPartner": "파트너",
"eevee": "Normal",
"eevee": "일반",
"eeveePartner": "파트너",
"pichu": "Normal",
"pichu": "일반",
"pichuSpiky": "삐쭉귀",
"unownA": "A",
"unownB": "B",
@ -39,7 +39,7 @@
"unownZ": "Z",
"unownExclamation": "!",
"unownQuestion": "?",
"castform": "Normal Form",
"castform": "평상시",
"castformSunny": "태양의 모습",
"castformRainy": "빗방울의 모습",
"castformSnowy": "설운의 모습",
@ -54,15 +54,15 @@
"cherubiSunshine": "포지폼",
"shellosEast": "동쪽바다의 모습",
"shellosWest": "서쪽바다의 모습",
"rotom": "Normal",
"rotomHeat": "히트",
"rotomWash": "워시",
"rotomFrost": "프로스트",
"rotomFan": "스핀",
"rotomMow": "커트",
"dialga": "Normal",
"rotom": "로토무",
"rotomHeat": "히트로토무",
"rotomWash": "워시로토무",
"rotomFrost": "프로스트로토무",
"rotomFan": "스핀로토무",
"rotomMow": "커트로토무",
"dialga": "어나더폼",
"dialgaOrigin": "오리진폼",
"palkia": "Normal",
"palkia": "어나더폼",
"palkiaOrigin": "오리진폼",
"giratinaAltered": "어나더폼",
"giratinaOrigin": "오리진폼",
@ -71,7 +71,7 @@
"basculinRedStriped": "적색근의 모습",
"basculinBlueStriped": "청색근의 모습",
"basculinWhiteStriped": "백색근의 모습",
"darumaka": "Standard Mode",
"darumaka": "노말모드",
"darumakaZen": "달마모드",
"deerlingSpring": "봄의 모습",
"deerlingSummer": "여름의 모습",
@ -83,21 +83,21 @@
"thundurusTherian": "영물폼",
"landorusIncarnate": "화신폼",
"landorusTherian": "영물폼",
"kyurem": "Normal",
"kyurem": "큐레무",
"kyuremBlack": "블랙큐레무",
"kyuremWhite": "화이트큐레무",
"keldeoOrdinary": "평상시 모습",
"keldeoResolute": "각오의 모습",
"meloettaAria": "보이스폼",
"meloettaPirouette": "스텝폼",
"genesect": "Normal",
"genesect": "노말폼",
"genesectShock": "라이트닝폼",
"genesectBurn": "블레이즈폼",
"genesectChill": "프리즈폼",
"genesectDouse": "아쿠아폼",
"froakie": "Normal",
"froakie": "개굴닌자",
"froakieBattleBond": "유대변화",
"froakieAsh": "Ash",
"froakieAsh": "지우개굴닌자",
"scatterbugMeadow": "화원의 모양",
"scatterbugIcySnow": "빙설의 모양",
"scatterbugPolar": "설국의 모양",
@ -123,7 +123,7 @@
"flabebeOrange": "오렌지색 꽃",
"flabebeBlue": "파란 꽃",
"flabebeWhite": "하얀 꽃",
"furfrou": "Natural Form",
"furfrou": "일반",
"furfrouHeart": "하트컷",
"furfrouStar": "스타컷",
"furfrouDiamond": "다이아컷",
@ -137,7 +137,7 @@
"espurrFemale": "암컷의 모습",
"honedgeShiled": "실드폼",
"honedgeBlade": "블레이드폼",
"pumpkaboo": "Average Size",
"pumpkaboo": "보통 사이즈",
"pumpkabooSmall": "작은 사이즈",
"pumpkabooLarge": "큰 사이즈",
"pumpkabooSuper": "특대 사이즈",
@ -148,18 +148,18 @@
"zygarde50Pc": "스웜체인지 50%폼",
"zygarde10Pc": "스웜체인지 10%폼",
"zygardeComplete": "퍼펙트폼",
"hoopa": "Confined",
"hoopa": "굴레에 빠진 모습",
"hoopaUnbound": "굴레를 벗어난 모습",
"oricorioBaile": "이글이글스타일",
"oricorioPompom": "파칙파칙스타일",
"oricorioPau": "훌라훌라스타일",
"oricorioSensu": "하늘하늘스타일",
"rockruff": "Normal",
"rockruff": "일반",
"rockruffOwnTempo": "마이페이스",
"rockruffMidday": "한낮의 모습",
"rockruffMidnight": "한밤중의 모습",
"rockruffDusk": "황혼의 모습",
"wishiwashi": "Solo Form",
"wishiwashi": "단독의 모습",
"wishiwashiSchool": "군집의 모습",
"typeNullNormal": "노말",
"typeNullFighting": "격투",
@ -195,19 +195,19 @@
"miniorViolet": "보라색 코어",
"mimikyuDisguised": "둔갑한 모습",
"mimikyuBusted": "들킨 모습",
"necrozma": "Normal",
"necrozma": "네크로즈마",
"necrozmaDuskMane": "황혼의 갈기",
"necrozmaDawnWings": "새벽의 날개",
"necrozmaUltra": "울트라네크로즈마",
"magearna": "Normal",
"magearna": "일반적인 모습",
"magearnaOriginal": "500년 전의 색",
"marshadow": "Normal",
"marshadowZenith": "투지를 불태운 마샤도",
"cramorant": "Normal",
"cramorantGulping": "Gulping Form",
"cramorantGorging": "Gorging Form",
"toxelAmped": "Amped Form",
"toxelLowkey": "Low-Key Form",
"marshadow": "일반적인 모습",
"marshadowZenith": "타오르는 투지의 모습",
"cramorant": "일반",
"cramorantGulping": "그대로 삼킨 모습",
"cramorantGorging": "통째로 삼킨 모습",
"toxelAmped": "하이한 모습",
"toxelLowkey": "로우한 모습",
"sinisteaPhony": "위작품",
"sinisteaAntique": "진작품",
"milceryVanillaCream": "밀키바닐라",
@ -219,7 +219,7 @@
"milceryRubySwirl": "루비믹스",
"milceryCaramelSwirl": "캐러멜믹스",
"milceryRainbowSwirl": "트리플믹스",
"eiscue": "Ice Face",
"eiscue": "아이스페이스",
"eiscueNoIce": "나이스페이스",
"indeedeeMale": "수컷의 모습",
"indeedeeFemale": "암컷의 모습",
@ -231,9 +231,9 @@
"zamazentaCrowned": "방패왕",
"kubfuSingleStrike": "일격의 태세",
"kubfuRapidStrike": "연격의 태세",
"zarude": "Normal",
"zarude": "일반",
"zarudeDada": "아빠",
"calyrex": "Normal",
"calyrex": "일반",
"calyrexIce": "백마 탄 모습",
"calyrexShadow": "흑마 탄 모습",
"basculinMale": "수컷의 모습",
@ -279,10 +279,10 @@
"ogerponHearthflameMaskTera": "화덕의가면 테라스탈",
"ogerponCornerstoneMask": "주춧돌의가면",
"ogerponCornerstoneMaskTera": "주춧돌의가면 테라스탈",
"terpagos": "Normal Form",
"terpagos": "노말폼",
"terpagosTerastal": "테라스탈폼",
"terpagosStellar": "스텔라폼",
"galarDarumaka": "Standard Mode",
"galarDarumaka": "노말모드",
"galarDarumakaZen": "달마모드",
"paldeaTaurosCombat": "컴뱃종",
"paldeaTaurosBlaze": "블레이즈종",

View File

@ -235,7 +235,19 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.pokemonGenderText.setVisible(false);
}
if (pokemon.species.forms?.[pokemon.formIndex]?.formName) {
const formKey = (pokemon.species?.forms?.[pokemon.formIndex!]?.formKey);
const formText = Utils.capitalizeString(formKey, "-", false, false) || "";
const speciesName = Utils.capitalizeString(Species[pokemon.species.getRootSpeciesId()], "_", true, false);
let formName = "";
if (pokemon.species.speciesId === Species.ARCEUS) {
formName = i18next.t(`pokemonInfo:Type.${formText?.toUpperCase()}`);
} else {
const i18key = `pokemonForm:${speciesName}${formText}`;
formName = i18next.exists(i18key) ? i18next.t(i18key) : formText;
}
if (formName) {
this.pokemonFormLabelText.setVisible(true);
this.pokemonFormText.setVisible(true);
const newForm = BigInt(1 << pokemon.formIndex) * DexAttr.DEFAULT_FORM;
@ -248,18 +260,6 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
this.pokemonFormLabelText.setShadowColor(getTextColor(TextStyle.WINDOW, true, this.scene.uiTheme));
}
const formKey = (pokemon.species?.forms?.[pokemon.formIndex!]?.formKey);
const formText = Utils.capitalizeString(formKey, "-", false, false) || "";
const speciesName = Utils.capitalizeString(Species[pokemon.species.getRootSpeciesId()], "_", true, false);
let formName = "";
if (pokemon.species.speciesId === Species.ARCEUS) {
formName = i18next.t(`pokemonInfo:Type.${formText?.toUpperCase()}`);
} else {
const i18key = `pokemonForm:${speciesName}${formText}`;
formName = i18next.exists(i18key) ? i18next.t(i18key) : formText;
}
this.pokemonFormText.setText(formName.length > this.numCharsBeforeCutoff ? formName.substring(0, this.numCharsBeforeCutoff - 3) + "..." : formName);
if (formName.length > this.numCharsBeforeCutoff) {
this.pokemonFormText.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.pokemonFormText.width, this.pokemonFormText.height), Phaser.Geom.Rectangle.Contains);