From 23f6fb17a493fbe89ca4e5197a724ea3a198a97e Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Mon, 15 Jul 2024 12:56:58 -0400 Subject: [PATCH] add art issues form and remove some leftover beta branch poison --- .github/ISSUE_TEMPLATE/art_request.md | 17 ++ src/test/lokalisation/battle-stat.test.ts | 208 -------------- src/test/lokalisation/french.test.ts | 42 --- src/test/lokalisation/status-effect.test.ts | 300 -------------------- 4 files changed, 17 insertions(+), 550 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/art_request.md delete mode 100644 src/test/lokalisation/battle-stat.test.ts delete mode 100644 src/test/lokalisation/french.test.ts delete mode 100644 src/test/lokalisation/status-effect.test.ts diff --git a/.github/ISSUE_TEMPLATE/art_request.md b/.github/ISSUE_TEMPLATE/art_request.md new file mode 100644 index 00000000000..df557462f26 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/art_request.md @@ -0,0 +1,17 @@ +--- +name: Art Request +about: Create an art request for a specific Encounter +title: "[ART]" +labels: Art +assignees: '' + +--- + +**Link to Mystery Encounter Issue/PR** + + +**Describe the Art** + + +**Additional context** + diff --git a/src/test/lokalisation/battle-stat.test.ts b/src/test/lokalisation/battle-stat.test.ts deleted file mode 100644 index d894d705947..00000000000 --- a/src/test/lokalisation/battle-stat.test.ts +++ /dev/null @@ -1,208 +0,0 @@ -import {beforeAll, describe, expect, it} from "vitest"; -import { getBattleStatName, getBattleStatLevelChangeDescription } from "#app/data/battle-stat.js"; -import { BattleStat } from "#app/data/battle-stat.js"; -import { pokemonInfo as enPokemonInfo } from "#app/locales/en/pokemon-info.js"; -import { battle as enBattleStat } from "#app/locales/en/battle.js"; -import { pokemonInfo as dePokemonInfo } from "#app/locales/de/pokemon-info.js"; -import { battle as deBattleStat } from "#app/locales/de/battle.js"; -import { pokemonInfo as esPokemonInfo } from "#app/locales/es/pokemon-info.js"; -import { battle as esBattleStat } from "#app/locales/es/battle.js"; -import { pokemonInfo as frPokemonInfo } from "#app/locales/fr/pokemon-info.js"; -import { battle as frBattleStat } from "#app/locales/fr/battle.js"; -import { pokemonInfo as itPokemonInfo } from "#app/locales/it/pokemon-info.js"; -import { battle as itBattleStat } from "#app/locales/it/battle.js"; -import { pokemonInfo as koPokemonInfo } from "#app/locales/ko/pokemon-info.js"; -import { battle as koBattleStat } from "#app/locales/ko/battle.js"; -import { pokemonInfo as ptBrPokemonInfo } from "#app/locales/pt_BR/pokemon-info.js"; -import { battle as ptBrBattleStat } from "#app/locales/pt_BR/battle.js"; -import { pokemonInfo as zhCnPokemonInfo } from "#app/locales/zh_CN/pokemon-info.js"; -import { battle as zhCnBattleStat } from "#app/locales/zh_CN/battle.js"; -import { pokemonInfo as zhTwPokemonInfo } from "#app/locales/zh_TW/pokemon-info.js"; -import { battle as zhTwBattleStat } from "#app/locales/zh_TW/battle.js"; - -import i18next, {initI18n} from "#app/plugins/i18n"; -import { KoreanPostpositionProcessor } from "i18next-korean-postposition-processor"; - -interface BattleStatTestUnit { - stat: BattleStat, - key: string -} - -interface BattleStatLevelTestUnit { - levels: integer, - up: boolean, - key: string -} - -function testBattleStatName(stat: BattleStat, expectMessage: string) { - const message = getBattleStatName(stat); - console.log(`message ${message}, expected ${expectMessage}`); - expect(message).toBe(expectMessage); -} - -function testBattleStatLevelChangeDescription(levels: integer, up: boolean, expectMessage: string) { - const message = getBattleStatLevelChangeDescription("{{pokemonNameWithAffix}}", "{{stats}}", levels, up); - console.log(`message ${message}, expected ${expectMessage}`); - expect(message).toBe(expectMessage); -} - -describe("Test for BattleStat Localization", () => { - const battleStatUnits: BattleStatTestUnit[] = []; - const battleStatLevelUnits: BattleStatLevelTestUnit[] = []; - - beforeAll(() => { - initI18n(); - - battleStatUnits.push({ stat: BattleStat.ATK, key: "Stat.ATK" }); - battleStatUnits.push({ stat: BattleStat.DEF, key: "Stat.DEF" }); - battleStatUnits.push({ stat: BattleStat.SPATK, key: "Stat.SPATK" }); - battleStatUnits.push({ stat: BattleStat.SPDEF, key: "Stat.SPDEF" }); - battleStatUnits.push({ stat: BattleStat.SPD, key: "Stat.SPD" }); - battleStatUnits.push({ stat: BattleStat.ACC, key: "Stat.ACC" }); - battleStatUnits.push({ stat: BattleStat.EVA, key: "Stat.EVA" }); - - battleStatLevelUnits.push({ levels: 1, up: true, key: "statRose" }); - battleStatLevelUnits.push({ levels: 2, up: true, key: "statSharplyRose" }); - battleStatLevelUnits.push({ levels: 3, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 4, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 5, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 6, up: true, key: "statRoseDrastically" }); - battleStatLevelUnits.push({ levels: 7, up: true, key: "statWontGoAnyHigher" }); - battleStatLevelUnits.push({ levels: 1, up: false, key: "statFell" }); - battleStatLevelUnits.push({ levels: 2, up: false, key: "statHarshlyFell" }); - battleStatLevelUnits.push({ levels: 3, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 4, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 5, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 6, up: false, key: "statSeverelyFell" }); - battleStatLevelUnits.push({ levels: 7, up: false, key: "statWontGoAnyLower" }); - }); - - it("Test getBattleStatName() in English", async () => { - i18next.changeLanguage("en"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, enPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in English", async () => { - i18next.changeLanguage("en"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, enBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in Español", async () => { - i18next.changeLanguage("es"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, esPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Español", async () => { - i18next.changeLanguage("es"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, esBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in Italiano", async () => { - i18next.changeLanguage("it"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, itPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Italiano", async () => { - i18next.changeLanguage("it"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, itBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in Français", async () => { - i18next.changeLanguage("fr"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, frPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Français", async () => { - i18next.changeLanguage("fr"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, frBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in Deutsch", async () => { - i18next.changeLanguage("de"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, dePokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Deutsch", async () => { - i18next.changeLanguage("de"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, deBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in Português (BR)", async () => { - i18next.changeLanguage("pt-BR"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, ptBrPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in Português (BR)", async () => { - i18next.changeLanguage("pt-BR"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, ptBrBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in 简体中文", async () => { - i18next.changeLanguage("zh-CN"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, zhCnPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 简体中文", async () => { - i18next.changeLanguage("zh-CN"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhCnBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in 繁體中文", async () => { - i18next.changeLanguage("zh-TW"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, zhTwPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 繁體中文", async () => { - i18next.changeLanguage("zh-TW"); - battleStatLevelUnits.forEach(unit => { - testBattleStatLevelChangeDescription(unit.levels, unit.up, zhTwBattleStat[unit.key]); - }); - }); - - it("Test getBattleStatName() in 한국어", async () => { - await i18next.changeLanguage("ko"); - battleStatUnits.forEach(unit => { - testBattleStatName(unit.stat, koPokemonInfo[unit.key.split(".")[0]][unit.key.split(".")[1]]); - }); - }); - - it("Test getBattleStatLevelChangeDescription() in 한국어", async () => { - i18next.changeLanguage("ko", () => { - battleStatLevelUnits.forEach(unit => { - const processor = new KoreanPostpositionProcessor(); - const message = processor.process(koBattleStat[unit.key]); - testBattleStatLevelChangeDescription(unit.levels, unit.up, message); - }); - }); - }); -}); diff --git a/src/test/lokalisation/french.test.ts b/src/test/lokalisation/french.test.ts deleted file mode 100644 index 45429b1b157..00000000000 --- a/src/test/lokalisation/french.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {afterEach, beforeAll, describe, expect, it} from "vitest"; -import Phaser from "phaser"; -import GameManager from "#app/test/utils/gameManager"; -import {Species} from "#enums/species"; -import i18next from "i18next"; -import {initI18n} from "#app/plugins/i18n"; - -describe("Lokalization - french", () => { - let phaserGame: Phaser.Game; - let game: GameManager; - - beforeAll(() => { - initI18n(); - phaserGame = new Phaser.Game({ - type: Phaser.HEADLESS, - }); - }); - - afterEach(() => { - game.phaseInterceptor.restoreOg(); - }); - - it("test bulbasaur name english", async () => { - game = new GameManager(phaserGame); - await game.startBattle([ - Species.BULBASAUR, - ]); - expect(game.scene.getParty()[0].name).toBe("Bulbasaur"); - }, 20000); - - it("test bulbasaure name french", async () => { - const locale = "fr"; - i18next.changeLanguage(locale); - localStorage.setItem("prLang", locale); - game = new GameManager(phaserGame); - - await game.startBattle([ - Species.BULBASAUR, - ]); - expect(game.scene.getParty()[0].name).toBe("Bulbizarre"); - }, 20000); -}); diff --git a/src/test/lokalisation/status-effect.test.ts b/src/test/lokalisation/status-effect.test.ts deleted file mode 100644 index ad33a59a675..00000000000 --- a/src/test/lokalisation/status-effect.test.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { beforeAll, describe, afterEach, expect, it, vi } from "vitest"; -import { - StatusEffect, - getStatusEffectActivationText, - getStatusEffectDescriptor, - getStatusEffectHealText, - getStatusEffectObtainText, - getStatusEffectOverlapText, -} from "#app/data/status-effect"; -import i18next from "i18next"; -import { mockI18next } from "../utils/testUtils"; - -const pokemonName = "PKM"; -const sourceText = "SOURCE"; - -describe("status-effect", () => { - beforeAll(() => { - i18next.init(); - }); - - describe("NONE", () => { - const statusEffect = StatusEffect.NONE; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:none.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:none.obtain"); - }); - - it("should return the source-obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName, sourceText); - expect(text).toBe("statusEffect:none.obtainSource"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).not.toBe("statusEffect:none.obtainSource"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:none.activation"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:none.overlap"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:none.heal"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:none.description"); - }); - }); - - describe("POISON", () => { - const statusEffect = StatusEffect.POISON; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:poison.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:poison.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:poison.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:poison.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:poison.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:poison.overlap"); - }); - }); - - describe("TOXIC", () => { - const statusEffect = StatusEffect.TOXIC; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:toxic.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:toxic.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:toxic.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:toxic.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:toxic.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:toxic.overlap"); - }); - }); - - describe("PARALYSIS", () => { - const statusEffect = StatusEffect.PARALYSIS; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:paralysis.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:paralysis.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:paralysis.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:paralysis.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:paralysis.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:paralysis.overlap"); - }); - }); - - describe("SLEEP", () => { - const statusEffect = StatusEffect.SLEEP; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:sleep.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:sleep.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:sleep.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:sleep.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:sleep.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:sleep.overlap"); - }); - }); - - describe("FREEZE", () => { - const statusEffect = StatusEffect.FREEZE; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:freeze.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:freeze.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:freeze.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:freeze.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:freeze.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:freeze.overlap"); - }); - }); - - describe("BURN", () => { - const statusEffect = StatusEffect.BURN; - - it("should return the obtain text", () => { - mockI18next(); - - const text = getStatusEffectObtainText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:burn.obtain"); - - const emptySourceText = getStatusEffectObtainText(statusEffect, pokemonName, ""); - expect(emptySourceText).toBe("statusEffect:burn.obtain"); - }); - - it("should return the activation text", () => { - mockI18next(); - const text = getStatusEffectActivationText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:burn.activation"); - }); - - it("should return the descriptor", () => { - mockI18next(); - const text = getStatusEffectDescriptor(statusEffect); - expect(text).toBe("statusEffect:burn.description"); - }); - - it("should return the heal text", () => { - mockI18next(); - const text = getStatusEffectHealText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:burn.heal"); - }); - - it("should return the overlap text", () => { - mockI18next(); - const text = getStatusEffectOverlapText(statusEffect, pokemonName); - expect(text).toBe("statusEffect:burn.overlap"); - }); - }); - - afterEach(() => { - vi.resetAllMocks(); - }); -});