summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context/global-sync.tsx
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-01-20 10:43:43 -0600
committerAdam <[email protected]>2026-01-20 17:58:06 -0600
commit0f2e8ea2b49fcab8c539449b51c40eea8215c2d3 (patch)
treeabdad87b9bb3e608d74c6ab478bf76a50b0f6cce /packages/app/src/context/global-sync.tsx
parentbe493e8be045f25f38e619b79730f437839752a8 (diff)
downloadopencode-0f2e8ea2b49fcab8c539449b51c40eea8215c2d3.tar.gz
opencode-0f2e8ea2b49fcab8c539449b51c40eea8215c2d3.zip
wip(app): i18n
Diffstat (limited to 'packages/app/src/context/global-sync.tsx')
-rw-r--r--packages/app/src/context/global-sync.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx
index 14dc6e054..1738cb38b 100644
--- a/packages/app/src/context/global-sync.tsx
+++ b/packages/app/src/context/global-sync.tsx
@@ -41,6 +41,7 @@ import {
import { showToast } from "@opencode-ai/ui/toast"
import { getFilename } from "@opencode-ai/util/path"
import { usePlatform } from "./platform"
+import { useLanguage } from "@/context/language"
import { Persist, persisted } from "@/utils/persist"
type State = {
@@ -95,6 +96,7 @@ type ChildOptions = {
function createGlobalSync() {
const globalSDK = useGlobalSDK()
const platform = usePlatform()
+ const language = useLanguage()
const owner = getOwner()
if (!owner) throw new Error("GlobalSync must be created within owner")
const vcsCache = new Map<string, VcsCache>()
@@ -232,7 +234,7 @@ function createGlobalSync() {
.catch((err) => {
console.error("Failed to load sessions", err)
const project = getFilename(directory)
- showToast({ title: `Failed to load sessions for ${project}`, description: err.message })
+ showToast({ title: language.t("toast.session.listFailed.title", { project }), description: err.message })
})
sessionLoads.set(directory, promise)
@@ -658,7 +660,7 @@ function createGlobalSync() {
if (!health?.healthy) {
setGlobalStore(
"error",
- new Error(`Could not connect to server. Is there a server running at \`${globalSDK.url}\`?`),
+ new Error(language.t("error.globalSync.connectFailed", { url: globalSDK.url })),
)
return
}