pokerogue/src/test/localization/french.test.ts
Enoch 965bc687b3
[Localization] Localize terrain message and translate in Korean (#2806)
* add terrain localization and test code, change folder name

* Update src/locales/fr/weather.ts

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>

* Update src/locales/pt_BR/weather.ts

Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>

* Update src/locales/zh_CN/weather.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Update src/locales/de/weather.ts

Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>

* Update src/locales/zh_TW/weather.ts

Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>

* Use testUtil

* add missed en messages

---------

Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr>
Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br>
Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com>
Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com>
2024-07-08 10:16:55 -04:00

43 lines
1.1 KiB
TypeScript

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);
});