Skip to content

Commit

Permalink
Count for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Feiryn committed Mar 14, 2024
1 parent 9d60dde commit 340789e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Discord/src/packetHandlers/handlers/NotificationsHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ export default class NotificationsHandlers {
let time = packet.tripDuration;
let i18nTr: string;
if (time < 60) {
i18nTr = time === 1 ? "commands:report.choseMapMinutes_one" : "commands:report.choseMapMinutes_other";
i18nTr = "commands:report.choseMapMinutes";
}
else {
time = Math.round(minutesToHours(packet.tripDuration));
i18nTr = time === 1 ? "commands:report.choseMap_one" : "commands:report.choseMap_other";
i18nTr = "commands:report.choseMap";
}
embed.setDescription(i18n.t(i18nTr, {
count: time,
lng: interaction.userLanguage,
mapPrefix: i18n.t(`models:map_types.${packet.mapTypeId}.prefix`, { lng: interaction.userLanguage }),
mapType: (i18n.t(`models:map_types.${packet.mapTypeId}.name`, { lng: interaction.userLanguage }) as string).toLowerCase(),
Expand Down

0 comments on commit 340789e

Please sign in to comment.