This commit is contained in:
G Sai Nikhilesh 2025-08-15 19:31:10 +00:00 committed by GitHub
commit 2089ebd8ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 2 deletions

@ -1 +1 @@
Subproject commit ab2716d5440c25f73986664aa3f3131821c3c392
Subproject commit 1396c8af00894ec866eb940dd8f17e6044e34f3c

View File

@ -1,7 +1,9 @@
import { loggedInUser } from "#app/account";
import { globalScene } from "#app/global-scene";
import { speciesStarterCosts } from "#balance/starters";
import { Button } from "#enums/buttons";
import { DexAttr } from "#enums/dex-attr";
import { PlayerGender } from "#enums/player-gender";
import { TextStyle } from "#enums/text-style";
import { UiTheme } from "#enums/ui-theme";
import type { GameData } from "#system/game-data";
@ -316,7 +318,19 @@ export class GameStatsUiHandler extends UiHandler {
const headerBg = addWindow(0, 0, sWidth - 2, 24).setOrigin(0);
const headerText = addTextObject(0, 0, i18next.t("gameStatsUiHandler:stats"), TextStyle.HEADER_LABEL)
const usernameReplacement =
globalScene.gameData.gender === PlayerGender.FEMALE
? i18next.t("trainerNames:player_f")
: i18next.t("trainerNames:player_m");
const displayName = !globalScene.hideUsername ? (loggedInUser?.username ?? "Guest") : usernameReplacement;
const headerText = addTextObject(
0,
0,
`${i18next.t("gameStatsUiHandler:statsFor", { username: displayName })}`,
TextStyle.HEADER_LABEL,
)
.setOrigin(0)
.setPositionRelative(headerBg, 8, 4);