[Localization] Fixed the localization of getModeName and "Wave" text (#1953)

* localized getModeName

* wave fix
This commit is contained in:
José Ricardo Fleury Oliveira 2024-06-08 12:28:45 -03:00 committed by GitHub
parent 7cee16cee2
commit 480a2568a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -285,15 +285,15 @@ export class GameMode implements GameModeConfig {
static getModeName(modeId: GameModes): string { static getModeName(modeId: GameModes): string {
switch (modeId) { switch (modeId) {
case GameModes.CLASSIC: case GameModes.CLASSIC:
return "Classic"; return i18next.t("gameMode:classic");
case GameModes.ENDLESS: case GameModes.ENDLESS:
return "Endless"; return i18next.t("gameMode:endless");
case GameModes.SPLICED_ENDLESS: case GameModes.SPLICED_ENDLESS:
return "Endless (Spliced)"; return i18next.t("gameMode:endlessSpliced");
case GameModes.DAILY: case GameModes.DAILY:
return "Daily Run"; return i18next.t("gameMode:dailyRun");
case GameModes.CHALLENGE: case GameModes.CHALLENGE:
return "Challenge"; return i18next.t("gameMode:challenge");
} }
} }
} }

View File

@ -266,7 +266,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
async setupWithData(data: SessionSaveData) { async setupWithData(data: SessionSaveData) {
this.remove(this.loadingLabel, true); this.remove(this.loadingLabel, true);
const gameModeLabel = addTextObject(this.scene, 8, 5, `${GameMode.getModeName(data.gameMode) || i18next.t("gameMode:unkown")} - ${i18next.t("gameMode:wave")} ${data.waveIndex}`, TextStyle.WINDOW); const gameModeLabel = addTextObject(this.scene, 8, 5, `${GameMode.getModeName(data.gameMode) || i18next.t("gameMode:unkown")} - ${i18next.t("saveSlotSelectUiHandler:wave")} ${data.waveIndex}`, TextStyle.WINDOW);
this.add(gameModeLabel); this.add(gameModeLabel);
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW); const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);