diff --git a/packages/client/public/locales/en/Webhooks.json b/packages/client/public/locales/en/Webhooks.json
new file mode 100644
index 0000000000..f1a472b4b0
--- /dev/null
+++ b/packages/client/public/locales/en/Webhooks.json
@@ -0,0 +1,68 @@
+{
+ "Webhook": "Webhook",
+ "Webhooks": "Webhooks",
+ "CreateWebhook": "Create webhook",
+ "WebhooksInfo": "Use webhooks to perform custom actions on the side of any application or website you are using based on various events in ONLYOFFICE Docspace.\r\nHere, you can create and manage all your webhooks, configure them, and browse history of every webhook to audit their performance.",
+ "WebhooksGuide": "Webhooks guide",
+ "WebhookCreationHint": "This webhook will be assigned to all events in DocSpace",
+ "WebhookName": "Webhook name",
+ "EnterWebhookName": "Enter webhook name",
+ "PayloadUrl": "Payload URL",
+ "EnterUrl": "Enter URL",
+ "SSLVerification": "SSL verification",
+ "SSLHint": "By default, we verify SSL certificates when delivering payloads.",
+ "EnableSSL": "Enable SSL verification",
+ "DisableSSL": "Disable (not recommended)",
+ "EnterSecretKey": "Enter secret key",
+ "SecretKey": "Secret key",
+ "SecretKeyHint": "Setting a webhook secret allows you to verify requests sent to the payload URL.",
+ "ReadMore": "Read more",
+ "SecretKeyWarning": "You cannot retrieve your secret key again once it has been saved. If you've lost or forgotten this secret key, you can reset it, but all integrations using this secret will need to be updated.",
+ "ResetKey": "Reset key",
+ "Generate": "Generate",
+ "Save": "Save",
+ "Cancel": "Cancel",
+ "DeleteHint": "The webhook will be deleted permanently.\r\nYou will not be able to undo this action.",
+ "DeleteForever": "Delete forever",
+ "NotSent": "Not sent",
+ "WebhookEditedSuccessfully": "Webhook configuration edited successfully",
+ "WebhookRemoved": "Webhook removed",
+ "WebhookHistory": "Webhook history",
+ "DeleteWebhook": "Delete webhook",
+ "SettingsWebhook": "Settings webhook",
+ "DeleteWebhookForeverQuestion": "Delete Webhook forever?",
+ "URL": "URL",
+ "State": "State",
+ "WebhookRedilivered": "Webhook redelivered",
+ "WebhookDetails": "Webhooks details",
+ "Request": "Request",
+ "Response": "Response",
+ "FailedToConnect": "We couldn’t deliver this payload: failed to connect to host",
+ "RequestPostHeader": "Request post header",
+ "RequestPostBody": "Request post body",
+ "RequestHeaderCopied": "Request post header successfully copied to clipboard",
+ "RequestBodyCopied": "Request post body successfully copied to clipboard",
+ "ResponsePostHeader": "Response post header",
+ "ResponsePostBody": "Response post body",
+ "ResponseHeaderCopied": "Response post header successfully copied to clipboard",
+ "ResponseBodyCopied": "Response post body successfully copied to clipboard",
+ "PayloadIsTooLarge": "Payload is too large to display.",
+ "ViewRawPayload": "View raw payload",
+ "Retry": "Retry",
+ "UnselectAll": "Unselect all",
+ "History": "History",
+ "EventHint": "Deliveries are automatically deleted after 15 days",
+ "NothingFound": "Nothing found",
+ "NoResultsMatched": "No results match this filter. Try a different one or clear filter to view all items.",
+ "SearchOptions": "Search options",
+ "Apply": "Apply",
+ "SelectDate": "Select date",
+ "SelectDeliveryTime": "Select Delivery time",
+ "DeliveryDate": "Delivery date",
+ "From": "From",
+ "Before": "Before",
+ "Status": "Status",
+ "EventID": "Event ID",
+ "Delivery": "Delivery",
+ "Add": "Add"
+}
diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/DetailsNavigationHeader.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/DetailsNavigationHeader.js
index 6eaa127130..afed7af1fb 100644
--- a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/DetailsNavigationHeader.js
+++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/DetailsNavigationHeader.js
@@ -14,6 +14,7 @@ import Headline from "@docspace/common/components/Headline";
import IconButton from "@docspace/components/icon-button";
import { tablet } from "@docspace/components/utils/device";
+import { useTranslation } from "react-i18next";
const HeaderContainer = styled.div`
position: sticky;
@@ -42,13 +43,17 @@ const HeaderContainer = styled.div`
const DetailsNavigationHeader = (props) => {
const { eventId, retryWebhookEvent } = props;
+ const { t } = useTranslation(["Webhooks", "Common"]);
const navigate = useNavigate();
const onBack = () => {
navigate(-1);
};
const handleRetryEvent = async () => {
await retryWebhookEvent(eventId);
- toastr.success("Webhook retry again", Done);
+ toastr.success(
+ t("WebhookRedilivered", { ns: "Webhooks" }),
+ {t("Done", { ns: "Common" })},
+ );
};
return (
@@ -61,7 +66,7 @@ const DetailsNavigationHeader = (props) => {
className="arrow-button"
/>
- Webhook details
+ {t("WebhookDetails", { ns: "Webhooks" })}
diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/MessagesDetails.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/MessagesDetails.js
index 981435163d..bef00df5c1 100644
--- a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/MessagesDetails.js
+++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/MessagesDetails.js
@@ -4,6 +4,7 @@ import Submenu from "@docspace/components/submenu";
import { RequestDetails } from "./RequestDetails";
import { ResponseDetails } from "./ResponseDetails";
+import { useTranslation } from "react-i18next";
const SubmenuWrapper = styled.div`
.sticky {
@@ -13,10 +14,11 @@ const SubmenuWrapper = styled.div`
`;
export const MessagesDetails = ({ webhookDetails }) => {
+ const { t } = useTranslation(["Webhooks"]);
const menuData = [
{
id: "webhookRequest",
- name: "Request",
+ name: t("Request", { ns: "Webhooks" }),
content: ,
},
];
@@ -25,7 +27,7 @@ export const MessagesDetails = ({ webhookDetails }) => {
webhookDetails.status < 500 &&
menuData.push({
id: "webhookResponse",
- name: "Response",
+ name: t("Response", { ns: "Webhooks" }),
content: ,
});
diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/RequestDetails.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/RequestDetails.js
index 3851976593..869257195b 100644
--- a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/RequestDetails.js
+++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/RequestDetails.js
@@ -3,6 +3,7 @@ import styled from "styled-components";
import { Text, Textarea } from "@docspace/components";
import DangerIcon from "PUBLIC_DIR/images/danger.toast.react.svg?url";
+import { useTranslation } from "react-i18next";
const DetailsWrapper = styled.div`
width: 100%;
@@ -24,16 +25,17 @@ const ErrorMessageTooltip = styled.div`
`;
export const RequestDetails = ({ webhookDetails }) => {
+ const { t } = useTranslation(["Webhooks"]);
return (
{webhookDetails.status === 0 && (
- We couldn’t deliver this payload: failed to connect to host
+ {t("FailedToConnect", { ns: "Webhooks" })}
)}
- Request post header
+ {t("RequestPostHeader", { ns: "Webhooks" })}
{!webhookDetails.requestHeaders ? (
@@ -44,12 +46,12 @@ export const RequestDetails = ({ webhookDetails }) => {
hasNumeration
isFullHeight
isJSONField
- copyInfoText="Request post header successfully copied to clipboard"
+ copyInfoText={t("RequestHeaderCopied", { ns: "Webhooks" })}
/>
)}
- Request post body
+ {t("RequestPostBody", { ns: "Webhooks" })}
);
diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/ResponseDetails.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/ResponseDetails.js
index 1ed4114938..4636c1b0c8 100644
--- a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/ResponseDetails.js
+++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookEventDetails/sub-components/ResponseDetails.js
@@ -4,6 +4,7 @@ import { Text, Textarea, Button } from "@docspace/components";
import json_beautifier from "csvjson-json_beautifier";
import { isMobileOnly } from "react-device-detect";
+import { useTranslation } from "react-i18next";
const DetailsWrapper = styled.div`
width: 100%;
@@ -48,6 +49,7 @@ function isJSON(jsonString) {
export const ResponseDetails = ({ webhookDetails }) => {
const responsePayload = webhookDetails.responsePayload?.trim();
+ const { t } = useTranslation(["Webhooks"]);
const beautifiedJSON = isJSON(responsePayload)
? json_beautifier(JSON.parse(responsePayload), {
@@ -70,7 +72,7 @@ export const ResponseDetails = ({ webhookDetails }) => {
return (
- Response post header
+ {t("ResponsePostHeader", { ns: "Webhooks" })}
diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory/sub-components/EmptyFilter.js b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory/sub-components/EmptyFilter.js
index 8a291d0b73..6fd48d5f55 100644
--- a/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory/sub-components/EmptyFilter.js
+++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/Webhooks/WebhookHistory/sub-components/EmptyFilter.js
@@ -7,6 +7,7 @@ import { Text } from "@docspace/components";
import { Link } from "@docspace/components";
import { inject, observer } from "mobx-react";
+import { useTranslation } from "react-i18next";
const EmptyFilterWrapper = styled.div`
width: 100%;
@@ -39,6 +40,7 @@ const EmptyFilterContent = styled.div`
const EmptyFilter = (props) => {
const { applyFilters, formatFilters, clearHistoryFilters } = props;
+ const { t } = useTranslation(["Webhooks", "Common"]);
const clearFilters = () => {
clearHistoryFilters(null);
@@ -56,15 +58,15 @@ const EmptyFilter = (props) => {
- Nothing found
+ {t("NothingFound", { ns: "Webhooks" })}
- No results match this filter. Try a different one or clear filter to view all items.
+ {t("NoResultsMatched", { ns: "Webhooks" })}
-
+
- Clear filter
+ {t("ClearFilter", { ns: "Common" })}