This commit is contained in:
parent
8e9887bec6
commit
1a7009dd24
|
|
@ -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)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@
|
|||
"workspaceBeginSettings": "これらはワークスペースを選択したときに始まる設定です。",
|
||||
"workspaceInstructionsPlaceholder": "説明...(オプション)",
|
||||
"sidebarCreateNew": "新規作成",
|
||||
"sidebarNoContentType": "{{contentType}} はありません"
|
||||
"sidebarNoContentType": "{{contentType}} はありません",
|
||||
"searchPlaceholder": "{{contentType}} を検索..."
|
||||
},
|
||||
|
||||
"contentType": {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,8 @@
|
|||
"workspaceBeginSettings": "这些是选择此工作区时的初始设置。",
|
||||
"workspaceInstructionsPlaceholder": "说明...(可选)",
|
||||
"sidebarCreateNew": "新建",
|
||||
"sidebarNoContentType": "没有 {{contentType}}"
|
||||
"sidebarNoContentType": "没有 {{contentType}}",
|
||||
"searchPlaceholder": "搜索{{contentType}}..."
|
||||
},
|
||||
|
||||
"contentType": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue