From 1a7009dd247c08030aaec145575c8e5f7b24f46b Mon Sep 17 00:00:00 2001 From: hailin Date: Sat, 19 Apr 2025 11:51:52 +0800 Subject: [PATCH] . --- components/sidebar/sidebar-search.tsx | 7 ++++++- public/locales/en/translation.json | 3 ++- public/locales/ja/translation.json | 3 ++- public/locales/zh/translation.json | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components/sidebar/sidebar-search.tsx b/components/sidebar/sidebar-search.tsx index b451bc8..745ab2e 100644 --- a/components/sidebar/sidebar-search.tsx +++ b/components/sidebar/sidebar-search.tsx @@ -2,6 +2,8 @@ import { ContentType } from "@/types" import { FC } from "react" import { Input } from "../ui/input" +import { useTranslation } from "react-i18next"; + interface SidebarSearchProps { contentType: ContentType searchTerm: string @@ -13,9 +15,12 @@ export const SidebarSearch: FC = ({ searchTerm, setSearchTerm }) => { + + const { t } = useTranslation(); + return ( setSearchTerm(e.target.value)} /> diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index c21905a..353866c 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -146,7 +146,8 @@ "workspaceBeginSettings": "These are the settings your workspace begins with when selected.", "workspaceInstructionsPlaceholder": "Instructions... (optional)", "sidebarCreateNew": "New", - "sidebarNoContentType": "No {{contentType}}" + "sidebarNoContentType": "No {{contentType}}", + "searchPlaceholder": "Search {{contentType}}..." }, "contentType": { diff --git a/public/locales/ja/translation.json b/public/locales/ja/translation.json index cd0e3b4..6f9453d 100644 --- a/public/locales/ja/translation.json +++ b/public/locales/ja/translation.json @@ -145,7 +145,8 @@ "workspaceBeginSettings": "これらはワークスペースを選択したときに始まる設定です。", "workspaceInstructionsPlaceholder": "説明...(オプション)", "sidebarCreateNew": "新規作成", - "sidebarNoContentType": "{{contentType}} はありません" + "sidebarNoContentType": "{{contentType}} はありません", + "searchPlaceholder": "{{contentType}} を検索..." }, "contentType": { diff --git a/public/locales/zh/translation.json b/public/locales/zh/translation.json index 4b19244..8296df3 100644 --- a/public/locales/zh/translation.json +++ b/public/locales/zh/translation.json @@ -145,7 +145,8 @@ "workspaceBeginSettings": "这些是选择此工作区时的初始设置。", "workspaceInstructionsPlaceholder": "说明...(可选)", "sidebarCreateNew": "新建", - "sidebarNoContentType": "没有 {{contentType}}" + "sidebarNoContentType": "没有 {{contentType}}", + "searchPlaceholder": "搜索{{contentType}}..." }, "contentType": {