Compare commits

...

2 Commits

Author SHA1 Message Date
fabske0
7dfe1ce216 change bgm name locales use 2025-08-11 17:49:56 +02:00
fabske0
1accc20b37 Change berry locales use 2025-08-11 11:47:20 +02:00
2 changed files with 4 additions and 4 deletions

View File

@ -11,11 +11,11 @@ import { NumberHolder, randSeedInt, toDmgValue } from "#utils/common";
import i18next from "i18next"; import i18next from "i18next";
export function getBerryName(berryType: BerryType): string { export function getBerryName(berryType: BerryType): string {
return i18next.t(`berry:${BerryType[berryType]}.name`); return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.name`);
} }
export function getBerryEffectDescription(berryType: BerryType): string { export function getBerryEffectDescription(berryType: BerryType): string {
return i18next.t(`berry:${BerryType[berryType]}.effect`); return i18next.t(`berry:${BerryType[berryType].toLowerCase()}.effect`);
} }
export type BerryPredicate = (pokemon: Pokemon) => boolean; export type BerryPredicate = (pokemon: Pokemon) => boolean;

View File

@ -1,7 +1,7 @@
import { globalScene } from "#app/global-scene"; import { globalScene } from "#app/global-scene";
import { TextStyle } from "#enums/text-style"; import { TextStyle } from "#enums/text-style";
import { addTextObject } from "#ui/text"; import { addTextObject } from "#ui/text";
import { toTitleCase } from "#utils/strings"; import { toCamelCase, toTitleCase } from "#utils/strings";
import i18next from "i18next"; import i18next from "i18next";
const hiddenX = -150; const hiddenX = -150;
@ -100,7 +100,7 @@ export class BgmBar extends Phaser.GameObjects.Container {
} }
getRealBgmName(bgmName: string): string { getRealBgmName(bgmName: string): string {
return i18next.t([`bgmName:${bgmName}`, "bgmName:missing_entries"], { return i18next.t([`bgmName:${toCamelCase(bgmName)}`, "bgmName:missingEntries"], {
name: toTitleCase(bgmName), name: toTitleCase(bgmName),
}); });
} }