This commit is contained in:
hailin 2025-04-19 11:51:52 +08:00
parent 8e9887bec6
commit 1a7009dd24
4 changed files with 12 additions and 4 deletions

View File

@ -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<SidebarSearchProps> = ({
searchTerm,
setSearchTerm
}) => {
const { t } = useTranslation();
return (
<Input
placeholder={`Search ${contentType}...`}
placeholder={t("side.searchPlaceholder", { contentType: t(`contentType.${contentType}`) })}
value={searchTerm}
onChange={e => setSearchTerm(e.target.value)}
/>

View File

@ -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": {

View File

@ -145,7 +145,8 @@
"workspaceBeginSettings": "これらはワークスペースを選択したときに始まる設定です。",
"workspaceInstructionsPlaceholder": "説明...(オプション)",
"sidebarCreateNew": "新規作成",
"sidebarNoContentType": "{{contentType}} はありません"
"sidebarNoContentType": "{{contentType}} はありません",
"searchPlaceholder": "{{contentType}} を検索..."
},
"contentType": {

View File

@ -145,7 +145,8 @@
"workspaceBeginSettings": "这些是选择此工作区时的初始设置。",
"workspaceInstructionsPlaceholder": "说明...(可选)",
"sidebarCreateNew": "新建",
"sidebarNoContentType": "没有 {{contentType}}"
"sidebarNoContentType": "没有 {{contentType}}",
"searchPlaceholder": "搜索{{contentType}}..."
},
"contentType": {