Skip to content

Commit

Permalink
Default translateN replace arg to undefined (#1914)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brainicism authored Mar 2, 2024
1 parent 83e5781 commit 0171839
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/helpers/localization_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class LocalizationManager {
localeOrGuildID: string,
phrase: string,
count: number,
replace: { [key: string]: string } = {},
replace: { [key: string]: string } | undefined = undefined,
): string {
if (!this.hasKey(`${phrase}_one`) || !this.hasKey(`${phrase}_other`)) {
logger.error(`Missing translation for plural phrase: ${phrase}`);
Expand Down Expand Up @@ -119,7 +119,7 @@ export class LocalizationManager {
locale: LocaleType,
phrase: string,
count: number,
replace: { [key: string]: string } = {},
replace: { [key: string]: string } | undefined = undefined,
): string {
return this.internalLocalizer.t(phrase, {
lng: locale,
Expand Down
1 change: 0 additions & 1 deletion src/structures/game_session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,6 @@ export default class GameSession extends Session {
this.guildID,
"misc.plural.suddenDeathEnd",
this.roundsPlayed - 1,
{ count: String(this.roundsPlayed - 1) },
)
: this.scoreboard.getWinnerMessage(
State.getGuildLocale(this.guildID),
Expand Down

0 comments on commit 0171839

Please sign in to comment.