Skip to content

Commit

Permalink
[Refactor] Default case to display challenge name (pagefaultgames#4656)
Browse files Browse the repository at this point in the history
Co-authored-by: frutescens <info@laptop>
  • Loading branch information
frutescens and frutescens authored Oct 15, 2024
1 parent 21b7159 commit d01d856
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui/run-info-ui-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,13 +587,13 @@ export default class RunInfoUiHandler extends UiHandler {
const typeText = typeTextColor + typeShadowColor + i18next.t(`pokemonInfo:Type.${typeRule}`)! + "[/color]" + "[/shadow]";
rules.push(typeText);
break;
case Challenges.FRESH_START:
rules.push(i18next.t("challenges:freshStart.name"));
break;
case Challenges.INVERSE_BATTLE:
//
rules.push(i18next.t("challenges:inverseBattle.shortName"));
break;
default:
const localisationKey = Challenges[this.runInfo.challenges[i].id].split("_").map((f, i) => i ? `${f[0]}${f.slice(1).toLowerCase()}` : f.toLowerCase()).join("");
rules.push(i18next.t(`challenges:${localisationKey}.name`));
break;
}
}
}
Expand Down

0 comments on commit d01d856

Please sign in to comment.