From 980f055d5c951fa737f16b337ff26108b95e41c5 Mon Sep 17 00:00:00 2001 From: Skorpios Date: Sun, 23 Mar 2025 21:13:49 -0700 Subject: [PATCH] Extracted strings. --- .../Components/NotificationIntegrationModal.jsx | 4 ++-- src/locales/gb.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Components/NotificationIntegrationModal/Components/NotificationIntegrationModal.jsx b/src/Components/NotificationIntegrationModal/Components/NotificationIntegrationModal.jsx index 7806ee37e..93a4cf75b 100644 --- a/src/Components/NotificationIntegrationModal/Components/NotificationIntegrationModal.jsx +++ b/src/Components/NotificationIntegrationModal/Components/NotificationIntegrationModal.jsx @@ -49,11 +49,11 @@ const NotificationIntegrationModal = ({ // Helper to get the field state key with error handling const getFieldKey = (typeId, fieldId) => { if (typeof typeId !== 'string' || typeId === '') { - throw new Error('Invalid typeId provided to getFieldKey'); + throw new Error(t('errorInvalidTypeId')); } if (typeof fieldId !== 'string' || fieldId === '') { - throw new Error('Invalid fieldId provided to getFieldKey'); + throw new Error(t('errorInvalidFieldId')); } return `${typeId}${fieldId.charAt(0).toUpperCase() + fieldId.slice(1)}`; diff --git a/src/locales/gb.json b/src/locales/gb.json index 4bf9c4814..05a4bdc8e 100644 --- a/src/locales/gb.json +++ b/src/locales/gb.json @@ -184,6 +184,8 @@ "unsupportedType": "Unsupported notification type", "networkError": "Network error occurred" }, + "errorInvalidTypeId": "Invalid notification type provided", + "errorInvalidFieldId": "Invalid field ID provided", "testLocale": "testLocale", "add": "Add", "monitors": "monitors",