diff --git a/web/core/components/issues/peek-overview/root.tsx b/web/core/components/issues/peek-overview/root.tsx
index 6687230ac90..5ed6403bcb9 100644
--- a/web/core/components/issues/peek-overview/root.tsx
+++ b/web/core/components/issues/peek-overview/root.tsx
@@ -4,7 +4,16 @@ import { FC, useEffect, useState, useMemo, useCallback } from "react";
import { observer } from "mobx-react";
import { usePathname } from "next/navigation";
// plane types
-import { EIssuesStoreType, ISSUE_UPDATED, ISSUE_DELETED, ISSUE_ARCHIVED, ISSUE_RESTORED , EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
+import {
+ EIssuesStoreType,
+ ISSUE_UPDATED,
+ ISSUE_DELETED,
+ ISSUE_ARCHIVED,
+ ISSUE_RESTORED,
+ EUserPermissions,
+ EUserPermissionsLevel,
+} from "@plane/constants";
+import { useTranslation } from "@plane/i18n";
import { TIssue } from "@plane/types";
// plane ui
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";
@@ -29,6 +38,7 @@ export const IssuePeekOverview: FC
= observer((props) => {
is_draft = false,
storeType: issueStoreFromProps,
} = props;
+ const { t } = useTranslation();
// router
const pathname = usePathname();
// store hook
@@ -89,9 +99,9 @@ export const IssuePeekOverview: FC = observer((props) => {
path: pathname,
});
setToast({
- title: "Error!",
+ title: t("toast.error"),
type: TOAST_TYPE.ERROR,
- message: "Issue update failed",
+ message: t("entity.update.failed", { entity: t("issue.label", { count: 1 }) }),
});
});
}
@@ -108,9 +118,9 @@ export const IssuePeekOverview: FC = observer((props) => {
});
} catch {
setToast({
- title: "Error!",
+ title: t("toast.error"),
type: TOAST_TYPE.ERROR,
- message: "Issue delete failed",
+ message: t("entity.delete.failed", { entity: t("issue.label", { count: 1 }) }),
});
captureIssueEvent({
eventName: ISSUE_DELETED,
@@ -141,8 +151,8 @@ export const IssuePeekOverview: FC = observer((props) => {
await restoreIssue(workspaceSlug, projectId, issueId);
setToast({
type: TOAST_TYPE.SUCCESS,
- title: "Restore success",
- message: "Your issue can be found in project issues.",
+ title: t("issue.restore.success.title"),
+ message: t("issue.restore.success.message"),
});
captureIssueEvent({
eventName: ISSUE_RESTORED,
@@ -152,8 +162,8 @@ export const IssuePeekOverview: FC = observer((props) => {
} catch {
setToast({
type: TOAST_TYPE.ERROR,
- title: "Error!",
- message: "Issue could not be restored. Please try again.",
+ title: t("toast.error"),
+ message: t("issue.restore.failed.message"),
});
captureIssueEvent({
eventName: ISSUE_RESTORED,
@@ -178,8 +188,8 @@ export const IssuePeekOverview: FC = observer((props) => {
} catch {
setToast({
type: TOAST_TYPE.ERROR,
- title: "Error!",
- message: "Issue could not be added to the cycle. Please try again.",
+ title: t("toast.error"),
+ message: t("issue.add.cycle.failed"),
});
captureIssueEvent({
eventName: ISSUE_UPDATED,
@@ -207,8 +217,8 @@ export const IssuePeekOverview: FC = observer((props) => {
} catch {
setToast({
type: TOAST_TYPE.ERROR,
- title: "Error!",
- message: "Issue could not be added to the cycle. Please try again.",
+ title: t("toast.error"),
+ message: t("issue.add.cycle.failed"),
});
captureIssueEvent({
eventName: ISSUE_UPDATED,
@@ -225,14 +235,14 @@ export const IssuePeekOverview: FC = observer((props) => {
try {
const removeFromCyclePromise = issues.removeIssueFromCycle(workspaceSlug, projectId, cycleId, issueId);
setPromiseToast(removeFromCyclePromise, {
- loading: "Removing issue from the cycle...",
+ loading: t("issue.remove.cycle.loading"),
success: {
- title: "Success!",
- message: () => "Issue removed from the cycle successfully.",
+ title: t("toast.success"),
+ message: () => t("issue.remove.cycle.success"),
},
error: {
- title: "Error!",
- message: () => "Issue could not be removed from the cycle. Please try again.",
+ title: t("toast.error"),
+ message: () => t("issue.remove.cycle.failed"),
},
});
await removeFromCyclePromise;
@@ -288,14 +298,14 @@ export const IssuePeekOverview: FC = observer((props) => {
try {
const removeFromModulePromise = issues.removeIssuesFromModule(workspaceSlug, projectId, moduleId, [issueId]);
setPromiseToast(removeFromModulePromise, {
- loading: "Removing issue from the module...",
+ loading: t("issue.remove.module.loading"),
success: {
- title: "Success!",
- message: () => "Issue removed from the module successfully.",
+ title: t("toast.success"),
+ message: () => t("issue.remove.module.success"),
},
error: {
- title: "Error!",
- message: () => "Issue could not be removed from the module. Please try again.",
+ title: t("toast.error"),
+ message: () => t("issue.remove.module.failed"),
},
});
await removeFromModulePromise;
diff --git a/web/core/components/issues/relations/issue-list-item.tsx b/web/core/components/issues/relations/issue-list-item.tsx
index bb669762ae6..4860e315dbc 100644
--- a/web/core/components/issues/relations/issue-list-item.tsx
+++ b/web/core/components/issues/relations/issue-list-item.tsx
@@ -5,6 +5,7 @@ import { observer } from "mobx-react";
import { X, Pencil, Trash, Link as LinkIcon } from "lucide-react";
// Plane
import { EIssueServiceType } from "@plane/constants";
+import { useTranslation } from "@plane/i18n";
import { TIssue, TIssueServiceType } from "@plane/types";
import { ControlLink, CustomMenu, Tooltip } from "@plane/ui";
// components
@@ -40,6 +41,8 @@ export const RelationIssueListItem: FC = observer((props) => {
issueServiceType = EIssueServiceType.ISSUES,
} = props;
+ const { t } = useTranslation();
+
// store hooks
const {
issue: { getIssueById },
@@ -153,7 +156,7 @@ export const RelationIssueListItem: FC = observer((props) => {
-
Edit
+
{t("common.actions.edit")}
)}
@@ -161,7 +164,7 @@ export const RelationIssueListItem: FC = observer((props) => {
- Copy link
+ {t("common.actions.copy_link")}
@@ -169,7 +172,7 @@ export const RelationIssueListItem: FC = observer((props) => {
- Remove relation
+ {t("common.actions.remove_relation")}
)}
@@ -178,7 +181,7 @@ export const RelationIssueListItem: FC = observer((props) => {
- Delete
+ {t("common.actions.delete")}
)}
diff --git a/web/core/components/issues/sub-issues/issue-list-item.tsx b/web/core/components/issues/sub-issues/issue-list-item.tsx
index 28f6f47f31d..4e8e759dfad 100644
--- a/web/core/components/issues/sub-issues/issue-list-item.tsx
+++ b/web/core/components/issues/sub-issues/issue-list-item.tsx
@@ -4,6 +4,7 @@ import React from "react";
import { observer } from "mobx-react";
import { ChevronRight, X, Pencil, Trash, Link as LinkIcon, Loader } from "lucide-react";
import { EIssueServiceType } from "@plane/constants";
+import { useTranslation } from "@plane/i18n";
import { TIssue, TIssueServiceType } from "@plane/types";
// ui
import { ControlLink, CustomMenu, Tooltip } from "@plane/ui";
@@ -53,7 +54,7 @@ export const IssueListItem: React.FC = observer((props) => {
subIssueOperations,
issueServiceType = EIssueServiceType.ISSUES,
} = props;
-
+ const { t } = useTranslation();
const {
issue: { getIssueById },
} = useIssueDetail(issueServiceType);
@@ -184,7 +185,7 @@ export const IssueListItem: React.FC = observer((props) => {
>
-
Edit issue
+
{t("issue.edit")}
)}
@@ -198,7 +199,7 @@ export const IssueListItem: React.FC = observer((props) => {
>
- Copy issue link
+ {t("issue.copy_link")}
@@ -213,7 +214,9 @@ export const IssueListItem: React.FC = observer((props) => {
>
- {`Remove ${issueServiceType === EIssueServiceType.ISSUES ? "parent" : ""} issue`}
+ {issueServiceType === EIssueServiceType.ISSUES
+ ? t("issue.remove.parent.label")
+ : t("issue.remove.label")}
)}
@@ -229,7 +232,7 @@ export const IssueListItem: React.FC = observer((props) => {
>
- Delete issue
+ {t("issue.delete.label")}
)}
diff --git a/web/helpers/issue.helper.ts b/web/helpers/issue.helper.ts
index dc7aa5a5b95..69fb2d8c79e 100644
--- a/web/helpers/issue.helper.ts
+++ b/web/helpers/issue.helper.ts
@@ -213,6 +213,7 @@ export const formatTextList = (TextArray: string[]): string => {
export const getDescriptionPlaceholder = (isFocused: boolean, description: string | undefined): string => {
const isDescriptionEmpty = !description || description === "" || description.trim() === "";
+ // TODO: Translate here
if (!isDescriptionEmpty || isFocused) return "Press '/' for commands...";
else return "Click to add description";
};