diff --git a/packages/app/src/components/dialog-settings.tsx b/packages/app/src/components/dialog-settings.tsx index 5efee5a3c..dbae37c9d 100644 --- a/packages/app/src/components/dialog-settings.tsx +++ b/packages/app/src/components/dialog-settings.tsx @@ -50,7 +50,7 @@ export const DialogSettings: Component = () => {
- OpenCode Desktop + {language.t("app.name.desktop")} v{platform.version}
diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 5ec0eb1ea..84f16d67e 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -1565,7 +1565,7 @@ export const PromptInput: Component = (props) => { const timeoutMs = 5 * 60 * 1000 const timeout = new Promise>>((resolve) => { setTimeout(() => { - resolve({ status: "failed", message: "Workspace is still preparing" }) + resolve({ status: "failed", message: language.t("workspace.error.stillPreparing") }) }, timeoutMs) }) @@ -1863,9 +1863,9 @@ export const PromptInput: Component = (props) => { store.mode === "shell" ? language.t("prompt.placeholder.shell") : commentCount() > 1 - ? "Summarize comments…" + ? language.t("prompt.placeholder.summarizeComments") : commentCount() === 1 - ? "Summarize comment…" + ? language.t("prompt.placeholder.summarizeComment") : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) }) } contenteditable="true" @@ -1887,9 +1887,9 @@ export const PromptInput: Component = (props) => { {store.mode === "shell" ? language.t("prompt.placeholder.shell") : commentCount() > 1 - ? "Summarize comments…" + ? language.t("prompt.placeholder.summarizeComments") : commentCount() === 1 - ? "Summarize comment…" + ? language.t("prompt.placeholder.summarizeComment") : language.t("prompt.placeholder.normal", { example: language.t(EXAMPLES[store.placeholder]) })} diff --git a/packages/app/src/components/session/session-header.tsx b/packages/app/src/components/session/session-header.tsx index 8480e6060..9db0cdcec 100644 --- a/packages/app/src/components/session/session-header.tsx +++ b/packages/app/src/components/session/session-header.tsx @@ -281,7 +281,7 @@ export function SessionHeader() { @@ -1777,7 +1777,9 @@ export default function Page() { sync.session.history.loadMore(id) }} > - {historyLoading() ? "Loading earlier messages..." : "Load earlier messages"} + {historyLoading() + ? language.t("session.messages.loadingEarlier") + : language.t("session.messages.loadEarlier")} @@ -1911,7 +1913,7 @@ export default function Page() { when={prompt.ready()} fallback={
- {handoff.prompt || "Loading prompt..."} + {handoff.prompt || language.t("prompt.loading")}
} > @@ -2057,7 +2059,7 @@ export default function Page() {
- No changes in this session yet + {language.t("session.review.empty")}
@@ -2071,7 +2073,9 @@ export default function Page() {
-
Select a file to open
+
+ {language.t("session.files.selectToOpen")} +
@@ -2609,7 +2613,9 @@ export default function Page() {
-
No changes in this session yet
+
+ {language.t("session.review.empty")} +
@@ -2624,10 +2630,11 @@ export default function Page() { - {reviewCount()} {reviewCount() === 1 ? "Change" : "Changes"} + {reviewCount()}{" "} + {language.t(reviewCount() === 1 ? "session.review.change.one" : "session.review.change.other")} - All files + {language.t("session.files.all")} @@ -2635,7 +2642,12 @@ export default function Page() { Loading...} + fallback={ +
+ {language.t("common.loading")} + {language.t("common.loading.ellipsis")} +
+ } >
-
No changes
+
+ {language.t("session.review.noChanges")} +
@@ -2702,9 +2716,14 @@ export default function Page() { )}
-
Loading...
+
+ {language.t("common.loading")} + {language.t("common.loading.ellipsis")} +
+
+
+ {language.t("terminal.loading")}
-
Loading terminal...
} > diff --git a/packages/ui/src/components/line-comment.tsx b/packages/ui/src/components/line-comment.tsx index f8869748c..81e4759b0 100644 --- a/packages/ui/src/components/line-comment.tsx +++ b/packages/ui/src/components/line-comment.tsx @@ -1,6 +1,7 @@ import { onMount, Show, splitProps, type JSX } from "solid-js" import { Button } from "./button" import { Icon } from "./icon" +import { useI18n } from "../context/i18n" export type LineCommentVariant = "default" | "editor" @@ -60,13 +61,18 @@ export type LineCommentProps = Omit { + const i18n = useI18n() const [split, rest] = splitProps(props, ["comment", "selection"]) return (
{split.comment}
-
Comment on {split.selection}
+
+ {i18n.t("ui.lineComment.label.prefix")} + {split.selection} + {i18n.t("ui.lineComment.label.suffix")} +
) @@ -86,6 +92,7 @@ export type LineCommentEditorProps = Omit { + const i18n = useI18n() const [split, rest] = splitProps(props, [ "value", "selection", @@ -125,7 +132,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => { }} data-slot="line-comment-textarea" rows={split.rows ?? 3} - placeholder={split.placeholder ?? "Add comment"} + placeholder={split.placeholder ?? i18n.t("ui.lineComment.placeholder")} value={split.value} onInput={(e) => split.onInput(e.currentTarget.value)} onKeyDown={(e) => { @@ -143,12 +150,16 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => { }} />
-
Commenting on {split.selection}
+
+ {i18n.t("ui.lineComment.editorLabel.prefix")} + {split.selection} + {i18n.t("ui.lineComment.editorLabel.suffix")} +
diff --git a/packages/ui/src/components/session-review.tsx b/packages/ui/src/components/session-review.tsx index 9a337c453..8dfbbb1ca 100644 --- a/packages/ui/src/components/session-review.tsx +++ b/packages/ui/src/components/session-review.tsx @@ -530,12 +530,12 @@ export const SessionReview = (props: SessionReviewProps) => { - Added + {i18n.t("ui.sessionReview.change.added")} - Removed + {i18n.t("ui.sessionReview.change.removed")} diff --git a/packages/ui/src/i18n/en.ts b/packages/ui/src/i18n/en.ts index 502d047f7..da77b04aa 100644 --- a/packages/ui/src/i18n/en.ts +++ b/packages/ui/src/i18n/en.ts @@ -4,6 +4,15 @@ export const dict = { "ui.sessionReview.diffStyle.split": "Split", "ui.sessionReview.expandAll": "Expand all", "ui.sessionReview.collapseAll": "Collapse all", + "ui.sessionReview.change.added": "Added", + "ui.sessionReview.change.removed": "Removed", + + "ui.lineComment.label.prefix": "Comment on ", + "ui.lineComment.label.suffix": "", + "ui.lineComment.editorLabel.prefix": "Commenting on ", + "ui.lineComment.editorLabel.suffix": "", + "ui.lineComment.placeholder": "Add comment", + "ui.lineComment.submit": "Comment", "ui.sessionTurn.steps.show": "Show steps", "ui.sessionTurn.steps.hide": "Hide steps",