diff --git a/apps/client/public/locales/en/search.json b/apps/client/public/locales/en/search.json
new file mode 100644
index 00000000..d06882a8
--- /dev/null
+++ b/apps/client/public/locales/en/search.json
@@ -0,0 +1,5 @@
+{
+ "Search...": "Search...",
+ "Start typing to search...": "Start typing to search...",
+ "No results found...": "No results found..."
+}
diff --git a/apps/client/public/locales/zh/search.json b/apps/client/public/locales/zh/search.json
new file mode 100644
index 00000000..5f848780
--- /dev/null
+++ b/apps/client/public/locales/zh/search.json
@@ -0,0 +1,5 @@
+{
+ "Search...": "搜索...",
+ "Start typing to search...": "开始输入以搜索...",
+ "No results found...": "未找到结果..."
+}
diff --git a/apps/client/src/features/search/search-spotlight.tsx b/apps/client/src/features/search/search-spotlight.tsx
index 1fc26aef..10f63130 100644
--- a/apps/client/src/features/search/search-spotlight.tsx
+++ b/apps/client/src/features/search/search-spotlight.tsx
@@ -6,11 +6,13 @@ import { useNavigate } from "react-router-dom";
import { useDebouncedValue } from "@mantine/hooks";
import { usePageSearchQuery } from "@/features/search/queries/search-query";
import { buildPageUrl } from "@/features/page/page.utils.ts";
+import { useTranslation } from "react-i18next";
interface SearchSpotlightProps {
spaceId?: string;
}
export function SearchSpotlight({ spaceId }: SearchSpotlightProps) {
+ const { t } = useTranslation("search");
const navigate = useNavigate();
const [query, setQuery] = useState("");
const [debouncedSearchQuery] = useDebouncedValue(query, 300);
@@ -65,16 +67,16 @@ export function SearchSpotlight({ spaceId }: SearchSpotlightProps) {
}}
>
}
/>
{query.length === 0 && pages.length === 0 && (
- Start typing to search...
+ {t("Start typing to search...")}
)}
{query.length > 0 && pages.length === 0 && (
- No results found...
+ {t("No results found...")}
)}
{pages.length > 0 && pages}