From 3d9b1343322cdd14a469e2c0429a43808991e27d Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 19 Jun 2024 15:40:08 -0400 Subject: [PATCH] [UI] Update Challenge UI (#2393) * Update Challenge UI * Update interpolation and localization * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/de/challenges.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> --------- Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> --- public/images/types/bug.png | Bin 256 -> 0 bytes public/images/types/dark.png | Bin 274 -> 0 bytes public/images/types/dragon.png | Bin 276 -> 0 bytes public/images/types/electric.png | Bin 274 -> 0 bytes public/images/types/fairy.png | Bin 271 -> 0 bytes public/images/types/fighting.png | Bin 270 -> 0 bytes public/images/types/fire.png | Bin 249 -> 0 bytes public/images/types/flying.png | Bin 295 -> 0 bytes public/images/types/ghost.png | Bin 295 -> 0 bytes public/images/types/grass.png | Bin 298 -> 0 bytes public/images/types/ground.png | Bin 279 -> 0 bytes public/images/types/ice.png | Bin 252 -> 0 bytes public/images/types/normal.png | Bin 269 -> 0 bytes public/images/types/poison.png | Bin 293 -> 0 bytes public/images/types/psychic.png | Bin 296 -> 0 bytes public/images/types/rock.png | Bin 261 -> 0 bytes public/images/types/steel.png | Bin 273 -> 0 bytes public/images/types/stellar.png | Bin 880 -> 0 bytes public/images/types/unknown.png | Bin 247 -> 0 bytes public/images/types/water.png | Bin 256 -> 0 bytes src/@types/i18next.d.ts | 3 +- src/data/challenge.ts | 62 +++++++- src/enums/color.ts | 83 +++++++++++ src/interfaces/locales.ts | 3 + src/locales/de/challenges.ts | 87 +++--------- src/locales/de/common.ts | 5 + src/locales/de/config.ts | 2 + src/locales/de/starter-select-ui-handler.ts | 1 - src/locales/en/challenges.ts | 87 +++--------- src/locales/en/common.ts | 5 + src/locales/en/config.ts | 2 + src/locales/en/starter-select-ui-handler.ts | 1 - src/locales/es/challenges.ts | 86 +++--------- src/locales/es/common.ts | 5 + src/locales/es/config.ts | 2 + src/locales/es/starter-select-ui-handler.ts | 1 - src/locales/fr/challenges.ts | 85 +++-------- src/locales/fr/common.ts | 5 + src/locales/fr/config.ts | 2 + src/locales/fr/starter-select-ui-handler.ts | 1 - src/locales/it/challenges.ts | 86 +++--------- src/locales/it/common.ts | 5 + src/locales/it/config.ts | 2 + src/locales/it/starter-select-ui-handler.ts | 1 - src/locales/ko/challenges.ts | 87 +++--------- src/locales/ko/common.ts | 5 + src/locales/ko/config.ts | 2 + src/locales/ko/starter-select-ui-handler.ts | 1 - src/locales/pt_BR/challenges.ts | 84 +++-------- src/locales/pt_BR/common.ts | 5 + src/locales/pt_BR/config.ts | 2 + .../pt_BR/starter-select-ui-handler.ts | 1 - src/locales/zh_CN/challenges.ts | 86 +++--------- src/locales/zh_CN/common.ts | 5 + src/locales/zh_CN/config.ts | 2 + .../zh_CN/starter-select-ui-handler.ts | 1 - src/locales/zh_TW/challenges.ts | 86 +++--------- src/locales/zh_TW/common.ts | 5 + src/locales/zh_TW/config.ts | 2 + src/scene-base.ts | 13 ++ src/ui/challenges-select-ui-handler.ts | 132 +++++++++++++----- src/ui/starter-select-ui-handler.ts | 8 +- src/ui/ui.ts | 2 +- 63 files changed, 528 insertions(+), 623 deletions(-) delete mode 100644 public/images/types/bug.png delete mode 100644 public/images/types/dark.png delete mode 100644 public/images/types/dragon.png delete mode 100644 public/images/types/electric.png delete mode 100644 public/images/types/fairy.png delete mode 100644 public/images/types/fighting.png delete mode 100644 public/images/types/fire.png delete mode 100644 public/images/types/flying.png delete mode 100644 public/images/types/ghost.png delete mode 100644 public/images/types/grass.png delete mode 100644 public/images/types/ground.png delete mode 100644 public/images/types/ice.png delete mode 100644 public/images/types/normal.png delete mode 100644 public/images/types/poison.png delete mode 100644 public/images/types/psychic.png delete mode 100644 public/images/types/rock.png delete mode 100644 public/images/types/steel.png delete mode 100644 public/images/types/stellar.png delete mode 100644 public/images/types/unknown.png delete mode 100644 public/images/types/water.png create mode 100644 src/enums/color.ts create mode 100644 src/locales/de/common.ts create mode 100644 src/locales/en/common.ts create mode 100644 src/locales/es/common.ts create mode 100644 src/locales/fr/common.ts create mode 100644 src/locales/it/common.ts create mode 100644 src/locales/ko/common.ts create mode 100644 src/locales/pt_BR/common.ts create mode 100644 src/locales/zh_CN/common.ts create mode 100644 src/locales/zh_TW/common.ts diff --git a/public/images/types/bug.png b/public/images/types/bug.png deleted file mode 100644 index 72681086ec6bc9653ab36383acf2259079ecf7e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssDqP)EPUmr%G_|-NqwnFa_n}GlIl3Al1}#e;v0$(E>$4?J7LqUl0Eh*`0K&e} zEzgJB@d}iIF^FZJFq!!#1H@7?tO>`UAQp2QI%^Ar$t0ZH@UtQOrUjow^%=&XyV(&- z6|~o^*kJ>I|A<YP){hH&d25S;?K@LbD&0cQaY;QEdp2T0!Ro%CC;^wiG_uYvS@GoSx>ytINT@M8Sr(==Ch3l^C~`c0Cm(;1ayk9v?VmhEt#HEt0RX+cG;zUQ amAC_xf8%xj=CA7j0000YP)of4ZlTl#TLd&atgWAXJjzpKCi==j}wq(iI=TtCMc zjoSOf{5&tjNtv7g0FW|=NYrqoOe(_8xBOfJ&#XH3b)h#nQf9M>nCH9yodgv*Y9#(H z!8dtbF(Ss6#$&PY!+kQvVDTN;(|xZio*%jlF@C=G+do9c%4Wrll@I_h-7ih1Fx+PG Y0`>BajqaT9KmY&$07*qoM6N<$f|ulXk^lez diff --git a/public/images/types/fairy.png b/public/images/types/fairy.png deleted file mode 100644 index f8ca169d3aae52499101daa1db82f3c12b24d185..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-q!3HG#?#OKdQrA3P978NlC#NJNB>brV^tQf@ zk)h|=p&p(8{`>y^FZ%zsal`zF|4(lJFBxAlM?&EKVFqC{$3`Y*5u3+{xkL&}?0k5p z%gvDS;gQ_%peWManYC?kLXs%2tU%deE*5EDd7nK^2O07?HawVoMxf(>wj0lEfdela zy4v`5^e3<#I`V-r=hulMhANQ-?D~qeKNfXn1v>QDIRzee@e~u%FlhKK7R{x;%HU8K z-vJ)yGQ&+0il--BU9h>ch#{7Hk*IkZ&y1(qd1n$5K+c~rVS<6e!hj74jLHmuw^Zbu TQg1c|`jElX)z4*}Q$iB}z-(rq diff --git a/public/images/types/fighting.png b/public/images/types/fighting.png deleted file mode 100644 index 0fd87f3dbd9205c0958e4b866ecedbf67c93f952..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270 zcmV+p0rCEcP)Ci#p>B(kz{pM#9d=S(7zm3&I&TxUivWze!s@b0)v-X$TtOr!0hf)BHL0cd%I U6TH9k+5i9m07*qoM6N<$g1RAdbpQYW diff --git a/public/images/types/fire.png b/public/images/types/fire.png deleted file mode 100644 index 08a550fcaff08da95b8fd0525327190db45a4635..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 249 zcmVJC1u7)`JGcC5s3$6Mdm7a-SNktKmh<}dtw2M z%}Q~$Cr2!Sc>>$2<^aGE&|Qag{Op4#kPqFxGpVU_CN+ELk;~wzX`-%|b*WQBCqd7U zB=>c_#gTM1wh@7RfT05~-iMre)HAwE5%f5>M=;|2B?9SXkPlO_jABq9FaLr?Sl>iC z%$d|}Bu%4h;0|m#^0MYRG86zL`&crCJ-^i#+7f4%niTl+00000NkvXXu0mjf+D~Kc diff --git a/public/images/types/flying.png b/public/images/types/flying.png deleted file mode 100644 index 3a13e051222b03d7a82dc97685e6766a8dd274b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 295 zcmV+?0oeYDP)iDVp@xGZ{#_%9G`DZ?bfoinnnuG3;Us&OD(*N4$QQl34j-e!kl4UQN&%kFKfKe t!w*mj+*(u2+*$($0FV2#ND8fy>P?+WidjSAsnQC+;Xleie002ovPDHLkV1fdKf}j8Z diff --git a/public/images/types/grass.png b/public/images/types/grass.png deleted file mode 100644 index 35dfecfc2d25c9fa29a27b397e459f26e2d0bb89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 298 zcmV+_0oDGAP)T&zL5yF;jtDiKTP@s2(VaQl_RI1N7IhBwe$oGoY8P z*Ls=0rLuLGd7Q;wQs5oAi(%um9q1LS7EnlLyjjh935X2ES&QXn{sXy8sf)`x_g~pp wbu3mb;9ozYIL^(I$8p91oaERz>%07*qoM6N<$g1`uZIsgCw diff --git a/public/images/types/ground.png b/public/images/types/ground.png deleted file mode 100644 index 0df975559b6d092359cc85f00a637d2377e3b167..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 279 zcmV+y0qFjTP)qnGvG)bP}ZRl29)LlcuA+8_jUxZs<^4+d{3R10Y|*4X6FHNL3pnW2vH48Z^Z002ovPDHLkV1m7{c#r@9 diff --git a/public/images/types/ice.png b/public/images/types/ice.png deleted file mode 100644 index 57ea33f9b16650d96537b0631c34f0051030badb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 252 zcmVtcILhT> zEE+^o7tB%F&4yXxT$s9A}qQ{2pBCK38Z2*wW0=UE!>nv|9mRric6T1u8id> zt~(-ZM^f8Z?fAAMRK~CmTRMzAa(*fIPb|&1|A^MfHWObb3k3kL=cCChyv?k>#$uAo T;d(r-00000NkvXXu0mjfCYNqr diff --git a/public/images/types/poison.png b/public/images/types/poison.png deleted file mode 100644 index c898b4d14a9387642cd92d4480dddd33381f8e13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 293 zcmV+=0owkFP)|}5cE)+Avsy8V@JEwbZI=Sx^2_~c(=c~;fUt4O^zr7J z%#W+V z8}k1sCXZnCHIw6(CQx8ES{kHcE;(nvFexrlfDA`UI28Z@d&gJBWvweNIf4+9vO$a{ zB{PYV!kj{8$7lnQ%Sj uhq>h+qM@FPZ9dd96ae&HS40JEt@;9cxuTsWv}w`+0000C$7kbE-oq;b$ufPePyv$35Pm69BNU z^N9u+rbUQ-ozHD|E%HMSBgE^en!KLTr8cI=>WAIb7oX!&>lpf+I->~yK-$1)@^gus ze&GN^Nn6dakkA>UDSE!j0n)}hk-H=&jNK^3b)^!p&AB>;FXnT#akolPiy9IAoeRSc z8sn~rPxb*;t)z{v!vvpPD)y3qzcnIfk7mi8Js<$U%wrQ5XmR2Vsy>7H4Mho>00000 LNkvXXu0mjfOHys@ diff --git a/public/images/types/steel.png b/public/images/types/steel.png deleted file mode 100644 index 34e2ad73db8e822b5443f26dd32e0eb11936ca20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 273 zcmV+s0q*{ZP)ki z!Oy4wrAUYn{2XIjV?Mg>30Z460L0ir<_?Gyh!iG2EOO@3e2e2AYiM%AoizXeV;!6| znEW?pq;ZMcLbGcWU`wE`=D!$ImaA7P2DdH1&seyyZ~#0{?_Oqvk9oKR^J0HMc4*Sa%mM Xct&`gOOwIw00000NkvXXu0mjfVODC- diff --git a/public/images/types/stellar.png b/public/images/types/stellar.png deleted file mode 100644 index 6ca5e5bdbc478032dde4d757115642e8cdf57038..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 880 zcmV-$1CRWPP)Px#1ZP1_K>z@;j|==^1poj807*naR7gvml}$_&Q4q&xKUzv@5nI8SV6ZV5K){H| zLG(c6LSi@&#l(Ze#2XOQi#^tpV7zGb$c2cBAJL1NsEHnk2N8jQLZk?q`c*BokphLX z``np*Z@UFG(O>d1|CxP#^Re4q2@D2C?=!TBPtG+3Qvswka4Si2RVf87`6uZdWzn>n zc`b_=9Z6{O4zg@fA*(N$mZb^-R^pICUUG7})_8M6^B>a+^c6J@}XA4nsf&hwxY9@0W7wgO@)k_@YmhDCi1 z;`%a8WLY=LGP+)4F3^}0BuRrDc?oiKa}pMFG8s&ciLrA`j*0b{F|E}ENS+-aISXiM z@8SSQ`u4F@Dn%<4Jj1$fG+Vxi*?oHqZStX;mhj`9MJ(1@%%Y8fto>hWn=D_%q77Y4 zz1#W%xc}vRtgVr51>6<%~b|_Ova>G&7I@-C@@;Cf&vw!5tTKN z#XUVoZv%{Nf!@?piV;Tl3;hSVW9%vPGyZQCfJJ*l1e+ZwKn=93+? zFSjc5cl%P?1dg4h+yl5e-3!lSFS!S>eX5G94A{AVZo&0a&9p>y_M`%=_~zwe+E+Sz z#fo7Ad4BVmp{^cXgvhRO^8bXrK&ho;npJzQao6k;5iz_)BH{m#7?hx(&U(=jI2BPO z6+p_y=H0`PlJ|2DAX4e)3SevIO-ne(=g7MBS7d#|F|va6`!HA8R25W`mG(AXVu7+2 za{iVWS)Uvc1t9-g#Mrk9pd;(s+F4o(P*4yr_HbpA|C{8963Kj!9Bh^=0QbiQt})c^nh4rN$LW=%~1DgXcg2mk;800000(o>TF0000-_6q)Qsn1a7G$ZC159He6Sb<+G?gabh?TNfTqMbzH2@gvaMrA6 zjJ?VtDj<_8{dSp@9TKoq^$R;?1WQHRQAn92lx`c*4#>x_Yp;}@;sImb&fQXWS_eK& xCS`{_@b_2H`ytsT?EQcODD)%AXB3{TdIN>eaTA3PXLJAn002ovPDHLkV1h4sVE6z4 diff --git a/public/images/types/water.png b/public/images/types/water.png deleted file mode 100644 index eb618008d00ed8864192b667a68e70196233b8dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmV+b0ssDqP)CFU3764$$!I6cd z7iUPGY8)Fi?Ki-X$vwQL?KWV^b;rm`bJ|-5WGh=SAAdpVky6?#m3XNuGPY{q?~ADB{MXQtpa6jEWk?sudG!D(oqaDf2yJly0000 0 ? 1 : 0; } + /** + * Returns the textual representation of a challenge's current value. + * @param {value} overrideValue The value to check for. If undefined, gets the current value. + * @returns {string} The localised name for the current value. + */ + getValue(overrideValue?: integer): string { + if (overrideValue === undefined) { + overrideValue = this.value; + } + if (this.value === 0) { + return i18next.t("settings:off"); + } + return i18next.t(`starterSelectUiHandler:gen${this.value}`); + } + + /** + * Returns the description of a challenge's current value. + * @param {value} overrideValue The value to check for. If undefined, gets the current value. + * @returns {string} The localised description for the current value. + */ + getDescription(overrideValue?: integer): string { + if (overrideValue === undefined) { + overrideValue = this.value; + } + if (this.value === 0) { + return i18next.t("challenges:singleGeneration.desc_default"); + } + return i18next.t("challenges:singleGeneration.desc", { gen: i18next.t(`challenges:singleGeneration.gen_${this.value}`) }); + } + + static loadChallenge(source: SingleGenerationChallenge | any): SingleGenerationChallenge { const newChallenge = new SingleGenerationChallenge(); newChallenge.value = source.value; @@ -438,6 +470,34 @@ export class SingleTypeChallenge extends Challenge { return this.value > 0 ? 1 : 0; } + /** + * Returns the textual representation of a challenge's current value. + * @param {value} overrideValue The value to check for. If undefined, gets the current value. + * @returns {string} The localised name for the current value. + */ + getValue(overrideValue?: integer): string { + if (overrideValue === undefined) { + overrideValue = this.value; + } + return Type[this.value - 1].toLowerCase(); + } + + /** + * Returns the description of a challenge's current value. + * @param {value} overrideValue The value to check for. If undefined, gets the current value. + * @returns {string} The localised description for the current value. + */ + getDescription(overrideValue?: integer): string { + if (overrideValue === undefined) { + overrideValue = this.value; + } + const type = i18next.t(`pokemonInfo:Type.${Type[this.value - 1]}`); + const typeColor = `[color=${TypeColor[Type[this.value-1]]}][shadow=${TypeShadow[Type[this.value-1]]}]${type}[/shadow][/color]`; + const defaultDesc = i18next.t("challenges:singleType.desc_default"); + const typeDesc = i18next.t("challenges:singleType.desc", {type: typeColor}); + return this.value === 0 ? defaultDesc : typeDesc; + } + static loadChallenge(source: SingleTypeChallenge | any): SingleTypeChallenge { const newChallenge = new SingleTypeChallenge(); newChallenge.value = source.value; diff --git a/src/enums/color.ts b/src/enums/color.ts new file mode 100644 index 00000000000..99c2d14cb63 --- /dev/null +++ b/src/enums/color.ts @@ -0,0 +1,83 @@ +export enum Color { + WHITE = "#ffffff", + OFF_WHITE = "#f8f8f8", + LIGHT_GREY = "#a0a0a0", + GREY = "#484848", + DARK_GREY = "#404040", + PINK = "#f89890", + RED = "#e13d3d", + RED2 = "#e70808", + REDORANGE = "#d64b00", + ORANGE = "#f8b050", + LIGHT_YELLOW = "#e8e8a8", + YELLOW = "#ccbe00", + DARK_YELLOW = "#a68e17", + GREEN = "#78c850", + BLUE = "#40c8f8", + COMMON = "#ffffff", + GREAT = "#3890f8", + ULTRA = "#f8d038", + ROGUE = "#d52929", + MASTER = "#e020c0", + LUXURY = "#e64a18" +} + +export enum TypeColor { + NORMAL = "#ADA594", + FIGHTING = "#A55239", + FLYING = "#9CADF7", + POISON = "#9141CB", + GROUND = "#AE7A3B", + ROCK = "#BDA55A", + BUG = "#ADBD21", + GHOST = "#6363B5", + STEEL = "#81A6BE", + FIRE = "#F75231", + WATER = "#399CFF", + GRASS = "#7BCE52", + ELECTRIC = "#FFC631", + PSYCHIC = "#EF4179", + ICE = "#5ACEE7", + DRAGON = "#7B63E7", + DARK = "#735A4A", + FAIRY = "#EF70EF", +} + +export enum TypeShadow { + NORMAL = "#574F4A", + FIGHTING = "#4E637C", + FLYING = "#4E637C", + POISON = "#352166", + GROUND = "#572D1E", + ROCK = "#5F442D", + BUG = "#5F5010", + GHOST = "#323D5B", + STEEL = "#415C5F", + FIRE = "#7C1818", + WATER = "#1C4E80", + GRASS = "#4F6729", + ELECTRIC = "#804618", + PSYCHIC = "#782155", + ICE = "#2D5C74", + DRAGON = "#313874", + DARK = "#392725", + FAIRY = "#663878", +} + +export enum ShadowColor { + GREY = "#636363", + PURPLE = "#6b5a73", + LIGHT_GREY = "#d0d0c8", + BROWN = "#69402a", + PINK = "#fca2a2", + BRIGHT_RED = "#f83018", + RED = "#984038", + MAROON = "#632929", + GREEN = "#306850", + BLUE = "#006090", + LIGHT_YELLOW = "#ded6b5", + YELLOW = "#ebd773", + DARK_YELLOW = "#a0a060", + ORANGE = "#c07800", + LIGHT_ORANGE = "#ffbd73", +} diff --git a/src/interfaces/locales.ts b/src/interfaces/locales.ts index 21fbda7c468..d9b3d71474d 100644 --- a/src/interfaces/locales.ts +++ b/src/interfaces/locales.ts @@ -2,6 +2,9 @@ export interface Localizable { localize(): void; } +export interface TranslationEntries { + [key: string]: string | { [key: string]: string } +} export interface SimpleTranslationEntries { [key: string]: string } diff --git a/src/locales/de/challenges.ts b/src/locales/de/challenges.ts index b3e878f4649..176de9879b6 100644 --- a/src/locales/de/challenges.ts +++ b/src/locales/de/challenges.ts @@ -1,67 +1,26 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Herausforderungsmodifikatoren", - "confirm_start": "Mit diesen Modifikatoren fortfahren?", - "singleGeneration.name": "Mono-Generation", - "singleGeneration.value.0": "Aus", - "singleGeneration.desc.0": "Du kannst nur Pokémon aus der gewählten Generation verwenden.", - "singleGeneration.value.1": "Generation 1", - "singleGeneration.desc.1": "Du kannst nur Pokémon aus der ersten Generation verwenden.", - "singleGeneration.value.2": "Generation 2", - "singleGeneration.desc.2": "Du kannst nur Pokémon aus der zweiten Generation verwenden.", - "singleGeneration.value.3": "Generation 3", - "singleGeneration.desc.3": "Du kannst nur Pokémon aus der dritten Generation verwenden.", - "singleGeneration.value.4": "Generation 4", - "singleGeneration.desc.4": "Du kannst nur Pokémon aus der vierten Generation verwenden.", - "singleGeneration.value.5": "Generation 5", - "singleGeneration.desc.5": "Du kannst nur Pokémon aus der fünften Generation verwenden.", - "singleGeneration.value.6": "Generation 6", - "singleGeneration.desc.6": "Du kannst nur Pokémon aus der sechsten Generation verwenden.", - "singleGeneration.value.7": "Generation 7", - "singleGeneration.desc.7": "Du kannst nur Pokémon aus der siebten Generation verwenden.", - "singleGeneration.value.8": "Generation 8", - "singleGeneration.desc.8": "Du kannst nur Pokémon aus der achten Generation verwenden.", - "singleGeneration.value.9": "Generation 9", - "singleGeneration.desc.9": "Du kannst nur Pokémon aus der neunten Generation verwenden.", - "singleType.name": "Mono-Typ", - "singleType.value.0": "Aus", - "singleType.desc.0": "Du kannst nur Pokémon des gewählten Typs verwenden.", - "singleType.value.1": "Normal", - "singleType.desc.1": "Du kannst nur Pokémon des Typs Normal verwenden.", - "singleType.value.2": "Kampf", - "singleType.desc.2": "Du kannst nur Pokémon des Typs Kampf verwenden.", - "singleType.value.3": "Flug", - "singleType.desc.3": "Du kannst nur Pokémon des Typs Flug verwenden.", - "singleType.value.4": "Gift", - "singleType.desc.4": "Du kannst nur Pokémon des Typs Gift verwenden.", - "singleType.value.5": "Boden", - "singleType.desc.5": "Du kannst nur Pokémon des Typs Boden verwenden.", - "singleType.value.6": "Gestein", - "singleType.desc.6": "Du kannst nur Pokémon des Typs Gestein verwenden.", - "singleType.value.7": "Käfer", - "singleType.desc.7": "Du kannst nur Pokémon des Typs Käfer verwenden.", - "singleType.value.8": "Geist", - "singleType.desc.8": "Du kannst nur Pokémon des Typs Geist verwenden.", - "singleType.value.9": "Stahl", - "singleType.desc.9": "Du kannst nur Pokémon des Typs Stahl verwenden.", - "singleType.value.10": "Feuer", - "singleType.desc.10": "Du kannst nur Pokémon des Typs Feuer verwenden.", - "singleType.value.11": "Wasser", - "singleType.desc.11": "Du kannst nur Pokémon des Typs Wasser verwenden.", - "singleType.value.12": "Pflanze", - "singleType.desc.12": "Du kannst nur Pokémon des Typs Pflanze verwenden.", - "singleType.value.13": "Elektro", - "singleType.desc.13": "Du kannst nur Pokémon des Typs Elektro verwenden.", - "singleType.value.14": "Psycho", - "singleType.desc.14": "Du kannst nur Pokémon des Typs Psycho verwenden.", - "singleType.value.15": "Eis", - "singleType.desc.15": "Du kannst nur Pokémon des Typs Eis verwenden.", - "singleType.value.16": "Drache", - "singleType.desc.16": "Du kannst nur Pokémon des Typs Drache verwenden.", - "singleType.value.17": "Unlicht", - "singleType.desc.17": "Du kannst nur Pokémon des Typs Unlicht verwenden.", - "singleType.value.18": "Fee", - "singleType.desc.18": "Du kannst nur Pokémon des Typs Fee verwenden." - + "illegalEvolution": "{{pokemon}} hat sich in ein Pokémon verwandelt, dass für diese Herausforderung nicht zulässig ist!", + "singleGeneration": { + "name": "Mono-Generation", + "desc": "Du kannst nur Pokémon aus der {{gen}} Generation verwenden.", + "desc_default": "Du kannst nur Pokémon gewählten Generation verwenden.", + "gen_1": "ersten", + "gen_2": "zweiten", + "gen_3": "dritten", + "gen_4": "vierten", + "gen_5": "fünften", + "gen_6": "sechsten", + "gen_7": "siebten", + "gen_8": "achten", + "gen_9": "neunten", + }, + "singleType": { + "name": "Mono-Typ", + "desc": "Du kannst nur Pokémon des Typs {{type}} verwenden.", + "desc_default": "Du kannst nur Pokémon des gewählten Typs verwenden." + // types in pokemon-info + }, } as const; diff --git a/src/locales/de/common.ts b/src/locales/de/common.ts new file mode 100644 index 00000000000..82966b4ffeb --- /dev/null +++ b/src/locales/de/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Start", +} as const; diff --git a/src/locales/de/config.ts b/src/locales/de/config.ts index 16c25d6ca78..5f1bd541ad2 100644 --- a/src/locales/de/config.ts +++ b/src/locales/de/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/de/settings.js"; +import { common } from "#app/locales/de/common.js"; export const deConfig = { ability: ability, @@ -50,6 +51,7 @@ export const deConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/de/starter-select-ui-handler.ts b/src/locales/de/starter-select-ui-handler.ts index c82f579c341..2f5a98bb051 100644 --- a/src/locales/de/starter-select-ui-handler.ts +++ b/src/locales/de/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Passiv:", "nature": "Wesen:", "eggMoves": "Ei-Attacken", - "start": "Start", "addToParty": "Zum Team hinzufügen", "toggleIVs": "DVs anzeigen/verbergen", "manageMoves": "Attacken ändern", diff --git a/src/locales/en/challenges.ts b/src/locales/en/challenges.ts index 746a7e962d2..a40f05a0843 100644 --- a/src/locales/en/challenges.ts +++ b/src/locales/en/challenges.ts @@ -1,67 +1,26 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales.js"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Challenge Modifiers", - "start": "Start", - "illegalEvolution": "{{pokemon}} changed into an ineligble pokemon\nfor this challenge!", - "singleGeneration.name": "Mono Gen", - "singleGeneration.value.0": "Off", - "singleGeneration.desc.0": "You can only use pokemon from the chosen generation.", - "singleGeneration.value.1": "Gen 1", - "singleGeneration.desc.1": "You can only use pokemon from generation one.", - "singleGeneration.value.2": "Gen 2", - "singleGeneration.desc.2": "You can only use pokemon from generation two.", - "singleGeneration.value.3": "Gen 3", - "singleGeneration.desc.3": "You can only use pokemon from generation three.", - "singleGeneration.value.4": "Gen 4", - "singleGeneration.desc.4": "You can only use pokemon from generation four.", - "singleGeneration.value.5": "Gen 5", - "singleGeneration.desc.5": "You can only use pokemon from generation five.", - "singleGeneration.value.6": "Gen 6", - "singleGeneration.desc.6": "You can only use pokemon from generation six.", - "singleGeneration.value.7": "Gen 7", - "singleGeneration.desc.7": "You can only use pokemon from generation seven.", - "singleGeneration.value.8": "Gen 8", - "singleGeneration.desc.8": "You can only use pokemon from generation eight.", - "singleGeneration.value.9": "Gen 9", - "singleGeneration.desc.9": "You can only use pokemon from generation nine.", - "singleType.name": "Mono Type", - "singleType.value.0": "Off", - "singleType.desc.0": "You can only use pokemon of the chosen type.", - "singleType.value.1": "Normal", - "singleType.desc.1": "You can only use pokemon with the Normal type.", - "singleType.value.2": "Fighting", - "singleType.desc.2": "You can only use pokemon with the Fighting type.", - "singleType.value.3": "Flying", - "singleType.desc.3": "You can only use pokemon with the Flying type.", - "singleType.value.4": "Poison", - "singleType.desc.4": "You can only use pokemon with the Poison type.", - "singleType.value.5": "Ground", - "singleType.desc.5": "You can only use pokemon with the Ground type.", - "singleType.value.6": "Rock", - "singleType.desc.6": "You can only use pokemon with the Rock type.", - "singleType.value.7": "Bug", - "singleType.desc.7": "You can only use pokemon with the Bug type.", - "singleType.value.8": "Ghost", - "singleType.desc.8": "You can only use pokemon with the Ghost type.", - "singleType.value.9": "Steel", - "singleType.desc.9": "You can only use pokemon with the Steel type.", - "singleType.value.10": "Fire", - "singleType.desc.10": "You can only use pokemon with the Fire type.", - "singleType.value.11": "Water", - "singleType.desc.11": "You can only use pokemon with the Water type.", - "singleType.value.12": "Grass", - "singleType.desc.12": "You can only use pokemon with the Grass type.", - "singleType.value.13": "Electric", - "singleType.desc.13": "You can only use pokemon with the Electric type.", - "singleType.value.14": "Psychic", - "singleType.desc.14": "You can only use pokemon with the Psychic type.", - "singleType.value.15": "Ice", - "singleType.desc.15": "You can only use pokemon with the Ice type.", - "singleType.value.16": "Dragon", - "singleType.desc.16": "You can only use pokemon with the Dragon type.", - "singleType.value.17": "Dark", - "singleType.desc.17": "You can only use pokemon with the Dark type.", - "singleType.value.18": "Fairy", - "singleType.desc.18": "You can only use pokemon with the Fairy type.", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "Mono Gen", + "desc": "You can only use Pokémon from Generation {{gen}}.", + "desc_default": "You can only use Pokémon from the chosen generation.", + "gen_1": "one", + "gen_2": "two", + "gen_3": "three", + "gen_4": "four", + "gen_5": "five", + "gen_6": "six", + "gen_7": "seven", + "gen_8": "eight", + "gen_9": "nine", + }, + "singleType": { + "name": "Mono Type", + "desc": "You can only use Pokémon with the {{type}} type.", + "desc_default": "You can only use Pokémon of the chosen type." + //types in pokemon-info + }, } as const; diff --git a/src/locales/en/common.ts b/src/locales/en/common.ts new file mode 100644 index 00000000000..82966b4ffeb --- /dev/null +++ b/src/locales/en/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Start", +} as const; diff --git a/src/locales/en/config.ts b/src/locales/en/config.ts index 98b36ea61ab..f37b707479a 100644 --- a/src/locales/en/config.ts +++ b/src/locales/en/config.ts @@ -1,3 +1,4 @@ +import { common } from "#app/locales/en/common.js"; import { settings } from "#app/locales/en/settings.js"; import { ability } from "./ability"; import { abilityTriggers } from "./ability-trigger"; @@ -50,6 +51,7 @@ export const enConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/en/starter-select-ui-handler.ts b/src/locales/en/starter-select-ui-handler.ts index 4b7c3194396..ae8443d8a20 100644 --- a/src/locales/en/starter-select-ui-handler.ts +++ b/src/locales/en/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Passive:", "nature": "Nature:", "eggMoves": "Egg Moves", - "start": "Start", "addToParty": "Add to Party", "toggleIVs": "Toggle IVs", "manageMoves": "Manage Moves", diff --git a/src/locales/es/challenges.ts b/src/locales/es/challenges.ts index 9bc5b0923fd..711be39b116 100644 --- a/src/locales/es/challenges.ts +++ b/src/locales/es/challenges.ts @@ -1,67 +1,25 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Parámetros de Desafíos", - "points": "Malas Ideas", - "confirm_start": "¿Continuar con estos desafíos?", - "singleGeneration.name": "Monogeneración", - "singleGeneration.value.0": "No", - "singleGeneration.desc.0": "Solo puedes usar Pokémon de la generación elegida.", - "singleGeneration.value.1": "Gen 1", - "singleGeneration.desc.1": "Solo puedes usar Pokémon de primera generación.", - "singleGeneration.value.2": "Gen 2", - "singleGeneration.desc.2": "Solo puedes usar Pokémon de segunda generación.", - "singleGeneration.value.3": "Gen 3", - "singleGeneration.desc.3": "Solo puedes usar Pokémon de tercera generación.", - "singleGeneration.value.4": "Gen 4", - "singleGeneration.desc.4": "Solo puedes usar Pokémon de cuarta generación.", - "singleGeneration.value.5": "Gen 5", - "singleGeneration.desc.5": "Solo puedes usar Pokémon de quinta generación.", - "singleGeneration.value.6": "Gen 6", - "singleGeneration.desc.6": "Solo puedes usar Pokémon de sexta generación.", - "singleGeneration.value.7": "Gen 7", - "singleGeneration.desc.7": "Solo puedes usar Pokémon de séptima generación.", - "singleGeneration.value.8": "Gen 8", - "singleGeneration.desc.8": "Solo puedes usar Pokémon de octava generación.", - "singleGeneration.value.9": "Gen 9", - "singleGeneration.desc.9": "Solo puedes usar Pokémon de novena generación.", - "singleType.name": "Monotipo", - "singleType.value.0": "No", - "singleType.desc.0": "Solo puedes usar Pokémon del tipo elegido", - "singleType.value.1": "Normal", - "singleType.desc.1": "Solo puedes usar Pokémon de tipo Normal.", - "singleType.value.2": "Lucha", - "singleType.desc.2": "Solo puedes usar Pokémon de tipo Lucha.", - "singleType.value.3": "Volador", - "singleType.desc.3": "Solo puedes usar Pokémon de tipo Volador.", - "singleType.value.4": "Veneno", - "singleType.desc.4": "Solo puedes usar Pokémon de tipo Veneno.", - "singleType.value.5": "Tierra", - "singleType.desc.5": "Solo puedes usar Pokémon de tipo Tierra.", - "singleType.value.6": "Roca", - "singleType.desc.6": "Solo puedes usar Pokémon de tipo Roca.", - "singleType.value.7": "Bicho", - "singleType.desc.7": "Solo puedes usar Pokémon de tipo Bicho.", - "singleType.value.8": "Fantasma", - "singleType.desc.8": "Solo puedes usar Pokémon de tipo Fantasma.", - "singleType.value.9": "Acero", - "singleType.desc.9": "Solo puedes usar Pokémon de tipo Acero.", - "singleType.value.10": "Fuego", - "singleType.desc.10": "Solo puedes usar Pokémon de tipo Fuego.", - "singleType.value.11": "Agua", - "singleType.desc.11": "Solo puedes usar Pokémon de tipo Agua.", - "singleType.value.12": "Planta", - "singleType.desc.12": "Solo puedes usar Pokémon de tipo Planta.", - "singleType.value.13": "Eléctrico", - "singleType.desc.13": "Solo puedes usar Pokémon de tipo Eléctrico.", - "singleType.value.14": "Psíquico", - "singleType.desc.14": "Solo puedes usar Pokémon de tipo Psíquico.", - "singleType.value.15": "Hielo", - "singleType.desc.15": "Solo puedes usar Pokémon de tipo Hielo.", - "singleType.value.16": "Dragón", - "singleType.desc.16": "Solo puedes usar Pokémon de tipo Dragón.", - "singleType.value.17": "Siniestro", - "singleType.desc.17": "Solo puedes usar Pokémon de tipo Siniestro.", - "singleType.value.18": "Hada", - "singleType.desc.18": "Solo puedes usar Pokémon de tipo Hada.", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "Monogeneración", + "desc": "Solo puedes usar Pokémon de {{gen}} generación.", + "desc_default": "Solo puedes usar Pokémon de la generación elegida.", + "gen_1": "primera", + "gen_2": "segunda", + "gen_3": "tercera", + "gen_4": "cuarta", + "gen_5": "quinta", + "gen_6": "sexta", + "gen_7": "séptima", + "gen_8": "octava", + "gen_9": "novena", + }, + "singleType": { + "name": "Monotipo", + "desc": "Solo puedes usar Pokémon with the {{type}} type.", + "desc_default": "Solo puedes usar Pokémon del tipo elegido.", + }, } as const; diff --git a/src/locales/es/common.ts b/src/locales/es/common.ts new file mode 100644 index 00000000000..82966b4ffeb --- /dev/null +++ b/src/locales/es/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Start", +} as const; diff --git a/src/locales/es/config.ts b/src/locales/es/config.ts index e85ba976be4..f3747b6c619 100644 --- a/src/locales/es/config.ts +++ b/src/locales/es/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/es/settings.js"; +import { common } from "#app/locales/es/common.js"; export const esConfig = { ability: ability, @@ -50,6 +51,7 @@ export const esConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/es/starter-select-ui-handler.ts b/src/locales/es/starter-select-ui-handler.ts index 642d55ab5d8..a6ff2c921c3 100644 --- a/src/locales/es/starter-select-ui-handler.ts +++ b/src/locales/es/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Pasiva:", "nature": "Natur:", "eggMoves": "Mov. Huevo", - "start": "Iniciar", "addToParty": "Añadir a Equipo", "toggleIVs": "Mostrar IVs", "manageMoves": "Gestionar Movs.", diff --git a/src/locales/fr/challenges.ts b/src/locales/fr/challenges.ts index 6029cdc302a..d88960dbe3b 100644 --- a/src/locales/fr/challenges.ts +++ b/src/locales/fr/challenges.ts @@ -1,67 +1,26 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Paramètres du Challenge", - "start": "Démarrer", "illegalEvolution": "{{pokemon}} s’est transformé en Pokémon\ninéligible pour ce challenge !", - "singleGeneration.name": "Mono-génération", - "singleGeneration.value.0": "Désactivé", - "singleGeneration.desc.0": "Vous ne pouvez choisir que des Pokémon de la génération sélectionnée.", - "singleGeneration.value.1": "1G", - "singleGeneration.desc.1": "Vous ne pouvez choisir que des Pokémon de 1re génération.", - "singleGeneration.value.2": "2G", - "singleGeneration.desc.2": "Vous ne pouvez choisir que des Pokémon de 2e génération.", - "singleGeneration.value.3": "3G", - "singleGeneration.desc.3": "Vous ne pouvez choisir que des Pokémon de 3e génération.", - "singleGeneration.value.4": "4G", - "singleGeneration.desc.4": "Vous ne pouvez choisir que des Pokémon de 4e génération.", - "singleGeneration.value.5": "5G", - "singleGeneration.desc.5": "Vous ne pouvez choisir que des Pokémon de 5e génération.", - "singleGeneration.value.6": "6G", - "singleGeneration.desc.6": "Vous ne pouvez choisir que des Pokémon de 6e génération.", - "singleGeneration.value.7": "7G", - "singleGeneration.desc.7": "Vous ne pouvez choisir que des Pokémon de 7e génération.", - "singleGeneration.value.8": "8G", - "singleGeneration.desc.8": "Vous ne pouvez choisir que des Pokémon de 8e génération.", - "singleGeneration.value.9": "9G", - "singleGeneration.desc.9": "Vous ne pouvez choisir que des Pokémon de 9e génération.", - "singleType.name": "Mono-type", - "singleType.value.0": "Désactivé", - "singleType.desc.0": "Vous ne pouvez choisir que des Pokémon du type sélectionné.", - "singleType.value.1": "Normal", - "singleType.desc.1": "Vous ne pouvez choisir que des Pokémon de type Normal.", - "singleType.value.2": "Combat", - "singleType.desc.2": "Vous ne pouvez choisir que des Pokémon de type Combat.", - "singleType.value.3": "Vol", - "singleType.desc.3": "Vous ne pouvez choisir que des Pokémon de type Vol.", - "singleType.value.4": "Poison", - "singleType.desc.4": "Vous ne pouvez choisir que des Pokémon de type Poison.", - "singleType.value.5": "Sol", - "singleType.desc.5": "Vous ne pouvez choisir que des Pokémon de type Sol.", - "singleType.value.6": "Roche", - "singleType.desc.6": "Vous ne pouvez choisir que des Pokémon de type Roche.", - "singleType.value.7": "Insecte", - "singleType.desc.7": "Vous ne pouvez choisir que des Pokémon de type Insecte.", - "singleType.value.8": "Spectre", - "singleType.desc.8": "Vous ne pouvez choisir que des Pokémon de type Spectre.", - "singleType.value.9": "Acier", - "singleType.desc.9": "Vous ne pouvez choisir que des Pokémon de type Acier.", - "singleType.value.10": "Feu", - "singleType.desc.10": "Vous ne pouvez choisir que des Pokémon de type Feu.", - "singleType.value.11": "Eau", - "singleType.desc.11": "Vous ne pouvez choisir que des Pokémon de type Eau.", - "singleType.value.12": "Plante", - "singleType.desc.12": "Vous ne pouvez choisir que des Pokémon de type Plante.", - "singleType.value.13": "Électrik", - "singleType.desc.13": "Vous ne pouvez choisir que des Pokémon de type Électrik.", - "singleType.value.14": "Psy", - "singleType.desc.14": "Vous ne pouvez choisir que des Pokémon de type Psy.", - "singleType.value.15": "Glace", - "singleType.desc.15": "Vous ne pouvez choisir que des Pokémon de type Glace.", - "singleType.value.16": "Dragon", - "singleType.desc.16": "Vous ne pouvez choisir que des Pokémon de type Dragon.", - "singleType.value.17": "Ténèbres", - "singleType.desc.17": "Vous ne pouvez choisir que des Pokémon de type Ténèbres.", - "singleType.value.18": "Fée", - "singleType.desc.18": "Vous ne pouvez choisir que des Pokémon de type Fée.", + "singleGeneration": { + "name": "Mono-génération", + "desc": "Vous ne pouvez choisir que des Pokémon de {{gen}} génération.", + "desc_default": "Vous ne pouvez choisir que des Pokémon de la génération sélectionnée.", + "gen_1": "1re", + "gen_2": "2e", + "gen_3": "3e", + "gen_4": "4e", + "gen_5": "5e", + "gen_6": "6e", + "gen_7": "7e", + "gen_8": "8e", + "gen_9": "9e", + }, + "singleType": { + "name": "Mono-type", + "desc": "Vous ne pouvez choisir que des Pokémon de type {{type}}.", + "desc_default": "Vous ne pouvez choisir que des Pokémon du type sélectionné." + //type in pokemon-info + }, } as const; diff --git a/src/locales/fr/common.ts b/src/locales/fr/common.ts new file mode 100644 index 00000000000..e4ccc627f5e --- /dev/null +++ b/src/locales/fr/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Lancer", +} as const; diff --git a/src/locales/fr/config.ts b/src/locales/fr/config.ts index b5e7a4e383a..59e8eb9f307 100644 --- a/src/locales/fr/config.ts +++ b/src/locales/fr/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/fr/settings.js"; +import { common } from "#app/locales/fr/common.js"; export const frConfig = { ability: ability, @@ -50,6 +51,7 @@ export const frConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/fr/starter-select-ui-handler.ts b/src/locales/fr/starter-select-ui-handler.ts index 0874c18d84c..87ede732f11 100644 --- a/src/locales/fr/starter-select-ui-handler.ts +++ b/src/locales/fr/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Passif :", "nature": "Nature :", "eggMoves": "Capacités Œuf", - "start": "Lancer", "addToParty": "Ajouter à l’équipe", "toggleIVs": "Voir les IV", "manageMoves": "Modifier les Capacités", diff --git a/src/locales/it/challenges.ts b/src/locales/it/challenges.ts index 0a15b22f83e..2643b16d0f7 100644 --- a/src/locales/it/challenges.ts +++ b/src/locales/it/challenges.ts @@ -1,67 +1,25 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Modificatori delle sfide", - "points": "Pessime idee", - "confirm_start": "Procedere con le sfide selezionate?", - "singleGeneration.name": "Mono gen", - "singleGeneration.value.0": "Off", - "singleGeneration.desc.0": "Puoi usare solo Pokémon della generazione selezionata.", - "singleGeneration.value.1": "1ª gen", - "singleGeneration.desc.1": "Puoi usare solo Pokémon di 1ª generazione.", - "singleGeneration.value.2": "2ª gen", - "singleGeneration.desc.2": "Puoi usare solo Pokémon di 2ª generazione.", - "singleGeneration.value.3": "3ª gen", - "singleGeneration.desc.3": "Puoi usare solo Pokémon di 3ª generazione.", - "singleGeneration.value.4": "4ª gen", - "singleGeneration.desc.4": "Puoi usare solo Pokémon di 4ª generazione.", - "singleGeneration.value.5": "5ª gen", - "singleGeneration.desc.5": "Puoi usare solo Pokémon di 5ª generazione.", - "singleGeneration.value.6": "6ª gen", - "singleGeneration.desc.6": "Puoi usare solo Pokémon di 6ª generazione.", - "singleGeneration.value.7": "7ª gen", - "singleGeneration.desc.7": "Puoi usare solo Pokémon di 7ª generazione.", - "singleGeneration.value.8": "8ª gen", - "singleGeneration.desc.8": "Puoi usare solo Pokémon di 8ª generazione.", - "singleGeneration.value.9": "9ª gen", - "singleGeneration.desc.9": "Puoi usare solo Pokémon di 9ª generazione.", - "singleType.name": "Mono tipo", - "singleType.value.0": "Off", - "singleType.desc.0": "Puoi usare solo Pokémon del tipo selezionato.", - "singleType.value.1": "Normale", - "singleType.desc.1": "Puoi usare solo Pokémon di tipo normale.", - "singleType.value.2": "Lotta", - "singleType.desc.2": "Puoi usare solo Pokémon di tipo lotta.", - "singleType.value.3": "Volante", - "singleType.desc.3": "Puoi usare solo Pokémon di tipo volante.", - "singleType.value.4": "Veleno", - "singleType.desc.4": "Puoi usare solo Pokémon di tipo veleno.", - "singleType.value.5": "Terra", - "singleType.desc.5": "Puoi usare solo Pokémon di tipo terra.", - "singleType.value.6": "Roccia", - "singleType.desc.6": "Puoi usare solo Pokémon di tipo roccia.", - "singleType.value.7": "Coleottero", - "singleType.desc.7": "Puoi usare solo Pokémon di tipo coleottero.", - "singleType.value.8": "Spettro", - "singleType.desc.8": "Puoi usare solo Pokémon di tipo spettro.", - "singleType.value.9": "Acciaio", - "singleType.desc.9": "Puoi usare solo Pokémon di tipo acciaio.", - "singleType.value.10": "Fuoco", - "singleType.desc.10": "Puoi usare solo Pokémon di tipo fuoco.", - "singleType.value.11": "Acqua", - "singleType.desc.11": "Puoi usare solo Pokémon di tipo acqua.", - "singleType.value.12": "Erba", - "singleType.desc.12": "Puoi usare solo Pokémon di tipo erba.", - "singleType.value.13": "Elettro", - "singleType.desc.13": "Puoi usare solo Pokémon di tipo elettro.", - "singleType.value.14": "Psico", - "singleType.desc.14": "Puoi usare solo Pokémon di tipo psico.", - "singleType.value.15": "Ghiaccio", - "singleType.desc.15": "Puoi usare solo Pokémon di tipo ghiaccio.", - "singleType.value.16": "Drago", - "singleType.desc.16": "Puoi usare solo Pokémon di tipo drago.", - "singleType.value.17": "Buio", - "singleType.desc.17": "Puoi usare solo Pokémon di tipo buio.", - "singleType.value.18": "Folletto", - "singleType.desc.18": "Puoi usare solo Pokémon di tipo folletto.", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "Mono gen", + "desc": "Puoi usare solo Pokémon di {{gen}} generazione.", + "desc_default": "Puoi usare solo Pokémon della generazione selezionata.", + "gen_1": "1ª", + "gen_2": "2ª", + "gen_3": "3ª", + "gen_4": "4ª", + "gen_5": "5ª", + "gen_6": "6ª", + "gen_7": "7ª", + "gen_8": "8ª", + "gen_9": "9ª", + }, + "singleType": { + "name": "Mono tipo", + "desc": "Puoi usare solo Pokémon di tipo {{type}}.", + "desc_default": "Puoi usare solo Pokémon del tipo selezionato." + }, } as const; diff --git a/src/locales/it/common.ts b/src/locales/it/common.ts new file mode 100644 index 00000000000..f42fa311472 --- /dev/null +++ b/src/locales/it/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Inizia", +} as const; diff --git a/src/locales/it/config.ts b/src/locales/it/config.ts index 6f14aabda50..7cc063a6b23 100644 --- a/src/locales/it/config.ts +++ b/src/locales/it/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/it/settings.js"; +import { common } from "#app/locales/it/common.js"; export const itConfig = { ability: ability, @@ -50,6 +51,7 @@ export const itConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/it/starter-select-ui-handler.ts b/src/locales/it/starter-select-ui-handler.ts index 8f68e5ff10d..5f9960561ca 100644 --- a/src/locales/it/starter-select-ui-handler.ts +++ b/src/locales/it/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Passiva:", "nature": "Natura:", "eggMoves": "Mosse da uova", - "start": "Inizia", "addToParty": "Aggiungi al gruppo", "toggleIVs": "Vedi/Nascondi IV", "manageMoves": "Gestisci mosse", diff --git a/src/locales/ko/challenges.ts b/src/locales/ko/challenges.ts index 64fa316b3bb..1f10c4f215a 100644 --- a/src/locales/ko/challenges.ts +++ b/src/locales/ko/challenges.ts @@ -1,67 +1,26 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "챌린지 조건 설정", - "points": "Bad Ideas", - "confirm_start": "이 조건으로 챌린지를 진행하시겠습니까?", - "singleGeneration.name": "단일 세대", - "singleGeneration.value.0": "설정 안함", - "singleGeneration.desc.0": "선택한 세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.1": "1세대", - "singleGeneration.desc.1": "1세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.2": "2세대", - "singleGeneration.desc.2": "2세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.3": "3세대", - "singleGeneration.desc.3": "3세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.4": "4세대", - "singleGeneration.desc.4": "4세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.5": "5세대", - "singleGeneration.desc.5": "5세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.6": "6세대", - "singleGeneration.desc.6": "6세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.7": "7세대", - "singleGeneration.desc.7": "7세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.8": "8세대", - "singleGeneration.desc.8": "8세대의 포켓몬만 사용할 수 있습니다.", - "singleGeneration.value.9": "9세대", - "singleGeneration.desc.9": "9세대의 포켓몬만 사용할 수 있습니다.", - "singleType.name": "단일 타입", - "singleType.value.0": "설정 안함", - "singleType.desc.0": "선택한 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.1": "노말", - "singleType.desc.1": "노말 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.2": "격투", - "singleType.desc.2": "격투 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.3": "비행", - "singleType.desc.3": "비행 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.4": "독", - "singleType.desc.4": "독 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.5": "땅", - "singleType.desc.5": "땅 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.6": "바위 ", - "singleType.desc.6": "바위 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.7": "벌레", - "singleType.desc.7": "벌레 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.8": "고스트", - "singleType.desc.8": "고스트 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.9": "강철", - "singleType.desc.9": "강철 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.10": "불꽃", - "singleType.desc.10": "불꽃 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.11": "물", - "singleType.desc.11": "물 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.12": "풀", - "singleType.desc.12": "풀 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.13": "전기", - "singleType.desc.13": "전기 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.14": "에스퍼", - "singleType.desc.14": "에스퍼 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.15": "얼음", - "singleType.desc.15": "얼음 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.16": "드래곤", - "singleType.desc.16": "드래곤 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.17": "악", - "singleType.desc.17": "악 타입의 포켓몬만 사용할 수 있습니다.", - "singleType.value.18": "페어리", - "singleType.desc.18": "페어리 타입의 포켓몬만 사용할 수 있습니다.", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "단일 세대", + "desc": "{{gen}}의 포켓몬만 사용할 수 있습니다.", + "desc_default": "선택한 세대의 포켓몬만 사용할 수 있습니다.", + "gen_1": "1세대", + "gen_2": "2세대", + "gen_3": "3세대", + "gen_4": "4세대", + "gen_5": "5세대", + "gen_6": "6세대", + "gen_7": "7세대", + "gen_8": "8세대", + "gen_9": "9세대", + }, + "singleType": { + "name": "단일 타입", + "desc": "{{type}} 타입의 포켓몬만 사용할 수 있습니다.", + "desc_default": "선택한 타입의 포켓몬만 사용할 수 있습니다." + //type in pokemon-info + }, } as const; diff --git a/src/locales/ko/common.ts b/src/locales/ko/common.ts new file mode 100644 index 00000000000..d87be482f99 --- /dev/null +++ b/src/locales/ko/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "시작", +} as const; diff --git a/src/locales/ko/config.ts b/src/locales/ko/config.ts index 99cf5ddd8ea..3ec162abd34 100644 --- a/src/locales/ko/config.ts +++ b/src/locales/ko/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/ko/settings.js"; +import { common } from "#app/locales/ko/common.js"; export const koConfig = { ability: ability, @@ -50,6 +51,7 @@ export const koConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/ko/starter-select-ui-handler.ts b/src/locales/ko/starter-select-ui-handler.ts index d84733a50d8..f78e760c4e0 100644 --- a/src/locales/ko/starter-select-ui-handler.ts +++ b/src/locales/ko/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "패시브:", "nature": "성격:", "eggMoves": "알 기술", - "start": "시작", "addToParty": "파티에 추가", "toggleIVs": "개체값 토글", "manageMoves": "기술 관리", diff --git a/src/locales/pt_BR/challenges.ts b/src/locales/pt_BR/challenges.ts index 98731fe890b..fd07fb5de3d 100644 --- a/src/locales/pt_BR/challenges.ts +++ b/src/locales/pt_BR/challenges.ts @@ -1,67 +1,25 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "Desafios", - "start": "Iniciar", "illegalEvolution": "{{pokemon}} não pode ser escolhido\nnesse desafio!", - "singleGeneration.name": "Geração Única", - "singleGeneration.value.0": "Desligado", - "singleGeneration.desc.0": "Você só pode user Pokémon de uma única geração.", - "singleGeneration.value.1": "Geração 1", - "singleGeneration.desc.1": "Você só pode user Pokémon da primeira geração.", - "singleGeneration.value.2": "Geração 2", - "singleGeneration.desc.2": "Você só pode user Pokémon da segunda geração.", - "singleGeneration.value.3": "Geração 3", - "singleGeneration.desc.3": "Você só pode user Pokémon da terceira geração.", - "singleGeneration.value.4": "Geração 4", - "singleGeneration.desc.4": "Você só pode user Pokémon da quarta geração.", - "singleGeneration.value.5": "Geração 5", - "singleGeneration.desc.5": "Você só pode user Pokémon da quinta geração.", - "singleGeneration.value.6": "Geração 6", - "singleGeneration.desc.6": "Você só pode user Pokémon da sexta geração.", - "singleGeneration.value.7": "Geração 7", - "singleGeneration.desc.7": "Você só pode user Pokémon da sétima geração.", - "singleGeneration.value.8": "Geração 8", - "singleGeneration.desc.8": "Você só pode user Pokémon da oitava geração.", - "singleGeneration.value.9": "Geração 9", - "singleGeneration.desc.9": "Você só pode user Pokémon da nona geração.", - "singleType.name": "Tipo Único", - "singleType.value.0": "Desligado", - "singleType.desc.0": "Você só pode user Pokémon de um único tipo.", - "singleType.value.1": "Normal", - "singleType.desc.1": "Você só pode user Pokémon do tipo Normal.", - "singleType.value.2": "Lutador", - "singleType.desc.2": "Você só pode user Pokémon do tipo Lutador.", - "singleType.value.3": "Voador", - "singleType.desc.3": "Você só pode user Pokémon do tipo Voador.", - "singleType.value.4": "Veneno", - "singleType.desc.4": "Você só pode user Pokémon do tipo Veneno.", - "singleType.value.5": "Terra", - "singleType.desc.5": "Você só pode user Pokémon do tipo Terra.", - "singleType.value.6": "Pedra", - "singleType.desc.6": "Você só pode user Pokémon do tipo Pedra.", - "singleType.value.7": "Inseto", - "singleType.desc.7": "Você só pode user Pokémon do tipo Inseto.", - "singleType.value.8": "Fantasma", - "singleType.desc.8": "Você só pode user Pokémon do tipo Fantasma.", - "singleType.value.9": "Aço", - "singleType.desc.9": "Você só pode user Pokémon do tipo Aço.", - "singleType.value.10": "Fogo", - "singleType.desc.10": "Você só pode user Pokémon do tipo Fogo.", - "singleType.value.11": "Água", - "singleType.desc.11": "Você só pode user Pokémon do tipo Água.", - "singleType.value.12": "Grama", - "singleType.desc.12": "Você só pode user Pokémon do tipo Grama.", - "singleType.value.13": "Elétrico", - "singleType.desc.13": "Você só pode user Pokémon do tipo Elétrico.", - "singleType.value.14": "Psíquico", - "singleType.desc.14": "Você só pode user Pokémon do tipo Psíquico.", - "singleType.value.15": "Gelo", - "singleType.desc.15": "Você só pode user Pokémon do tipo Gelo.", - "singleType.value.16": "Dragão", - "singleType.desc.16": "Você só pode user Pokémon do tipo Dragão.", - "singleType.value.17": "Sombrio", - "singleType.desc.17": "Você só pode user Pokémon do tipo Sombrio.", - "singleType.value.18": "Fada", - "singleType.desc.18": "Você só pode user Pokémon do tipo Fada.", + "singleGeneration": { + "name": "Geração Única", + "desc": "Você só pode user Pokémon da {{gen}} geração.", + "desc_default": "Você só pode user Pokémon de uma única geração.", + "gen_1": "primeira", + "gen_2": "segunda", + "gen_3": "terceira", + "gen_4": "quarta", + "gen_5": "quinta", + "gen_6": "sexta", + "gen_7": "sétima", + "gen_8": "oitava", + "gen_9": "nona", + }, + "singleType": { + "name": "Tipo Único", + "desc": "Você só pode user Pokémon do tipo {{type}}.", + "desc_default": "Você só pode user Pokémon de um único tipo." + }, } as const; diff --git a/src/locales/pt_BR/common.ts b/src/locales/pt_BR/common.ts new file mode 100644 index 00000000000..d7cbfd5d052 --- /dev/null +++ b/src/locales/pt_BR/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "Iniciar", +} as const; diff --git a/src/locales/pt_BR/config.ts b/src/locales/pt_BR/config.ts index 8d34c1539ef..ba658d43938 100644 --- a/src/locales/pt_BR/config.ts +++ b/src/locales/pt_BR/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/pt_BR/settings.js"; +import { common } from "#app/locales/pt_BR/common.js"; export const ptBrConfig = { ability: ability, @@ -50,6 +51,7 @@ export const ptBrConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/pt_BR/starter-select-ui-handler.ts b/src/locales/pt_BR/starter-select-ui-handler.ts index 64a2ceff7c3..0b349468aee 100644 --- a/src/locales/pt_BR/starter-select-ui-handler.ts +++ b/src/locales/pt_BR/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "Passiva:", "nature": "Natureza:", "eggMoves": "Mov. de Ovo", - "start": "Iniciar", "addToParty": "Adicionar à equipe", "toggleIVs": "Mostrar IVs", "manageMoves": "Mudar Movimentos", diff --git a/src/locales/zh_CN/challenges.ts b/src/locales/zh_CN/challenges.ts index 697a97bda09..d15a725fbb0 100644 --- a/src/locales/zh_CN/challenges.ts +++ b/src/locales/zh_CN/challenges.ts @@ -1,67 +1,25 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "适用挑战条件", - "points": "Bad Ideas", - "confirm_start": "要执行这些挑战吗?", - "singleGeneration.name": "单一世代", - "singleGeneration.value.0": "关闭", - "singleGeneration.desc.0": "你只能使用所选世代的宝可梦", - "singleGeneration.value.1": "第一世代", - "singleGeneration.desc.1": "你只能使用第一世代的宝可梦", - "singleGeneration.value.2": "第二世代", - "singleGeneration.desc.2": "你只能使用第二世代的宝可梦", - "singleGeneration.value.3": "第三世代", - "singleGeneration.desc.3": "你只能使用第三世代的宝可梦", - "singleGeneration.value.4": "第四世代", - "singleGeneration.desc.4": "你只能使用第四世代的宝可梦", - "singleGeneration.value.5": "第五世代", - "singleGeneration.desc.5": "你只能使用第五世代的宝可梦", - "singleGeneration.value.6": "第六世代", - "singleGeneration.desc.6": "你只能使用第六世代的宝可梦", - "singleGeneration.value.7": "第七世代", - "singleGeneration.desc.7": "你只能使用第七世代的宝可梦", - "singleGeneration.value.8": "第八世代", - "singleGeneration.desc.8": "你只能使用第八世代的宝可梦", - "singleGeneration.value.9": "第九世代", - "singleGeneration.desc.9": "你只能使用第九世代的宝可梦", - "singleType.name": "单属性", - "singleType.value.0": "关闭", - "singleType.desc.0": "你只能使用所选属性的宝可梦", - "singleType.value.1": "普通", - "singleType.desc.1": "你只能使用普通属性的宝可梦", - "singleType.value.2": "格斗", - "singleType.desc.2": "你只能使用格斗属性的宝可梦", - "singleType.value.3": "飞行", - "singleType.desc.3": "你只能使用飞行属性的宝可梦", - "singleType.value.4": "毒", - "singleType.desc.4": "你只能使用毒属性的宝可梦", - "singleType.value.5": "地面", - "singleType.desc.5": "你只能使用地面属性的宝可梦", - "singleType.value.6": "岩石", - "singleType.desc.6": "你只能使用岩石属性的宝可梦", - "singleType.value.7": "虫", - "singleType.desc.7": "你只能使用虫属性的宝可梦", - "singleType.value.8": "幽灵", - "singleType.desc.8": "你只能使用幽灵属性的宝可梦", - "singleType.value.9": "钢", - "singleType.desc.9": "你只能使用钢属性的宝可梦", - "singleType.value.10": "火", - "singleType.desc.10": "你只能使用火属性的宝可梦", - "singleType.value.11": "水", - "singleType.desc.11": "你只能使用水属性的宝可梦", - "singleType.value.12": "草", - "singleType.desc.12": "你只能使用草属性的宝可梦", - "singleType.value.13": "电", - "singleType.desc.13": "你只能使用电属性的宝可梦", - "singleType.value.14": "超能", - "singleType.desc.14": "你只能使用超能属性的宝可梦", - "singleType.value.15": "冰", - "singleType.desc.15": "你只能使用冰属性的宝可梦", - "singleType.value.16": "龙", - "singleType.desc.16": "你只能使用龙属性的宝可梦", - "singleType.value.17": "恶", - "singleType.desc.17": "你只能使用恶属性的宝可梦", - "singleType.value.18": "妖精", - "singleType.desc.18": "你只能使用妖精属性的宝可梦", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "单一世代", + "desc": "你只能使用第{{gen}}世代的宝可梦", + "desc_default": "你只能使用所选世代的宝可梦", + "gen_1": "一", + "gen_2": "二", + "gen_3": "三", + "gen_4": "四", + "gen_5": "五", + "gen_6": "六", + "gen_7": "七", + "gen_8": "八", + "gen_9": "九", + }, + "singleType": { + "name": "单属性", + "desc": "你只能使用{{type}}属性的宝可梦", + "desc_default": "你只能使用所选属性的宝可梦" + }, } as const; diff --git a/src/locales/zh_CN/common.ts b/src/locales/zh_CN/common.ts new file mode 100644 index 00000000000..29f54ff0dc9 --- /dev/null +++ b/src/locales/zh_CN/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "开始", +} as const; diff --git a/src/locales/zh_CN/config.ts b/src/locales/zh_CN/config.ts index fdc54cb2be0..ecef682581f 100644 --- a/src/locales/zh_CN/config.ts +++ b/src/locales/zh_CN/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/zh_CN/settings.js"; +import { common } from "#app/locales/zh_CN/common.js"; export const zhCnConfig = { ability: ability, @@ -50,6 +51,7 @@ export const zhCnConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/locales/zh_CN/starter-select-ui-handler.ts b/src/locales/zh_CN/starter-select-ui-handler.ts index 669b8a5bb80..05824853e40 100644 --- a/src/locales/zh_CN/starter-select-ui-handler.ts +++ b/src/locales/zh_CN/starter-select-ui-handler.ts @@ -21,7 +21,6 @@ export const starterSelectUiHandler: SimpleTranslationEntries = { "passive": "被动:", "nature": "性格:", "eggMoves": "蛋招式", - "start": "开始", "addToParty": "加入队伍", "toggleIVs": "切换个体值", "manageMoves": "管理招式", diff --git a/src/locales/zh_TW/challenges.ts b/src/locales/zh_TW/challenges.ts index 9da058001b1..6b46ac8c7ab 100644 --- a/src/locales/zh_TW/challenges.ts +++ b/src/locales/zh_TW/challenges.ts @@ -1,67 +1,25 @@ -import { SimpleTranslationEntries } from "#app/interfaces/locales"; +import { TranslationEntries } from "#app/interfaces/locales"; -export const challenges: SimpleTranslationEntries = { +export const challenges: TranslationEntries = { "title": "適用挑戰條件", - "points": "Bad Ideas", - "confirm_start": "要執行這些挑戰嗎?", - "singleGeneration.name": "單一世代", - "singleGeneration.value.0": "關閉", - "singleGeneration.desc.0": "你只能使用所選世代的寶可夢", - "singleGeneration.value.1": "第一世代", - "singleGeneration.desc.1": "你只能使用第一世代的寶可夢", - "singleGeneration.value.2": "第二世代", - "singleGeneration.desc.2": "你只能使用第二世代的寶可夢", - "singleGeneration.value.3": "第三世代", - "singleGeneration.desc.3": "你只能使用第三世代的寶可夢", - "singleGeneration.value.4": "第四世代", - "singleGeneration.desc.4": "你只能使用第四世代的寶可夢", - "singleGeneration.value.5": "第五世代", - "singleGeneration.desc.5": "你只能使用第五世代的寶可夢", - "singleGeneration.value.6": "第六世代", - "singleGeneration.desc.6": "你只能使用第六世代的寶可夢", - "singleGeneration.value.7": "第七世代", - "singleGeneration.desc.7": "你只能使用第七世代的寶可夢", - "singleGeneration.value.8": "第八世代", - "singleGeneration.desc.8": "你只能使用第八世代的寶可夢", - "singleGeneration.value.9": "第九世代", - "singleGeneration.desc.9": "你只能使用第九世代的寶可夢", - "singleType.name": "單屬性", - "singleType.value.0": "關閉", - "singleType.desc.0": "你只能使用所選屬性的寶可夢", - "singleType.value.1": "普通", - "singleType.desc.1": "你只能使用普通屬性的寶可夢", - "singleType.value.2": "格鬥", - "singleType.desc.2": "你只能使用格鬥屬性的寶可夢", - "singleType.value.3": "飛行", - "singleType.desc.3": "你只能使用飛行屬性的寶可夢", - "singleType.value.4": "毒", - "singleType.desc.4": "你只能使用毒屬性的寶可夢", - "singleType.value.5": "地面", - "singleType.desc.5": "你只能使用地面屬性的寶可夢", - "singleType.value.6": "岩石", - "singleType.desc.6": "你只能使用岩石屬性的寶可夢", - "singleType.value.7": "蟲", - "singleType.desc.7": "你只能使用蟲屬性的寶可夢", - "singleType.value.8": "幽靈", - "singleType.desc.8": "你只能使用幽靈屬性的寶可夢", - "singleType.value.9": "鋼", - "singleType.desc.9": "你只能使用鋼屬性的寶可夢", - "singleType.value.10": "火", - "singleType.desc.10": "你只能使用火屬性的寶可夢", - "singleType.value.11": "水", - "singleType.desc.11": "你只能使用水屬性的寶可夢", - "singleType.value.12": "草", - "singleType.desc.12": "你只能使用草屬性的寶可夢", - "singleType.value.13": "電", - "singleType.desc.13": "你只能使用電屬性的寶可夢", - "singleType.value.14": "超能", - "singleType.desc.14": "你只能使用超能屬性的寶可夢", - "singleType.value.15": "冰", - "singleType.desc.15": "你只能使用冰屬性的寶可夢", - "singleType.value.16": "龍", - "singleType.desc.16": "你只能使用龍屬性的寶可夢", - "singleType.value.17": "惡", - "singleType.desc.17": "你只能使用惡屬性的寶可夢", - "singleType.value.18": "妖精", - "singleType.desc.18": "你只能使用妖精屬性的寶可夢", + "illegalEvolution": "{{pokemon}} changed into an ineligble pokémon\nfor this challenge!", + "singleGeneration": { + "name": "單一世代", + "desc": "你只能使用第{{gen}}世代的寶可夢", + "desc_default": "你只能使用所選世代的寶可夢", + "gen_1": "一", + "gen_2": "二", + "gen_3": "三", + "gen_4": "四", + "gen_5": "五", + "gen_6": "六", + "gen_7": "七", + "gen_8": "八", + "gen_9": "九", + }, + "singleType": { + "name": "單屬性", + "desc": "你只能使用{{type}}屬性的寶可夢", + "desc_default": "你只能使用所選屬性的寶可夢" + }, } as const; diff --git a/src/locales/zh_TW/common.ts b/src/locales/zh_TW/common.ts new file mode 100644 index 00000000000..c3dc42785ee --- /dev/null +++ b/src/locales/zh_TW/common.ts @@ -0,0 +1,5 @@ +import { SimpleTranslationEntries } from "#app/interfaces/locales"; + +export const common: SimpleTranslationEntries = { + "start": "開始", +} as const; diff --git a/src/locales/zh_TW/config.ts b/src/locales/zh_TW/config.ts index 5d6a2dd978d..08063f9f154 100644 --- a/src/locales/zh_TW/config.ts +++ b/src/locales/zh_TW/config.ts @@ -40,6 +40,7 @@ import { voucher } from "./voucher"; import { weather } from "./weather"; import { partyUiHandler } from "./party-ui-handler"; import { settings } from "#app/locales/zh_TW/settings.js"; +import { common } from "#app/locales/zh_TW/common.js"; export const zhTwConfig = { ability: ability, @@ -50,6 +51,7 @@ export const zhTwConfig = { biome: biome, challenges: challenges, commandUiHandler: commandUiHandler, + common: common, PGMachv: PGMachv, PGFachv: PGFachv, PGMdialogue: PGMdialogue, diff --git a/src/scene-base.ts b/src/scene-base.ts index 48b7238387c..1d7a2518300 100644 --- a/src/scene-base.ts +++ b/src/scene-base.ts @@ -1,6 +1,19 @@ export const legacyCompatibleImages: string[] = []; export class SceneBase extends Phaser.Scene { + /** + * Since everything is scaled up by 6 by default using the game.canvas is annoying + * Until such point that we use the canvas normally, this will be easier than + * having to divide every width and heigh by 6 to position and scale the ui + * @readonly + * @defaultValue + * width: `320` + * height: `180` + */ + public readonly scaledCanvas = { + width: 1920 / 6, + height: 1080 / 6 + }; constructor(config?: string | Phaser.Types.Scenes.SettingsConfig) { super(config); } diff --git a/src/ui/challenges-select-ui-handler.ts b/src/ui/challenges-select-ui-handler.ts index 1104b048f93..67703b63aee 100644 --- a/src/ui/challenges-select-ui-handler.ts +++ b/src/ui/challenges-select-ui-handler.ts @@ -6,7 +6,11 @@ import { addWindow } from "./ui-theme"; import {Button} from "#enums/buttons"; import i18next from "i18next"; import { SelectStarterPhase, TitlePhase } from "#app/phases.js"; -import { Challenge } from "#app/data/challenge.js"; +import { Challenge, ChallengeType } from "#app/data/challenge.js"; +import * as Utils from "../utils"; +import { Challenges } from "#app/enums/challenges.js"; +import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; +import { Color, ShadowColor } from "#app/enums/color.js"; /** * Handles all the UI for choosing optional challenges. @@ -21,10 +25,9 @@ export default class GameChallengesUiHandler extends UiHandler { // private difficultyText: Phaser.GameObjects.Text; - private descriptionText: Phaser.GameObjects.Text; + private descriptionText: BBCodeText; - private challengeLabels: Phaser.GameObjects.Text[]; - private challengeValueLabels: Phaser.GameObjects.Text[]; + private challengeLabels: Array<{ label: Phaser.GameObjects.Text, value: Phaser.GameObjects.Text | Phaser.GameObjects.Sprite }>; private cursorObj: Phaser.GameObjects.NineSlice; @@ -38,14 +41,22 @@ export default class GameChallengesUiHandler extends UiHandler { const ui = this.getUi(); this.challengesContainer = this.scene.add.container(1, -(this.scene.game.canvas.height / 6) + 1); + this.challengesContainer.setName("container-challenges"); this.challengesContainer.setInteractive(new Phaser.Geom.Rectangle(0, 0, this.scene.game.canvas.width / 6, this.scene.game.canvas.height / 6), Phaser.Geom.Rectangle.Contains); + const bgOverlay = this.scene.add.rectangle(-1, -1, this.scene.scaledCanvas.width, this.scene.scaledCanvas.height, 0x424242, 0.8); + bgOverlay.setName("rect-challenge-overlay"); + bgOverlay.setOrigin(0, 0); + this.challengesContainer.add(bgOverlay); + // TODO: Change this back to /9 when adding in difficulty const headerBg = addWindow(this.scene, 0, 0, (this.scene.game.canvas.width / 6), 24); + headerBg.setName("window-header-bg"); headerBg.setOrigin(0, 0); const headerText = addTextObject(this.scene, 0, 0, i18next.t("challenges:title"), TextStyle.SETTINGS_LABEL); + headerText.setName("text-header"); headerText.setOrigin(0, 0); headerText.setPositionRelative(headerBg, 8, 4); @@ -62,45 +73,78 @@ export default class GameChallengesUiHandler extends UiHandler { // difficultyName.setPositionRelative(difficultyBg, difficultyBg.width - difficultyName.displayWidth - 8, 4); this.optionsBg = addWindow(this.scene, 0, headerBg.height, (this.scene.game.canvas.width / 9), (this.scene.game.canvas.height / 6) - headerBg.height - 2); + this.optionsBg.setName("window-options-bg"); this.optionsBg.setOrigin(0, 0); const descriptionBg = addWindow(this.scene, 0, headerBg.height, (this.scene.game.canvas.width / 18) - 2, (this.scene.game.canvas.height / 6) - headerBg.height - 26); + descriptionBg.setName("window-desc-bg"); descriptionBg.setOrigin(0, 0); descriptionBg.setPositionRelative(this.optionsBg, this.optionsBg.width, 0); - this.descriptionText = addTextObject(this.scene, 0, 0, "", TextStyle.SETTINGS_LABEL); + this.descriptionText = new BBCodeText(this.scene, descriptionBg.x + 6, descriptionBg.y + 4, "", { + fontFamily: "emerald, unifont", + fontSize: 96, + color: Color.ORANGE, + padding: { + bottom: 6 + }, + wrap: { + mode: "word", + width: (descriptionBg.width - 12) * 6, + } + }); + this.descriptionText.setName("text-desc"); + this.scene.add.existing(this.descriptionText); + this.descriptionText.setScale(1/6); + this.descriptionText.setShadow(4, 5, ShadowColor.ORANGE); this.descriptionText.setOrigin(0, 0); - this.descriptionText.setWordWrapWidth(500, true); - this.descriptionText.setPositionRelative(descriptionBg, 6, 4); const startBg = addWindow(this.scene, 0, 0, descriptionBg.width, 24); + startBg.setName("window-start-bg"); startBg.setOrigin(0, 0); startBg.setPositionRelative(descriptionBg, 0, descriptionBg.height); - const startText = addTextObject(this.scene, 0, 0, i18next.t("challenges:start"), TextStyle.SETTINGS_LABEL); + const startText = addTextObject(this.scene, 0, 0, i18next.t("common:start"), TextStyle.SETTINGS_LABEL); + startText.setName("text-start"); startText.setOrigin(0, 0); startText.setPositionRelative(startBg, 8, 4); this.startCursor = this.scene.add.nineslice(0, 0, "summary_moves_cursor", null, (this.scene.game.canvas.width / 18) - 10, 16, 1, 1, 1, 1); + this.startCursor.setName("9s-start-cursor"); this.startCursor.setOrigin(0, 0); this.startCursor.setPositionRelative(startBg, 4, 4); this.startCursor.setVisible(false); this.valuesContainer = this.scene.add.container(0, 0); + this.valuesContainer.setName("container-values"); this.challengeLabels = []; - this.challengeValueLabels = []; - for (let i = 0; i < 9; i++) { - this.challengeLabels[i] = addTextObject(this.scene, 8, 28 + i * 16, "", TextStyle.SETTINGS_LABEL); - this.challengeLabels[i].setOrigin(0, 0); + for (let i = 0; i < Object.keys(ChallengeType).length; i++) { + const label = addTextObject(this.scene, 8, 28 + i * 16, "", TextStyle.SETTINGS_LABEL); + label.setName(`text-challenge-label-${i}`); + label.setOrigin(0, 0); - this.valuesContainer.add(this.challengeLabels[i]); + this.valuesContainer.add(label); - this.challengeValueLabels[i] = addTextObject(this.scene, 0, 28 + i * 16, "", TextStyle.SETTINGS_LABEL); - this.challengeValueLabels[i].setPositionRelative(this.challengeLabels[i], 100, 0); + let value; + if (i === Challenges.SINGLE_TYPE) { + const type = `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`; + value = this.scene.add.sprite(8, 98, type); + value.setName("sprite-single-type"); + value.setScale(0.86); + value.setPositionRelative(label, 113, 8); + } else { + value = addTextObject(this.scene, 0, 28 + i * 16, "", TextStyle.SETTINGS_LABEL); + value.setName(`text-challenge-value-label-${i}`); + value.setPositionRelative(label, 100, 0); + } - this.valuesContainer.add(this.challengeValueLabels[i]); + this.valuesContainer.add(value); + this.challengeLabels[i] = { + label: label, + value: value + }; } this.challengesContainer.add(headerBg); @@ -124,31 +168,49 @@ export default class GameChallengesUiHandler extends UiHandler { this.challengesContainer.setVisible(false); } + /** + * Adds the default text color to the description text + * @param text text to set to the BBCode description + */ + setDescription(text: string): void { + this.descriptionText.setText(`[color=${Color.ORANGE}][shadow=${ShadowColor.ORANGE}]${text}`); + } + /** + * initLabels + * init all challenge labels + */ + initLabels(): void { + this.setDescription(this.scene.gameMode.challenges[this.cursor].getDescription()); + this.scene.gameMode.challenges.forEach((challenge, i) => { + this.challengeLabels[i].label.setVisible(true); + this.challengeLabels[i].value.setVisible(true); + this.challengeLabels[i].label.setText(challenge.getName()); + if (this.challengeLabels[i].value.type.toLowerCase() === "sprite") { + (this.challengeLabels[i].value as Phaser.GameObjects.Sprite).setFrame(challenge.getValue()); + } else { + (this.challengeLabels[i].value as Phaser.GameObjects.Text).setText(challenge.getValue()); + } + }); + } + + /** + * update the text the cursor is on + */ updateText(): void { - if (this.scene.gameMode.challenges.length > 0) { - this.descriptionText.text = this.getActiveChallenge().getDescription(); - this.descriptionText.updateText(); - } + const challenge = this.getActiveChallenge(); + const { id } = challenge; + this.setDescription(this.getActiveChallenge().getDescription()); + if (this.challengeLabels[id].value.type.toLowerCase() === "sprite") { + (this.challengeLabels[id].value as Phaser.GameObjects.Sprite).setFrame(challenge.getValue()); + } else { + (this.challengeLabels[id].value as Phaser.GameObjects.Text).setText(challenge.getValue()); + } // const totalDifficulty = this.scene.gameMode.challenges.reduce((v, c) => v + c.getDifficulty(), 0); // const totalMinDifficulty = this.scene.gameMode.challenges.reduce((v, c) => v + c.getMinDifficulty(), 0); // this.difficultyText.text = `${totalDifficulty}` + (totalMinDifficulty ? `/${totalMinDifficulty}` : ""); // this.difficultyText.updateText(); - - for (let i = 0; i < this.challengeLabels.length; i++) { - if (i + this.scrollCursor < this.scene.gameMode.challenges.length) { - this.challengeLabels[i].setVisible(true); - this.challengeValueLabels[i].setVisible(true); - this.challengeLabels[i].text = this.scene.gameMode.challenges[i + this.scrollCursor].getName(); - this.challengeValueLabels[i].text = this.scene.gameMode.challenges[i + this.scrollCursor].getValue(); - this.challengeLabels[i].updateText(); - this.challengeValueLabels[i].updateText(); - } else { - this.challengeLabels[i].setVisible(false); - this.challengeValueLabels[i].setVisible(false); - } - } } show(args: any[]): boolean { @@ -158,7 +220,7 @@ export default class GameChallengesUiHandler extends UiHandler { this.challengesContainer.setVisible(true); this.setCursor(0); - this.updateText(); + this.initLabels(); this.getUi().moveTo(this.challengesContainer, this.getUi().length - 1); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 2dd77b53ae0..34ee83b0f50 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -432,7 +432,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.valueLimitLabel.setOrigin(0.5, 0); this.starterSelectContainer.add(this.valueLimitLabel); - const startLabel = addTextObject(this.scene, 124, 162, i18next.t("starterSelectUiHandler:start"), TextStyle.TOOLTIP_CONTENT); + const startLabel = addTextObject(this.scene, 124, 162, i18next.t("common:start"), TextStyle.TOOLTIP_CONTENT); startLabel.setOrigin(0.5, 0); this.starterSelectContainer.add(startLabel); @@ -547,11 +547,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.pokemonSprite.setPipeline(this.scene.spritePipeline, { tone: [ 0.0, 0.0, 0.0, 0.0 ], ignoreTimeTint: true }); this.starterSelectContainer.add(this.pokemonSprite); - this.type1Icon = this.scene.add.sprite(8, 98, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`); this.type1Icon.setScale(0.5); + this.type1Icon = this.scene.add.sprite(8, 98, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`); + this.type1Icon.setScale(0.5); this.type1Icon.setOrigin(0, 0); this.starterSelectContainer.add(this.type1Icon); - this.type2Icon = this.scene.add.sprite(26, 98, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`); this.type2Icon.setScale(0.5); + this.type2Icon = this.scene.add.sprite(26, 98, `types${Utils.verifyLang(i18next.resolvedLanguage) ? `_${i18next.resolvedLanguage}` : ""}`); + this.type2Icon.setScale(0.5); this.type2Icon.setOrigin(0, 0); this.starterSelectContainer.add(this.type2Icon); diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 55982d049cf..75ccfc40f59 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -182,7 +182,7 @@ export default class UI extends Phaser.GameObjects.Container { } setup(): void { - this.setName("container-ui"); + this.setName(`container-ui-${Mode[this.mode]}`); for (const handler of this.handlers) { handler.setup(); }