mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 22:40:22 +00:00
wip(app): i18n
This commit is contained in:
parent
be493e8be0
commit
0f2e8ea2b4
15 changed files with 110 additions and 89 deletions
|
|
@ -7,6 +7,7 @@ import { useParams } from "@solidjs/router"
|
|||
import { getFilename } from "@opencode-ai/util/path"
|
||||
import { useSDK } from "./sdk"
|
||||
import { useSync } from "./sync"
|
||||
import { useLanguage } from "@/context/language"
|
||||
import { Persist, persisted } from "@/utils/persist"
|
||||
|
||||
export type FileSelection = {
|
||||
|
|
@ -186,6 +187,7 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
|||
const sdk = useSDK()
|
||||
const sync = useSync()
|
||||
const params = useParams()
|
||||
const language = useLanguage()
|
||||
|
||||
const directory = createMemo(() => sync.data.path.directory)
|
||||
|
||||
|
|
@ -323,7 +325,7 @@ export const { use: useFile, provider: FileProvider } = createSimpleContext({
|
|||
)
|
||||
showToast({
|
||||
variant: "error",
|
||||
title: "Failed to load file",
|
||||
title: language.t("toast.file.loadFailed.title"),
|
||||
description: e.message,
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue