Added all the strings in locale file for gb.
This commit is contained in:
1 parent
6ba52156b8
commit
17dcdfcb06
2 files changed
+8
-4
No files matched your search
@@ -2,11 +2,13 @@ import { useState } from "react";
|
|||||||
import { networkService } from "../main";
|
import { networkService } from "../main";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { createToast } from "../Utils/toastUtils";
|
import { createToast } from "../Utils/toastUtils";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const useSendTestEmail = () => {
|
const useSendTestEmail = () => {
|
||||||
const [isSending, setIsSending] = useState(false);
|
const [isSending, setIsSending] = useState(false);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
const user = useSelector((state) => state.auth.user);
|
const user = useSelector((state) => state.auth.user);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const sendTestEmail = async () => {
|
const sendTestEmail = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -16,14 +18,14 @@ const useSendTestEmail = () => {
|
|||||||
const response = await networkService.sendTestEmail({ to: user.email });
|
const response = await networkService.sendTestEmail({ to: user.email });
|
||||||
if (typeof response?.data?.data?.messageId !== "undefined") {
|
if (typeof response?.data?.data?.messageId !== "undefined") {
|
||||||
createToast({
|
createToast({
|
||||||
body: "Test email sent successfully",
|
body: t("emailSent"),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Failed to send test email");
|
throw new Error(t("failedToSendEmail"));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
createToast({
|
createToast({
|
||||||
body: "Failed to send test email",
|
body: t("failedToSendEmail"),
|
||||||
});
|
});
|
||||||
setError(error);
|
setError(error);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -537,5 +537,7 @@
|
|||||||
"saving": "Saving..."
|
"saving": "Saving..."
|
||||||
},
|
},
|
||||||
"uptimeCreateSelectURL": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
|
"uptimeCreateSelectURL": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
|
||||||
"sendTestEmail": "Send test email"
|
"sendTestEmail": "Send test email",
|
||||||
|
"emailSent": "Email sent successfully",
|
||||||
|
"failedToSendEmail": "Failed to send email"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user