fix(i18n): localize admin recovery states

This commit is contained in:
cesnimda
2026-08-29 23:40:29 +02:00
parent 10ce0f2086
commit cf6509ce13
7 changed files with 125 additions and 42 deletions
@@ -79,9 +79,9 @@ export default function SettingsView({
let active = true;
api.get<NotificationPrefs>("/notification-settings")
.then(({ data }) => { if (active) setNotificationPrefs(data); })
.catch((error) => { if (active) setNotificationError(getApiErrorMessage(error, "Notification settings could not be loaded.")); });
.catch((error) => { if (active) setNotificationError(getApiErrorMessage(error, t("settingsNotificationsLoadFailed"))); });
return () => { active = false; };
}, []);
}, [t]);
const saveNotifications = async () => {
if (!notificationPrefs) return;
@@ -90,9 +90,9 @@ export default function SettingsView({
try {
const { data } = await api.put<NotificationPrefs>("/notification-settings", notificationPrefs);
setNotificationPrefs(data);
toast("Notification settings saved.", "success");
toast(t("settingsNotificationsSaved"), "success");
} catch (error) {
setNotificationError(getApiErrorMessage(error, "Notification settings could not be saved."));
setNotificationError(getApiErrorMessage(error, t("settingsNotificationsSaveFailed")));
} finally { setSavingNotifications(false); }
};