From 97aec21cb3e74cabcae77fd89a2e8be67376b3a5 Mon Sep 17 00:00:00 2001 From: adamelmore <2363879+adamdottv@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:18:10 -0600 Subject: chore(app): missing i18n strings --- packages/ui/src/components/line-comment.tsx | 21 ++++++++++++++++----- packages/ui/src/components/session-review.tsx | 4 ++-- packages/ui/src/i18n/en.ts | 9 +++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) (limited to 'packages/ui/src') 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", -- cgit v1.2.3