diff options
| author | adamelmore <[email protected]> | 2026-01-26 12:18:10 -0600 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2026-01-26 13:03:34 -0600 |
| commit | 97aec21cb3e74cabcae77fd89a2e8be67376b3a5 (patch) | |
| tree | a240cd9c215664563d60da9943cf5264226635c1 /packages/ui/src/components | |
| parent | 319ad2a3916862adaedcc52a8b88d8e131516b1f (diff) | |
| download | opencode-97aec21cb3e74cabcae77fd89a2e8be67376b3a5.tar.gz opencode-97aec21cb3e74cabcae77fd89a2e8be67376b3a5.zip | |
chore(app): missing i18n strings
Diffstat (limited to 'packages/ui/src/components')
| -rw-r--r-- | packages/ui/src/components/line-comment.tsx | 21 | ||||
| -rw-r--r-- | packages/ui/src/components/session-review.tsx | 4 |
2 files changed, 18 insertions, 7 deletions
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<LineCommentAnchorProps, "children" | "varian } export const LineComment = (props: LineCommentProps) => { + const i18n = useI18n() const [split, rest] = splitProps(props, ["comment", "selection"]) return ( <LineCommentAnchor {...rest} variant="default"> <div data-slot="line-comment-content"> <div data-slot="line-comment-text">{split.comment}</div> - <div data-slot="line-comment-label">Comment on {split.selection}</div> + <div data-slot="line-comment-label"> + {i18n.t("ui.lineComment.label.prefix")} + {split.selection} + {i18n.t("ui.lineComment.label.suffix")} + </div> </div> </LineCommentAnchor> ) @@ -86,6 +92,7 @@ export type LineCommentEditorProps = Omit<LineCommentAnchorProps, "children" | " } export const LineCommentEditor = (props: LineCommentEditorProps) => { + 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) => { }} /> <div data-slot="line-comment-actions"> - <div data-slot="line-comment-editor-label">Commenting on {split.selection}</div> + <div data-slot="line-comment-editor-label"> + {i18n.t("ui.lineComment.editorLabel.prefix")} + {split.selection} + {i18n.t("ui.lineComment.editorLabel.suffix")} + </div> <Button size="small" variant="ghost" onClick={split.onCancel}> - {split.cancelLabel ?? "Cancel"} + {split.cancelLabel ?? i18n.t("ui.common.cancel")} </Button> <Button size="small" variant="primary" disabled={split.value.trim().length === 0} onClick={submit}> - {split.submitLabel ?? "Comment"} + {split.submitLabel ?? i18n.t("ui.lineComment.submit")} </Button> </div> </div> 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) => { <Switch> <Match when={isAdded()}> <span data-slot="session-review-change" data-type="added"> - Added + {i18n.t("ui.sessionReview.change.added")} </span> </Match> <Match when={isDeleted()}> <span data-slot="session-review-change" data-type="removed"> - Removed + {i18n.t("ui.sessionReview.change.removed")} </span> </Match> <Match when={true}> |
