summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/components/dialog-select-file.tsx
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-20 05:40:44 -0600
committerAdam <[email protected]>2026-01-20 17:58:06 -0600
commit92beae14100af23c20afe7b6bc2bb393643d698f (patch)
tree1047cf04130c98edac5dd322613608e3ec4b5f46 /packages/app/src/components/dialog-select-file.tsx
parent0470717c7fbb9ff175b70c6d76ffb2330ef40a1a (diff)
downloadopencode-92beae14100af23c20afe7b6bc2bb393643d698f.tar.gz
opencode-92beae14100af23c20afe7b6bc2bb393643d698f.zip
wip(app): i18n
Diffstat (limited to 'packages/app/src/components/dialog-select-file.tsx')
-rw-r--r--packages/app/src/components/dialog-select-file.tsx18
1 files changed, 13 insertions, 5 deletions
diff --git a/packages/app/src/components/dialog-select-file.tsx b/packages/app/src/components/dialog-select-file.tsx
index 2e28c4d2e..7c3113a54 100644
--- a/packages/app/src/components/dialog-select-file.tsx
+++ b/packages/app/src/components/dialog-select-file.tsx
@@ -9,6 +9,7 @@ import { createMemo, createSignal, onCleanup, Show } from "solid-js"
import { formatKeybind, useCommand, type CommandOption } from "@/context/command"
import { useLayout } from "@/context/layout"
import { useFile } from "@/context/file"
+import { useLanguage } from "@/context/language"
type EntryType = "command" | "file"
@@ -18,13 +19,14 @@ type Entry = {
title: string
description?: string
keybind?: string
- category: "Commands" | "Files"
+ category: string
option?: CommandOption
path?: string
}
export function DialogSelectFile() {
const command = useCommand()
+ const language = useLanguage()
const layout = useLayout()
const file = useFile()
const dialog = useDialog()
@@ -56,7 +58,7 @@ export function DialogSelectFile() {
title: option.title,
description: option.description,
keybind: option.keybind,
- category: "Commands",
+ category: language.t("palette.group.commands"),
option,
})
@@ -64,7 +66,7 @@ export function DialogSelectFile() {
id: "file:" + path,
type: "file",
title: path,
- category: "Files",
+ category: language.t("palette.group.files"),
path,
})
@@ -143,8 +145,14 @@ export function DialogSelectFile() {
return (
<Dialog class="pt-3 pb-0 !max-h-[480px]">
<List
- search={{ placeholder: "Search files and commands", autofocus: true, hideIcon: true, class: "pl-3 pr-2 !mb-0" }}
- emptyMessage="No results found"
+ search={{
+ placeholder: language.t("palette.search.placeholder"),
+ autofocus: true,
+ hideIcon: true,
+ class: "pl-3 pr-2 !mb-0",
+ }}
+ emptyMessage={language.t("palette.empty")}
+ loadingMessage={language.t("common.loading")}
items={items}
key={(item) => item.id}
filterKeys={["title", "description", "category"]}