Skip to content

armgit / plane

Public Imported from GitHub
0

🔥🔥🔥 Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-5624] chore: added webhook translations #8312

b-saikrishnakanth7b41ffa08e3a
diff --git a/apps/web/core/components/exporter/export-form.tsx b/apps/web/core/components/exporter/export-form.tsx
index fe6fa7afc9..941d7b4664 100644
--- a/apps/web/core/components/exporter/export-form.tsx
+++ b/apps/web/core/components/exporter/export-form.tsx
@@ -2,24 +2,24 @@ import { useState } from "react";
import { intersection } from "lodash-es";
import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form";
-import { Info } from "lucide-react";
+// import { Info } from "lucide-react";
import {
EUserPermissions,
EUserPermissionsLevel,
EXPORTERS_LIST,
- ISSUE_DISPLAY_FILTERS_BY_PAGE,
+ // ISSUE_DISPLAY_FILTERS_BY_PAGE,
WORKSPACE_SETTINGS_TRACKER_EVENTS,
WORKSPACE_SETTINGS_TRACKER_ELEMENTS,
} from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
-import { Tooltip } from "@plane/propel/tooltip";
-import { EIssuesStoreType } from "@plane/types";
+// import { Tooltip } from "@plane/propel/tooltip";
+// import { EIssuesStoreType } from "@plane/types";
import type { TWorkItemFilterExpression } from "@plane/types";
import { CustomSearchSelect, CustomSelect } from "@plane/ui";
-import { WorkspaceLevelWorkItemFiltersHOC } from "@/components/work-item-filters/filters-hoc/workspace-level";
-import { WorkItemFiltersRow } from "@/components/work-item-filters/filters-row";
+// import { WorkspaceLevelWorkItemFiltersHOC } from "@/components/work-item-filters/filters-hoc/workspace-level";
+// import { WorkItemFiltersRow } from "@/components/work-item-filters/filters-row";
import { captureError, captureSuccess } from "@/helpers/event-tracker.helper";
import { useProject } from "@/hooks/store/use-project";
import { useUser, useUserPermissions } from "@/hooks/store/user";
@@ -37,15 +37,15 @@ type FormData = {
filters: TWorkItemFilterExpression;
};
-const initialWorkItemFilters = {
- richFilters: {},
- displayFilters: {},
- displayProperties: {},
- kanbanFilters: {
- group_by: [],
- sub_group_by: [],
- },
-};
+// const initialWorkItemFilters = {
+// richFilters: {},
+// displayFilters: {},
+// displayProperties: {},
+// kanbanFilters: {
+// group_by: [],
+// sub_group_by: [],
+// },
+// };
const projectExportService = new ProjectExportService();
@@ -101,52 +101,57 @@ export const ExportForm = observer(function ExportForm(props: Props) {
multiple: formData.project.length > 1,
rich_filters: formData.filters,
};
- await projectExportService
- .csvExport(workspaceSlug, payload)
- .then(() => {
- mutateServices();
- setExportLoading(false);
- captureSuccess({
- eventName: WORKSPACE_SETTINGS_TRACKER_EVENTS.csv_exported,
- payload: {
- provider: formData.provider.provider,
- },
- });
- setToast({
- type: TOAST_TYPE.SUCCESS,
- title: t("workspace_settings.settings.exports.modal.toasts.success.title"),
- message: t("workspace_settings.settings.exports.modal.toasts.success.message", {
- entity:
- formData.provider.provider === "csv"
- ? "CSV"
- : formData.provider.provider === "xlsx"
- ? "Excel"
- : formData.provider.provider === "json"
- ? "JSON"
- : "",
- }),
- });
- })
- .catch((error) => {
- setExportLoading(false);
- captureError({
- eventName: WORKSPACE_SETTINGS_TRACKER_EVENTS.csv_exported,
- payload: {
- provider: formData.provider.provider,
- },
- error: error as Error,
- });
- setToast({
- type: TOAST_TYPE.ERROR,
- title: t("error"),
- message: t("workspace_settings.settings.exports.modal.toasts.error.message"),
- });
+ try {
+ await projectExportService.csvExport(workspaceSlug, payload);
+ mutateServices();
+ setExportLoading(false);
+ captureSuccess({
+ eventName: WORKSPACE_SETTINGS_TRACKER_EVENTS.csv_exported,
+ payload: {
+ provider: formData.provider.provider,
+ },
+ });
+ setToast({
+ type: TOAST_TYPE.SUCCESS,
+ title: t("workspace_settings.settings.exports.modal.toasts.success.title"),
+ message: t("workspace_settings.settings.exports.modal.toasts.success.message", {
+ entity:
+ formData.provider.provider === "csv"
+ ? "CSV"
+ : formData.provider.provider === "xlsx"
+ ? "Excel"
+ : formData.provider.provider === "json"
+ ? "JSON"
+ : "",
+ }),
+ });
+ } catch (error) {
+ setExportLoading(false);
+ captureError({
+ eventName: WORKSPACE_SETTINGS_TRACKER_EVENTS.csv_exported,
+ payload: {
+ provider: formData.provider.provider,
+ },
+ error: error as Error,
});
+ setToast({
+ type: TOAST_TYPE.ERROR,
+ title: t("error"),
+ message: t("workspace_settings.settings.exports.modal.toasts.error.message"),
+ });
+ }
+ } else {
+ setExportLoading(false);
}
}
return (
- <form onSubmit={handleSubmit(ExportCSVToMail)} className="flex flex-col gap-4 mt-4">
+ <form
+ onSubmit={(e) => {
+ void handleSubmit(ExportCSVToMail)(e);
+ }}
+ className="flex flex-col gap-4 mt-4"
+ >
<div className="flex gap-4">
{/* Project Selector */}
<div className="w-1/2">
@@ -210,7 +215,7 @@ export const ExportForm = observer(function ExportForm(props: Props) {
</div>
</div>
{/* Rich Filters */}
- <div className="w-full">
+ {/* <div className="w-full">
<div className="flex items-center gap-2 mb-2">
<div className="text-sm font-medium text-custom-text-200 leading-tight">{t("common.filters")}</div>
<Tooltip
@@ -251,7 +256,7 @@ export const ExportForm = observer(function ExportForm(props: Props) {
</WorkspaceLevelWorkItemFiltersHOC>
)}
/>
- </div>
+ </div> */}
<div className="flex items-center justify-between">
<Button
variant="primary"
diff --git a/packages/i18n/src/locales/cs/empty-state.ts b/packages/i18n/src/locales/cs/empty-state.ts
index 452535d9dd..ccd545d7d8 100644
--- a/packages/i18n/src/locales/cs/empty-state.ts
+++ b/packages/i18n/src/locales/cs/empty-state.ts
@@ -188,5 +188,10 @@ export default {
"Generujte bezpečné API tokeny pro připojení vašeho pracovního prostoru s externími systémy a aplikacemi.",
cta_primary: "Přidat API token",
},
+ webhooks: {
+ title: "Zatím nebyl přidán žádný Webhook",
+ description: "Automatizujte oznámení externím službám při výskytu událostí projektu.",
+ cta_primary: "Přidat webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/de/empty-state.ts b/packages/i18n/src/locales/de/empty-state.ts
index 087e51e7b4..96c47c70dc 100644
--- a/packages/i18n/src/locales/de/empty-state.ts
+++ b/packages/i18n/src/locales/de/empty-state.ts
@@ -198,5 +198,10 @@ export default {
"Generieren Sie sichere API-Tokens, um Ihren Workspace mit externen Systemen und Anwendungen zu verbinden.",
cta_primary: "API-Token hinzufügen",
},
+ webhooks: {
+ title: "Noch kein Webhook hinzugefügt",
+ description: "Automatisieren Sie Benachrichtigungen an externe Dienste, wenn Projektereignisse auftreten.",
+ cta_primary: "Webhook hinzufügen",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/en/empty-state.ts b/packages/i18n/src/locales/en/empty-state.ts
index 8f181883a7..ae9a063574 100644
--- a/packages/i18n/src/locales/en/empty-state.ts
+++ b/packages/i18n/src/locales/en/empty-state.ts
@@ -183,5 +183,10 @@ export default {
description: "Generate secure API tokens to connect your workspace with external systems and applications.",
cta_primary: "Add API token",
},
+ webhooks: {
+ title: "No Webhook added yet",
+ description: "Automate notifications to external services when project events occur.",
+ cta_primary: "Add webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/es/empty-state.ts b/packages/i18n/src/locales/es/empty-state.ts
index 6ef7701526..53ccdb8f25 100644
--- a/packages/i18n/src/locales/es/empty-state.ts
+++ b/packages/i18n/src/locales/es/empty-state.ts
@@ -192,5 +192,10 @@ export default {
"Genera tokens API seguros para conectar tu espacio de trabajo con sistemas y aplicaciones externos.",
cta_primary: "Agregar token API",
},
+ webhooks: {
+ title: "Aún no se ha agregado ningún Webhook",
+ description: "Automatiza las notificaciones a servicios externos cuando ocurran eventos del proyecto.",
+ cta_primary: "Agregar webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/fr/empty-state.ts b/packages/i18n/src/locales/fr/empty-state.ts
index 3c7fc2816c..ca97443ef8 100644
--- a/packages/i18n/src/locales/fr/empty-state.ts
+++ b/packages/i18n/src/locales/fr/empty-state.ts
@@ -195,5 +195,11 @@ export default {
"Générez des jetons API sécurisés pour connecter votre espace de travail avec des systèmes et applications externes.",
cta_primary: "Ajouter un jeton API",
},
+ webhooks: {
+ title: "Aucun Webhook ajouté pour le moment",
+ description:
+ "Automatisez les notifications vers des services externes lorsque des événements de projet se produisent.",
+ cta_primary: "Ajouter un webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/id/empty-state.ts b/packages/i18n/src/locales/id/empty-state.ts
index 11c900878b..4cdd36c99a 100644
--- a/packages/i18n/src/locales/id/empty-state.ts
+++ b/packages/i18n/src/locales/id/empty-state.ts
@@ -192,5 +192,10 @@ export default {
"Hasilkan token API yang aman untuk menghubungkan ruang kerja Anda dengan sistem dan aplikasi eksternal.",
cta_primary: "Tambahkan token API",
},
+ webhooks: {
+ title: "Belum ada Webhook yang ditambahkan",
+ description: "Otomatisasi notifikasi ke layanan eksternal ketika peristiwa proyek terjadi.",
+ cta_primary: "Tambahkan webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/it/empty-state.ts b/packages/i18n/src/locales/it/empty-state.ts
index fa7a3ee843..0e5e458a9b 100644
--- a/packages/i18n/src/locales/it/empty-state.ts
+++ b/packages/i18n/src/locales/it/empty-state.ts
@@ -192,5 +192,10 @@ export default {
description: "Genera token API sicuri per connettere il tuo workspace con sistemi e applicazioni esterne.",
cta_primary: "Aggiungi token API",
},
+ webhooks: {
+ title: "Nessun Webhook aggiunto ancora",
+ description: "Automatizza le notifiche a servizi esterni quando si verificano eventi del progetto.",
+ cta_primary: "Aggiungi webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/ja/empty-state.ts b/packages/i18n/src/locales/ja/empty-state.ts
index 0bf5ffbb20..a5be665bcd 100644
--- a/packages/i18n/src/locales/ja/empty-state.ts
+++ b/packages/i18n/src/locales/ja/empty-state.ts
@@ -182,5 +182,10 @@ export default {
description: "ワークスペースを外部システムおよびアプリケーションと接続するための安全なAPIトークンを生成します。",
cta_primary: "APIトークンを追加",
},
+ webhooks: {
+ title: "まだWebhookが追加されていません",
+ description: "プロジェクトイベントが発生したときに外部サービスへの通知を自動化します。",
+ cta_primary: "Webhookを追加",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/ko/empty-state.ts b/packages/i18n/src/locales/ko/empty-state.ts
index cb769a1809..80b62d1e0f 100644
--- a/packages/i18n/src/locales/ko/empty-state.ts
+++ b/packages/i18n/src/locales/ko/empty-state.ts
@@ -181,5 +181,10 @@ export default {
description: "작업 공간을 외부 시스템 및 애플리케이션과 연결하기 위한 보안 API 토큰을 생성하세요.",
cta_primary: "API 토큰 추가",
},
+ webhooks: {
+ title: "아직 웹훅이 추가되지 않았습니다",
+ description: "프로젝트 이벤트가 발생할 때 외부 서비스에 대한 알림을 자동화하세요.",
+ cta_primary: "웹훅 추가",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/pl/empty-state.ts b/packages/i18n/src/locales/pl/empty-state.ts
index 7ab817673a..79951dedd0 100644
--- a/packages/i18n/src/locales/pl/empty-state.ts
+++ b/packages/i18n/src/locales/pl/empty-state.ts
@@ -193,5 +193,10 @@ export default {
"Generuj bezpieczne tokeny API, aby połączyć swój obszar roboczy z zewnętrznymi systemami i aplikacjami.",
cta_primary: "Dodaj token API",
},
+ webhooks: {
+ title: "Nie dodano jeszcze webhooka",
+ description: "Automatyzuj powiadomienia do usług zewnętrznych, gdy wystąpią zdarzenia projektowe.",
+ cta_primary: "Dodaj webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/pt-BR/empty-state.ts b/packages/i18n/src/locales/pt-BR/empty-state.ts
index 697cb3cb7c..56712f10e2 100644
--- a/packages/i18n/src/locales/pt-BR/empty-state.ts
+++ b/packages/i18n/src/locales/pt-BR/empty-state.ts
@@ -193,5 +193,10 @@ export default {
"Gere tokens de API seguros para conectar seu espaço de trabalho com sistemas e aplicativos externos.",
cta_primary: "Adicionar token de API",
},
+ webhooks: {
+ title: "Ainda não foi adicionado nenhum Webhook",
+ description: "Automatize notificações para serviços externos quando ocorrerem eventos do projeto.",
+ cta_primary: "Adicionar webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/ro/empty-state.ts b/packages/i18n/src/locales/ro/empty-state.ts
index 7591096b12..539c0e2ac7 100644
--- a/packages/i18n/src/locales/ro/empty-state.ts
+++ b/packages/i18n/src/locales/ro/empty-state.ts
@@ -191,5 +191,10 @@ export default {
"Generați token-uri API sigure pentru a conecta spațiul dvs. de lucru cu sisteme și aplicații externe.",
cta_primary: "Adăugați token API",
},
+ webhooks: {
+ title: "Încă nu s-a adăugat niciun Webhook",
+ description: "Automatizați notificările către servicii externe când apar evenimente ale proiectului.",
+ cta_primary: "Adăugați webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/ru/empty-state.ts b/packages/i18n/src/locales/ru/empty-state.ts
index 748ffb0699..52f1b00431 100644
--- a/packages/i18n/src/locales/ru/empty-state.ts
+++ b/packages/i18n/src/locales/ru/empty-state.ts
@@ -194,5 +194,10 @@ export default {
"Генерируйте безопасные API-токены для подключения вашего рабочего пространства к внешним системам и приложениям.",
cta_primary: "Добавить API-токен",
},
+ webhooks: {
+ title: "Вебхуков пока не добавлено",
+ description: "Автоматизируйте уведомления внешних сервисов при возникновении событий проекта.",
+ cta_primary: "Добавить вебхук",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/sk/empty-state.ts b/packages/i18n/src/locales/sk/empty-state.ts
index b950fd7011..a82f47d3ee 100644
--- a/packages/i18n/src/locales/sk/empty-state.ts
+++ b/packages/i18n/src/locales/sk/empty-state.ts
@@ -191,5 +191,10 @@ export default {
"Generujte bezpečné API tokeny na pripojenie vášho pracovného priestoru s externými systémami a aplikáciami.",
cta_primary: "Pridať API token",
},
+ webhooks: {
+ title: "Zatiaľ nebol pridaný žiadny Webhook",
+ description: "Automatizujte oznámenia externým službám pri výskyte udalostí projektu.",
+ cta_primary: "Pridať webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/tr-TR/empty-state.ts b/packages/i18n/src/locales/tr-TR/empty-state.ts
index 0f1a257ac8..64bf46c208 100644
--- a/packages/i18n/src/locales/tr-TR/empty-state.ts
+++ b/packages/i18n/src/locales/tr-TR/empty-state.ts
@@ -190,5 +190,10 @@ export default {
"Çalışma alanınızı harici sistemler ve uygulamalarla bağlamak için güvenli API token'ları oluşturun.",
cta_primary: "API token'ı ekle",
},
+ webhooks: {
+ title: "Henüz Webhook eklenmedi",
+ description: "Proje olayları gerçekleştiğinde harici hizmetlere bildirimleri otomatikleştirin.",
+ cta_primary: "Webhook ekle",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/ua/empty-state.ts b/packages/i18n/src/locales/ua/empty-state.ts
index 95ab8f7907..0ef6232f86 100644
--- a/packages/i18n/src/locales/ua/empty-state.ts
+++ b/packages/i18n/src/locales/ua/empty-state.ts
@@ -193,5 +193,10 @@ export default {
"Генеруйте безпечні API токени для підключення вашого робочого простору до зовнішніх систем та додатків.",
cta_primary: "Додати API токен",
},
+ webhooks: {
+ title: "Ще не додано Webhook",
+ description: "Автоматизуйте сповіщення зовнішнім сервісам, коли відбуваються події проєкту.",
+ cta_primary: "Додати webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/vi-VN/empty-state.ts b/packages/i18n/src/locales/vi-VN/empty-state.ts
index dbee0d4c10..5d2a6ce219 100644
--- a/packages/i18n/src/locales/vi-VN/empty-state.ts
+++ b/packages/i18n/src/locales/vi-VN/empty-state.ts
@@ -191,5 +191,10 @@ export default {
"Tạo token API an toàn để kết nối không gian làm việc của bạn với các hệ thống và ứng dụng bên ngoài.",
cta_primary: "Thêm token API",
},
+ webhooks: {
+ title: "Chưa thêm Webhook",
+ description: "Tự động hóa thông báo đến các dịch vụ bên ngoài khi sự kiện dự án xảy ra.",
+ cta_primary: "Thêm webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/zh-CN/empty-state.ts b/packages/i18n/src/locales/zh-CN/empty-state.ts
index c2028e2e28..607c4e05b5 100644
--- a/packages/i18n/src/locales/zh-CN/empty-state.ts
+++ b/packages/i18n/src/locales/zh-CN/empty-state.ts
@@ -177,5 +177,10 @@ export default {
description: "生成安全的 API 令牌以将工作空间与外部系统和应用程序连接。",
cta_primary: "添加 API 令牌",
},
+ webhooks: {
+ title: "尚未添加 Webhook",
+ description: "在项目事件发生时自动向外部服务发送通知。",
+ cta_primary: "添加 webhook",
+ },
},
} as const;
diff --git a/packages/i18n/src/locales/zh-TW/empty-state.ts b/packages/i18n/src/locales/zh-TW/empty-state.ts
index 8644cadf2e..cae9d83a3b 100644
--- a/packages/i18n/src/locales/zh-TW/empty-state.ts
+++ b/packages/i18n/src/locales/zh-TW/empty-state.ts
@@ -177,5 +177,10 @@ export default {
description: "產生安全的 API 權杖以將工作區與外部系統和應用程式連線。",
cta_primary: "新增 API 權杖",
},
+ webhooks: {
+ title: "尚未新增 Webhook",
+ description: "在專案事件發生時自動向外部服務傳送通知。",
+ cta_primary: "新增 webhook",
+ },
},
} as const;