diff --git a/client/src/components/AlertModals.jsx b/client/src/components/AlertModals.jsx index 78cde0d..7d1cfd4 100644 --- a/client/src/components/AlertModals.jsx +++ b/client/src/components/AlertModals.jsx @@ -2,10 +2,12 @@ import React, { useState, useEffect } from 'react'; import api from '../services/api'; import { format } from 'date-fns'; import { formatFrequency } from '../utils/formatFrequency'; +import { useTranslation } from '../utils/tempTranslations'; import { XMarkIcon } from '@heroicons/react/24/outline'; // Edit Alert Rule Modal export const EditAlertModal = ({ rule, onClose, onSuccess }) => { + const { t } = useTranslation(); const [formData, setFormData] = useState({ name: '', description: '', @@ -104,7 +106,7 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => { onClose(); } catch (error) { console.error('Error updating alert rule:', error); - alert('Failed to update alert rule'); + alert(t('alerts.form.updateFailed')); } finally { setSaving(false); } @@ -114,7 +116,7 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => {
-

Edit Alert Rule

+

{t('alerts.form.editAlertRule')}