Skip to content

Commit 628a5b7

Browse files
committed
Fix codebase search results string
1 parent 2053d27 commit 628a5b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

webview-ui/src/components/chat/CodebaseSearchResultsDisplay.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useState } from "react"
22
import CodebaseSearchResult from "./CodebaseSearchResult"
3-
import { useTranslation } from "react-i18next"
3+
import { Trans } from "react-i18next"
44

55
interface CodebaseSearchResultsDisplayProps {
66
query: string
@@ -14,7 +14,6 @@ interface CodebaseSearchResultsDisplayProps {
1414
}
1515

1616
const CodebaseSearchResultsDisplay: React.FC<CodebaseSearchResultsDisplayProps> = ({ query, results }) => {
17-
const { t } = useTranslation()
1817
const [codebaseSearchResultsExpanded, setCodebaseSearchResultsExpanded] = useState(false)
1918

2019
return (
@@ -23,10 +22,11 @@ const CodebaseSearchResultsDisplay: React.FC<CodebaseSearchResultsDisplayProps>
2322
onClick={() => setCodebaseSearchResultsExpanded(!codebaseSearchResultsExpanded)}
2423
className="font-bold cursor-pointer flex items-center justify-between px-2 py-2 rounded border bg-[var(--vscode-editor-background)] border-[var(--vscode-editorGroup-border)]">
2524
<span>
26-
{t("chat:codebaseSearch.didSearch", {
27-
query,
28-
count: results.length,
29-
})}
25+
<Trans
26+
i18nKey="chat:codebaseSearch.didSearch"
27+
components={{ code: <code></code> }}
28+
values={{ query, count: results.length }}
29+
/>
3030
</span>
3131
<span className={`codicon codicon-chevron-${codebaseSearchResultsExpanded ? "up" : "down"}`}></span>
3232
</div>

0 commit comments

Comments
 (0)