From f016e2dbcaed4270bae2ebcbbc137ff721fc476a Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 20 Jun 2024 09:59:30 -0400 Subject: [PATCH] fix type sprites displaying wrong for languages with a hyphen (#2454) --- .../images/{types_pt_BR.json => types_pt-BR.json} | 2 +- public/images/{types_pt_BR.png => types_pt-BR.png} | Bin .../images/{types_zh_CN.json => types_zh-CN.json} | 2 +- public/images/{types_zh_CN.png => types_zh-CN.png} | Bin .../images/{types_zh_TW.json => types_zh-TW.json} | 2 +- public/images/{types_zh_TW.png => types_zh-TW.png} | Bin ...ect_pt_BR.png => summary_moves_effect_pt-BR.png} | Bin ...ect_zh_CN.png => summary_moves_effect_zh-CN.png} | Bin src/utils.ts | 6 +++--- 9 files changed, 6 insertions(+), 6 deletions(-) rename public/images/{types_pt_BR.json => types_pt-BR.json} (99%) rename public/images/{types_pt_BR.png => types_pt-BR.png} (100%) rename public/images/{types_zh_CN.json => types_zh-CN.json} (99%) rename public/images/{types_zh_CN.png => types_zh-CN.png} (100%) rename public/images/{types_zh_TW.json => types_zh-TW.json} (99%) rename public/images/{types_zh_TW.png => types_zh-TW.png} (100%) rename public/images/ui/legacy/{summary_moves_effect_pt_BR.png => summary_moves_effect_pt-BR.png} (100%) rename public/images/ui/legacy/{summary_moves_effect_zh_CN.png => summary_moves_effect_zh-CN.png} (100%) diff --git a/public/images/types_pt_BR.json b/public/images/types_pt-BR.json similarity index 99% rename from public/images/types_pt_BR.json rename to public/images/types_pt-BR.json index 932d316fd30..e89bdcba87f 100644 --- a/public/images/types_pt_BR.json +++ b/public/images/types_pt-BR.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "types_pt_BR.png", + "image": "types_pt-BR.png", "format": "RGBA8888", "size": { "w": 32, diff --git a/public/images/types_pt_BR.png b/public/images/types_pt-BR.png similarity index 100% rename from public/images/types_pt_BR.png rename to public/images/types_pt-BR.png diff --git a/public/images/types_zh_CN.json b/public/images/types_zh-CN.json similarity index 99% rename from public/images/types_zh_CN.json rename to public/images/types_zh-CN.json index 4cd0135a677..e82d3c56468 100644 --- a/public/images/types_zh_CN.json +++ b/public/images/types_zh-CN.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "types_zh_CN.png", + "image": "types_zh-CN.png", "format": "RGBA8888", "size": { "w": 32, diff --git a/public/images/types_zh_CN.png b/public/images/types_zh-CN.png similarity index 100% rename from public/images/types_zh_CN.png rename to public/images/types_zh-CN.png diff --git a/public/images/types_zh_TW.json b/public/images/types_zh-TW.json similarity index 99% rename from public/images/types_zh_TW.json rename to public/images/types_zh-TW.json index e3923b00f02..18c51ab61f4 100644 --- a/public/images/types_zh_TW.json +++ b/public/images/types_zh-TW.json @@ -1,7 +1,7 @@ { "textures": [ { - "image": "types_zh_TW.png", + "image": "types_zh-TW.png", "format": "RGBA8888", "size": { "w": 32, diff --git a/public/images/types_zh_TW.png b/public/images/types_zh-TW.png similarity index 100% rename from public/images/types_zh_TW.png rename to public/images/types_zh-TW.png diff --git a/public/images/ui/legacy/summary_moves_effect_pt_BR.png b/public/images/ui/legacy/summary_moves_effect_pt-BR.png similarity index 100% rename from public/images/ui/legacy/summary_moves_effect_pt_BR.png rename to public/images/ui/legacy/summary_moves_effect_pt-BR.png diff --git a/public/images/ui/legacy/summary_moves_effect_zh_CN.png b/public/images/ui/legacy/summary_moves_effect_zh-CN.png similarity index 100% rename from public/images/ui/legacy/summary_moves_effect_zh_CN.png rename to public/images/ui/legacy/summary_moves_effect_zh-CN.png diff --git a/src/utils.ts b/src/utils.ts index 6667d2522f5..9fe9cc9096f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -450,9 +450,9 @@ export function verifyLang(lang?: string): boolean { case "fr": case "de": case "it": - case "zh_CN": - case "zh_TW": - case "pt_BR": + case "zh-CN": + case "zh-TW": + case "pt-BR": case "ko": return true; default: