feat: add language localization and refactor to remove duplicate ternary op

This commit is contained in:
Amol committed 2025-07-03 01:26:33 +05:30
1 parent 0e8a71c760
commit e2e1eff289
12 files changed
+14 -7

No files matched your search

@@ -43,6 +43,8 @@ const MonitorDetailsControlHeader = ({
const isTestNotificationsDisabled = monitor?.notifications?.length === 0; const isTestNotificationsDisabled = monitor?.notifications?.length === 0;
const tooltipTitle = isTestNotificationsDisabled ? t("testNotificationsDisabled") : "";
// const [isSending, emailError, sendTestEmail] = useSendTestEmail(); // const [isSending, emailError, sendTestEmail] = useSendTestEmail();
const [testAllNotifications, isSending, errorAllNotifications] = const [testAllNotifications, isSending, errorAllNotifications] =
@@ -66,13 +68,7 @@ const MonitorDetailsControlHeader = ({
<Tooltip <Tooltip
key={monitor?._id} key={monitor?._id}
placement="bottom" placement="bottom"
title={ title={tooltipTitle}
isTestNotificationsDisabled
? t(
'There are no notifications setup for this monitor. You need to add one by clicking "Configure" button'
)
: ""
}
> >
<span> <span>
<Button <Button
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -826,6 +826,7 @@
"teamMembers": "Team members" "teamMembers": "Team members"
}, },
"testLocale": "testLocale", "testLocale": "testLocale",
"testNotificationsDisabled": "There are no notifications setup for this monitor. You need to add one by clicking 'Configure' button",
"timeZoneInfo": "All dates and times are in GMT+0 time zone.", "timeZoneInfo": "All dates and times are in GMT+0 time zone.",
"timezone": "Timezone", "timezone": "Timezone",
"title": "Title", "title": "Title",
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "Bildirimleri dene", "sendTestNotifications": "Bildirimleri dene",
"testNotificationsDisabled": "",
"selectAll": "Tümünü seç", "selectAll": "Tümünü seç",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {
+1
View File
@@ -690,6 +690,7 @@
}, },
"advancedMatching": "", "advancedMatching": "",
"sendTestNotifications": "", "sendTestNotifications": "",
"testNotificationsDisabled": "",
"selectAll": "", "selectAll": "",
"showAdminLoginLink": "", "showAdminLoginLink": "",
"logsPage": { "logsPage": {