feat: i18n

This commit is contained in:
Zamitto
2024-10-31 13:11:52 -03:00
parent 9ee4e2e29b
commit 9189541c3a
3 changed files with 11 additions and 5 deletions

View File

@@ -102,7 +102,7 @@ export const publishCombinedNewAchievementNotification = async (
: icon;
const options: NotificationOptions = {
title: "New achievement unlocked",
title: t("achievement_unlocked", { ns: "achievement" }),
body: t("new_achievements_unlocked", {
ns: "achievement",
gameCount,
@@ -129,7 +129,7 @@ export const publishNewAchievementNotification = async (achievement: {
const iconPath = await downloadImage(achievement.achievementIcon);
const options: NotificationOptions = {
title: "New achievement unlocked",
title: t("achievement_unlocked", { ns: "achievement" }),
body: achievement.displayName,
icon: iconPath,
silent: true,
@@ -137,7 +137,11 @@ export const publishNewAchievementNotification = async (achievement: {
value:
achievement.unlockedAchievementCount /
achievement.totalAchievementCount,
valueOverride: `${achievement.unlockedAchievementCount}/${achievement.totalAchievementCount} achievements`,
valueOverride: t("achievement_progress", {
ns: "achievement",
unlockedCount: achievement.unlockedAchievementCount,
totalCount: achievement.totalAchievementCount,
}),
},
};