Skip to content

Commit c27f856

Browse files
committed
fix: add translation for 'No results found' and auto-focus search input
- Added translation key 'modeSelector.noResults' for the hardcoded 'No results found' text - Added auto-focus functionality to search input when mode selector popover opens - Updated all language files with appropriate translations
1 parent 45e3606 commit c27f856

File tree

19 files changed

+46
-19
lines changed

19 files changed

+46
-19
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ export const ModeSelector = ({
114114
[trackModeSelectorOpened],
115115
)
116116

117+
// Auto-focus search input when popover opens
118+
React.useEffect(() => {
119+
if (open && searchInputRef.current) {
120+
searchInputRef.current.focus()
121+
}
122+
}, [open])
123+
117124
// Combine instruction text for tooltip
118125
const instructionText = `${t("chat:modeSelector.description")} ${modeShortcutText}`
119126

@@ -172,7 +179,9 @@ export const ModeSelector = ({
172179
{/* Mode List */}
173180
<div className="max-h-[300px] overflow-y-auto">
174181
{filteredModes.length === 0 && searchValue ? (
175-
<div className="py-2 px-3 text-sm text-vscode-foreground/70">No results found</div>
182+
<div className="py-2 px-3 text-sm text-vscode-foreground/70">
183+
{t("chat:modeSelector.noResults")}
184+
</div>
176185
) : (
177186
<div className="py-1">
178187
{filteredModes.map((mode) => (

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@
119119
"marketplace": "Mode Marketplace",
120120
"settings": "Mode Settings",
121121
"description": "Specialized personas that tailor Roo's behavior.",
122-
"searchPlaceholder": "Search modes..."
122+
"searchPlaceholder": "Search modes...",
123+
"noResults": "No results found"
123124
},
124125
"enhancePromptDescription": "The 'Enhance Prompt' button helps improve your prompt by providing additional context, clarification, or rephrasing. Try typing a prompt in here and clicking the button again to see how it works.",
125126
"addImages": "Add images to message",

webview-ui/src/i18n/locales/es/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ja/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)