From 12433b78e5d11af423276f7bc6a5af6234de4582 Mon Sep 17 00:00:00 2001 From: Lugiad Date: Fri, 1 Aug 2025 00:13:05 +0200 Subject: [PATCH] [i18n] Add Tagalog language support (#6170) --- public/images/statuses_tl.json | 188 ++++++++ public/images/statuses_tl.png | Bin 0 -> 419 bytes public/images/types_tl.json | 440 ++++++++++++++++++ public/images/types_tl.png | Bin 0 -> 1861 bytes public/locales | 2 +- src/plugins/i18n.ts | 5 +- src/system/settings/settings.ts | 4 + .../settings/settings-display-ui-handler.ts | 6 + src/ui/starter-select-ui-handler.ts | 4 + src/utils/common.ts | 1 + 10 files changed, 647 insertions(+), 3 deletions(-) create mode 100644 public/images/statuses_tl.json create mode 100644 public/images/statuses_tl.png create mode 100644 public/images/types_tl.json create mode 100644 public/images/types_tl.png diff --git a/public/images/statuses_tl.json b/public/images/statuses_tl.json new file mode 100644 index 00000000000..094b0188d69 --- /dev/null +++ b/public/images/statuses_tl.json @@ -0,0 +1,188 @@ +{ + "textures": [ + { + "image": "statuses_tl.png", + "format": "RGBA8888", + "size": { + "w": 22, + "h": 64 + }, + "scale": 1, + "frames": [ + { + "filename": "pokerus", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 22, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + }, + "frame": { + "x": 0, + "y": 0, + "w": 22, + "h": 8 + } + }, + { + "filename": "burn", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 8, + "w": 20, + "h": 8 + } + }, + { + "filename": "faint", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 16, + "w": 20, + "h": 8 + } + }, + { + "filename": "freeze", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 24, + "w": 20, + "h": 8 + } + }, + { + "filename": "paralysis", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 32, + "w": 20, + "h": 8 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 40, + "w": 20, + "h": 8 + } + }, + { + "filename": "sleep", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 48, + "w": 20, + "h": 8 + } + }, + { + "filename": "toxic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 20, + "h": 8 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 20, + "h": 8 + }, + "frame": { + "x": 0, + "y": 56, + "w": 20, + "h": 8 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:37686e85605d17b806f22d43081c1139:70535ffee63ba61b3397d8470c2c8982:e6649238c018d3630e55681417c698ca$" + } +} diff --git a/public/images/statuses_tl.png b/public/images/statuses_tl.png new file mode 100644 index 0000000000000000000000000000000000000000..9f24c6a0810ebd6ca4ecbc752e77f3ec43243352 GIT binary patch literal 419 zcmV;U0bKrxP)==ukM|a8Nin zUPJ%@00eYWPE!B?006U-W|{y10T@X{K~#8Nt<&3%!!QU0P|{BB?Oy)>XLlHZ&|-O? z77^o|xPexx+5R!aE(Jiy3b+%Xj0#nYQ;qgTfCQL zafK2f0dh0#$wV#g)>xQK^Mo53x0k48NVYV23+eOq)#CLeyMieJv6KQ@%*&1 zc+zq{psja{H5E#zKyFk5IS_=#cjI^f_s%l$&{Dk42ejj}#SsdC0B9HPz^sMvH^=9p zT`{kI`WX3`4>ofVQ12wp0KoSh%Enl@*`= z#hX}t{ql925BM0r&Vx+71Q&}ke{ZqmViJnwBiH%j#A3B%w3d?re*h(mIE1ye$|wK; N002ovPDHLkV1kAS!6N_w literal 0 HcmV?d00001 diff --git a/public/images/types_tl.json b/public/images/types_tl.json new file mode 100644 index 00000000000..2706c6f49f3 --- /dev/null +++ b/public/images/types_tl.json @@ -0,0 +1,440 @@ +{ + "textures": [ + { + "image": "types_tl.png", + "format": "RGBA8888", + "size": { + "w": 32, + "h": 280 + }, + "scale": 1, + "frames": [ + { + "filename": "unknown", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + } + }, + { + "filename": "bug", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 14, + "w": 32, + "h": 14 + } + }, + { + "filename": "dark", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 28, + "w": 32, + "h": 14 + } + }, + { + "filename": "dragon", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 42, + "w": 32, + "h": 14 + } + }, + { + "filename": "electric", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 56, + "w": 32, + "h": 14 + } + }, + { + "filename": "fairy", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 70, + "w": 32, + "h": 14 + } + }, + { + "filename": "fighting", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 84, + "w": 32, + "h": 14 + } + }, + { + "filename": "fire", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 98, + "w": 32, + "h": 14 + } + }, + { + "filename": "flying", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 112, + "w": 32, + "h": 14 + } + }, + { + "filename": "ghost", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 126, + "w": 32, + "h": 14 + } + }, + { + "filename": "grass", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 140, + "w": 32, + "h": 14 + } + }, + { + "filename": "ground", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 154, + "w": 32, + "h": 14 + } + }, + { + "filename": "ice", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 168, + "w": 32, + "h": 14 + } + }, + { + "filename": "normal", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 182, + "w": 32, + "h": 14 + } + }, + { + "filename": "poison", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 196, + "w": 32, + "h": 14 + } + }, + { + "filename": "psychic", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 210, + "w": 32, + "h": 14 + } + }, + { + "filename": "rock", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 224, + "w": 32, + "h": 14 + } + }, + { + "filename": "steel", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 238, + "w": 32, + "h": 14 + } + }, + { + "filename": "water", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 252, + "w": 32, + "h": 14 + } + }, + { + "filename": "stellar", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 32, + "h": 14 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 32, + "h": 14 + }, + "frame": { + "x": 0, + "y": 266, + "w": 32, + "h": 14 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:f14cf47d9a8f1d40c8e03aa6ba00fff3:6fc4227b57a95d429a1faad4280f7ec8:5961efbfbf4c56b8745347e7a663a32f$" + } +} diff --git a/public/images/types_tl.png b/public/images/types_tl.png new file mode 100644 index 0000000000000000000000000000000000000000..b9fdceba7da236067f326c6ae0411d21ecc3aca6 GIT binary patch literal 1861 zcmV-L2fFx)P)w(#bTLPPF?g0TJzF&)W;aGAIh_AGV0S+vJ3(AuL^4fDElo&gWl5En=CyV`H^s7$9UM5@tAf zXfp?BNC0zCdw3yLdq{hG&Qg3B7=fm~gQZ%LLCcg-i=3_ZrBXSqrIfCEJG%e2y`@^c z!T-L{sLQ$k%;5jcUA@h+O4#N9<<_9+;Q#5mjP5u}?o}!8L3!_R@9&lW^z+{JL&|9_&Ef3f1>&ZhtW|NsBSF=(KWb6QHX@AnA+000DZQchC<00029lV+L#00qrS zL_t(|Uc8T4Zp1JQLy4Ia%3Ee_d;e3EQDO*g1@^BG6l22=F$_EJ z?G(5z?pX06tFX(bu$AHmzFvhwg+tYglL*_qBK?D(%@g1LeuZC?y~5c%oVg7_fue?r*X5*;aT1UVdHqv4afmw?wAuLy9LSD@IiV(Quc+FP~!iq1) z%R}K0Ftjj$Ap!7~@ccva220|CRpuz0Yc5iuGUmgCz|CTvix75sy~0TThsYw(h$|u? zxU)|#)av0Z2|nI_&{UEwux5ir$@|wkLwHc4G?+ zig8MPS%4RY2L>>#0Nky(f3v!SVMQQ%nw5_1LXCi&I?Y#IIf2~iXLV%(+G)E2!6=~j zKR}(JuP`SncqZck^iD6aJ_&fCd!Pf|3c$A&_n%hZU|2nXh{84-=emXXsh zphc4_7C0=&>X(12zI;N6P*7pr$LtP+TW zzTzB%4{HIa1z^era9RMq@_OQ5fFrU(tDGJH+jN$OoG!o%hX)Seu=?S9jFB4(VIaC` zD5z@eEv=gpbe^Cg$Oo3MW}c^8JsC;)*M0uKfdG65l+Cfvp})o>5o{#beGmyIBJyU!{C0bI;6y~PT@xEa?SuKz01D1$&&`XtCQ6$q*ZWr+%P z+wQPjCc>41l0%K>w#APfXQ#qdMB4=gGDF=v$|zLTVlr7ws;Vl>*=*Lf7zMRd!Np%{~g5QHxY$a-t%-rTob~bzRE`&F;ShLE)A900000NkvXXu0mjf9426$ literal 0 HcmV?d00001 diff --git a/public/locales b/public/locales index 5784dda3ac3..7898c0018a7 160000 --- a/public/locales +++ b/public/locales @@ -1 +1 @@ -Subproject commit 5784dda3ac3aff7f84878888ce8f6ed5443bfd88 +Subproject commit 7898c0018a70601a6ead76c9dd497ff966cc2e2a diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 89946b2691b..62fc73a10a3 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -79,13 +79,13 @@ const fonts: Array = [ face: new FontFace("emerald", "url(./fonts/pokemon-bw.ttf)", { unicodeRange: rangesByLanguage.japanese, }), - only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru"], + only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"], }, { face: new FontFace("pkmnems", "url(./fonts/pokemon-bw.ttf)", { unicodeRange: rangesByLanguage.japanese, }), - only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru"], + only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru", "tl"], }, ]; @@ -191,6 +191,7 @@ export async function initI18n(): Promise { "tr", "ro", "ru", + "tl", ], backend: { loadPath(lng: string, [ns]: string[]) { diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 33087f2509e..32d9e0ee2be 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -981,6 +981,10 @@ export function setSetting(setting: string, value: number): boolean { label: "Română (Needs Help)", handler: () => changeLocaleHandler("ro"), }, + { + label: "Tagalog (Needs Help)", + handler: () => changeLocaleHandler("tl"), + }, { label: i18next.t("settings:back"), handler: () => cancelHandler(), diff --git a/src/ui/settings/settings-display-ui-handler.ts b/src/ui/settings/settings-display-ui-handler.ts index 3c261d6ddab..1a0481b8e8d 100644 --- a/src/ui/settings/settings-display-ui-handler.ts +++ b/src/ui/settings/settings-display-ui-handler.ts @@ -117,6 +117,12 @@ export class SettingsDisplayUiHandler extends AbstractSettingsUiHandler { label: "Română (Needs Help)", }; break; + case "tl": + this.settings[languageIndex].options[0] = { + value: "Tagalog", + label: "Tagalog (Needs Help)", + }; + break; default: this.settings[languageIndex].options[0] = { value: "English", diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 974f24e706f..6929d6f818d 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -176,6 +176,10 @@ const languageSettings: { [key: string]: LanguageSetting } = { starterInfoYOffset: 0.5, starterInfoXPos: 26, }, + tl: { + starterInfoTextSize: "56px", + instructionTextSize: "38px", + }, }; const valueReductionMax = 2; diff --git a/src/utils/common.ts b/src/utils/common.ts index 66a74ed2c33..1c75dac93b4 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -436,6 +436,7 @@ export function hasAllLocalizedSprites(lang?: string): boolean { case "ja": case "ca": case "ru": + case "tl": return true; default: return false;