diff --git a/components/sidebar/items/all/sidebar-delete-item.tsx b/components/sidebar/items/all/sidebar-delete-item.tsx index 5066bdf..9e9344a 100644 --- a/components/sidebar/items/all/sidebar-delete-item.tsx +++ b/components/sidebar/items/all/sidebar-delete-item.tsx @@ -22,6 +22,8 @@ import { Tables } from "@/supabase/types" import { ContentType, DataItemType } from "@/types" import { FC, useContext, useRef, useState } from "react" +import { useTranslation } from 'react-i18next' + interface SidebarDeleteItemProps { item: DataItemType contentType: ContentType @@ -31,6 +33,9 @@ export const SidebarDeleteItem: FC = ({ item, contentType }) => { + + const { t } = useTranslation() + const { setChats, setPresets, @@ -114,26 +119,26 @@ export const SidebarDeleteItem: FC = ({ - Delete {contentType.slice(0, -1)} + {t("side.delete")} {contentType.slice(0, -1)} - Are you sure you want to delete {item.name}? + {t("side.confirmDelete")} {item.name}? diff --git a/components/sidebar/items/all/sidebar-update-item.tsx b/components/sidebar/items/all/sidebar-update-item.tsx index 1f8b346..4f2c254 100644 --- a/components/sidebar/items/all/sidebar-update-item.tsx +++ b/components/sidebar/items/all/sidebar-update-item.tsx @@ -641,14 +641,14 @@ export const SidebarUpdateItem: FC = ({
- Edit {contentType.slice(0, -1)} + {t("side.edit")} {contentType.slice(0, -1)}
{workspaces.length > 1 && (
- + = ({
diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index cf3bae1..652ec83 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -163,7 +163,10 @@ "filesAndCollections": "Files & Collections", "tools": "Tools", "modelIncompatibleWithTools": "Model is not compatible with tools.", - "editChat": "Edit Chat" + "editChat": "Edit Chat", + "confirmDelete": "Are you sure you want to delete?", + "edit": "Edit", + "assignedWorkspaces": "Assigned Workspaces" }, "contentType": { diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index fbe741f..5d905cd 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -162,7 +162,10 @@ "filesAndCollections": "ファイルとコレクション", "tools": "ツール", "modelIncompatibleWithTools": "このモデルはツールと互換性がありません。", - "editChat": "チャットを編集" + "editChat": "チャットを編集", + "confirmDelete": "本当に削除しますか?", + "edit": "編集", + "assignedWorkspaces": "割り当てられたワークスペース" }, "contentType": { diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 616240a..4e3e5e6 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -162,7 +162,10 @@ "filesAndCollections": "文件与集合", "tools": "工具", "modelIncompatibleWithTools": "该模型不支持工具功能。", - "editChat": "编辑对话" + "editChat": "编辑对话", + "confirmDelete": "你确定要删除吗?", + "edit": "编辑", + "assignedWorkspaces": "已分配的工作区" }, "contentType": {