@agimon-ai/po-git 0.0.0-alpha.194 → 0.0.0-alpha.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineHostStore, defineNativePlugin, defineSessionStore, defineWebLifecycle, nativeApiTransport, sessionApiAddress } from "@agimon-ai/po-core/native";
1
+ import { createApiClient, defineActivityGroup, defineChannelFile, defineFill, defineHostStore, defineNativePlugin, defineSessionStore, defineWebLifecycle, nativeApiTransport, sessionApiAddress, t, useT } from "@agimon-ai/po-core/native";
2
2
  import { View } from "react-native-unistyles/components/native/View";
3
3
  import { Text } from "react-native-unistyles/components/native/Text";
4
4
  import { ScrollView } from "react-native-unistyles/components/native/ScrollView";
@@ -75,8 +75,8 @@ function folderName(path) {
75
75
  return path.split(/[\\/]/).filter((part) => part !== "").pop() ?? path;
76
76
  }
77
77
  /** Where a busy branch is checked out, short enough for one line. */
78
- function busyNote(busyAt, workspaceRoot) {
79
- return busyAt === workspaceRoot ? "Checked out here" : `Checked out in ${folderName(busyAt)}`;
78
+ function busyNote(t, busyAt, workspaceRoot) {
79
+ return busyAt === workspaceRoot ? t("git.ui.checkedOutHere", "Checked out here") : t("git.branch.checkedOutIn", "Checked out in {folder}", { folder: folderName(busyAt) });
80
80
  }
81
81
  /**
82
82
  * Local branches a session can take, then the checked-out ones, then remote-only ones, filtered by a
@@ -108,12 +108,12 @@ function baseOptions(branches) {
108
108
  ])];
109
109
  }
110
110
  /** Why the form cannot be submitted yet, or undefined when it can. */
111
- function formProblem(state) {
111
+ function formProblem(t, state) {
112
112
  if (state.mode === "existing") {
113
- if (state.selected === void 0) return "Pick a branch.";
114
- if (state.selected.busyAt !== void 0) return `That branch is checked out at ${state.selected.busyAt}.`;
113
+ if (state.selected === void 0) return t("git.ui.pickABranch", "Pick a branch.");
114
+ if (state.selected.busyAt !== void 0) return t("git.branch.busyAt", "That branch is checked out at {path}.", { path: state.selected.busyAt });
115
115
  }
116
- if (state.mode === "new" && state.newBranch.trim() === "") return "Name the new branch.";
116
+ if (state.mode === "new" && state.newBranch.trim() === "") return t("git.ui.nameTheNewBranch", "Name the new branch.");
117
117
  }
118
118
  /** The launch profile choice for any session kind, or undefined when none was made. */
119
119
  function launchSelection(state) {
@@ -145,22 +145,23 @@ function createRequest(state) {
145
145
  }
146
146
  //#endregion
147
147
  //#region src/extensions/workspaces/(frontend)/fill/_components/GitNewSessionSheet.native.tsx
148
- const MODES = [
149
- {
150
- value: "existing",
151
- label: "Existing"
152
- },
153
- {
154
- value: "new",
155
- label: "New branch"
156
- },
157
- {
158
- value: "plain",
159
- label: "No branch"
160
- }
161
- ];
162
148
  /** The native twin of GitNewSessionDialogView: the same form state and checks, in sheet parts. */
163
149
  function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initialForm, busy = false, error = "", onCreate }) {
150
+ const t = useT();
151
+ const MODES = [
152
+ {
153
+ value: "existing",
154
+ label: t("git.ui.existing", "Existing")
155
+ },
156
+ {
157
+ value: "new",
158
+ label: t("git.ui.newBranch", "New branch")
159
+ },
160
+ {
161
+ value: "plain",
162
+ label: t("git.ui.noBranch", "No branch")
163
+ }
164
+ ];
164
165
  const [form, setForm] = useState({
165
166
  mode: "existing",
166
167
  newBranch: "",
@@ -178,28 +179,28 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
178
179
  mode,
179
180
  baseRef: form.baseRef || branches?.defaultBase || ""
180
181
  };
181
- const problem = formProblem(state);
182
+ const problem = formProblem(t, state);
182
183
  const update = (patch) => setForm((current) => ({
183
184
  ...current,
184
185
  ...patch
185
186
  }));
186
187
  const options = branches === null ? [] : branchOptions(branches, query);
187
188
  const bases = branches === null ? [] : baseOptions(branches);
188
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: "New session" }) }), /* @__PURE__ */ jsxs(SheetBody, {
189
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: t("git.ui.newSession", "New session") }) }), /* @__PURE__ */ jsxs(SheetBody, {
189
190
  style: styles$3.body,
190
191
  children: [
191
192
  /* @__PURE__ */ jsx(Text, {
192
193
  style: styles$3.root,
193
194
  numberOfLines: 1,
194
- accessibilityLabel: `Workspace ${workspaceRoot}`,
195
+ accessibilityLabel: t("git.session.workspace", "Workspace {path}", { path: workspaceRoot }),
195
196
  children: folderName(workspaceRoot)
196
197
  }),
197
198
  !ready ? /* @__PURE__ */ jsx(Text, {
198
199
  testID: "git-new-session-plain-note",
199
200
  style: styles$3.dim,
200
- children: loading ? "Reading branches..." : loadError || "This workspace is not a git checkout. Start a plain session in this folder."
201
+ children: loading ? t("git.ui.readingBranchesPending", "Reading branches...") : loadError || t("git.ui.thisWorkspaceIsNotAGitCheckoutStartAPlainSessionInThisFolder", "This workspace is not a git checkout. Start a plain session in this folder.")
201
202
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SegmentedControl, {
202
- accessibilityLabel: "Session kind",
203
+ accessibilityLabel: t("git.ui.sessionKind", "Session kind"),
203
204
  options: MODES,
204
205
  value: mode,
205
206
  disabled: busy,
@@ -207,11 +208,11 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
207
208
  }), mode === "existing" ? /* @__PURE__ */ jsxs(View, {
208
209
  style: styles$3.field,
209
210
  children: [
210
- /* @__PURE__ */ jsx(Label, { children: "Branch" }),
211
+ /* @__PURE__ */ jsx(Label, { children: t("git.ui.branch", "Branch") }),
211
212
  /* @__PURE__ */ jsx(Input, {
212
213
  testID: "git-new-session-branch-search",
213
- accessibilityLabel: "Find a branch",
214
- placeholder: "Find a branch",
214
+ accessibilityLabel: t("git.ui.findABranch", "Find a branch"),
215
+ placeholder: t("git.ui.findABranch", "Find a branch"),
215
216
  autoCapitalize: "none",
216
217
  autoCorrect: false,
217
218
  value: query,
@@ -221,17 +222,17 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
221
222
  /* @__PURE__ */ jsxs(ScrollView, {
222
223
  style: styles$3.list,
223
224
  nestedScrollEnabled: true,
224
- accessibilityLabel: "Branches",
225
+ accessibilityLabel: t("git.ui.branches", "Branches"),
225
226
  children: [options.length === 0 ? /* @__PURE__ */ jsx(Text, {
226
227
  style: [styles$3.dim, styles$3.pad],
227
- children: "No matching branches"
228
+ children: t("git.ui.noMatchingBranches", "No matching branches")
228
229
  }) : null, options.map((branch, index) => /* @__PURE__ */ jsxs(View, { children: [branch.remote !== void 0 && (index === 0 || options[index - 1]?.remote === void 0) ? /* @__PURE__ */ jsx(Text, {
229
230
  style: [
230
231
  styles$3.dim,
231
232
  styles$3.pad,
232
233
  styles$3.divider
233
234
  ],
234
- children: "Remote branches"
235
+ children: t("git.ui.remoteBranches", "Remote branches")
235
236
  }) : null, /* @__PURE__ */ jsx(ListRow, {
236
237
  title: /* @__PURE__ */ jsx(Text, {
237
238
  style: styles$3.mono,
@@ -242,8 +243,8 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
242
243
  description: branch.busyAt !== void 0 ? /* @__PURE__ */ jsx(Text, {
243
244
  style: styles$3.dim,
244
245
  numberOfLines: 1,
245
- children: busyNote(branch.busyAt, workspaceRoot)
246
- }) : branch.current ? "Current" : void 0,
246
+ children: busyNote(t, branch.busyAt, workspaceRoot)
247
+ }) : branch.current ? t("git.ui.current", "Current") : void 0,
247
248
  trailing: form.selected?.key === branch.key ? /* @__PURE__ */ jsx(CheckIcon, {
248
249
  size: 16,
249
250
  color: "green"
@@ -258,9 +259,9 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
258
259
  ]
259
260
  }) : mode === "new" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(View, {
260
261
  style: styles$3.field,
261
- children: [/* @__PURE__ */ jsx(Label, { children: "Branch name" }), /* @__PURE__ */ jsx(Input, {
262
+ children: [/* @__PURE__ */ jsx(Label, { children: t("git.ui.branchName", "Branch name") }), /* @__PURE__ */ jsx(Input, {
262
263
  testID: "git-new-session-new-branch",
263
- accessibilityLabel: "Branch name",
264
+ accessibilityLabel: t("git.ui.branchName", "Branch name"),
264
265
  placeholder: "feature/my-change",
265
266
  autoCapitalize: "none",
266
267
  autoCorrect: false,
@@ -271,14 +272,14 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
271
272
  })]
272
273
  }), /* @__PURE__ */ jsxs(View, {
273
274
  style: styles$3.field,
274
- children: [/* @__PURE__ */ jsx(Label, { children: "From" }), /* @__PURE__ */ jsxs(ScrollView, {
275
+ children: [/* @__PURE__ */ jsx(Label, { children: t("git.ui.from", "From") }), /* @__PURE__ */ jsxs(ScrollView, {
275
276
  style: styles$3.list,
276
277
  nestedScrollEnabled: true,
277
278
  children: [/* @__PURE__ */ jsx(ListRow, {
278
- accessibilityLabel: "From",
279
+ accessibilityLabel: t("git.ui.from", "From"),
279
280
  title: /* @__PURE__ */ jsx(Text, {
280
281
  style: styles$3.mono,
281
- children: state.baseRef || "Current branch"
282
+ children: state.baseRef || t("git.ui.currentBranch", "Current branch")
282
283
  }),
283
284
  disabled: busy,
284
285
  onPress: () => setBasesOpen((open) => !open)
@@ -298,14 +299,14 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
298
299
  })]
299
300
  })] }) : /* @__PURE__ */ jsx(Text, {
300
301
  style: styles$3.dim,
301
- children: "Start in this workspace folder, without creating a worktree."
302
+ children: t("git.ui.startInThisWorkspaceFolderWithoutCreatingAWorktree", "Start in this workspace folder, without creating a worktree.")
302
303
  })] }),
303
304
  /* @__PURE__ */ jsxs(View, {
304
305
  style: styles$3.field,
305
- children: [/* @__PURE__ */ jsx(Label, { children: "Name" }), /* @__PURE__ */ jsx(Input, {
306
+ children: [/* @__PURE__ */ jsx(Label, { children: t("git.ui.name", "Name") }), /* @__PURE__ */ jsx(Input, {
306
307
  testID: "new-session-name",
307
- accessibilityLabel: "Session name",
308
- placeholder: mode === "plain" ? "Optional" : "Optional, defaults to the branch",
308
+ accessibilityLabel: t("git.ui.sessionName", "Session name"),
309
+ placeholder: mode === "plain" ? t("git.ui.optional", "Optional") : t("git.ui.optionalDefaultsToTheBranch", "Optional, defaults to the branch"),
309
310
  value: form.name,
310
311
  onChangeText: (name) => update({ name }),
311
312
  disabled: busy
@@ -314,7 +315,7 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
314
315
  mode !== "plain" ? /* @__PURE__ */ jsx(Text, {
315
316
  testID: "new-session-hint",
316
317
  style: styles$3.dim,
317
- children: (loading ? void 0 : problem) ?? "Runs in its own worktree, so this checkout stays as it is."
318
+ children: (loading ? void 0 : problem) ?? t("git.ui.runsInItsOwnWorktreeSoThisCheckoutStaysAsItIs", "Runs in its own worktree, so this checkout stays as it is.")
318
319
  }) : null,
319
320
  error ? /* @__PURE__ */ jsx(Text, {
320
321
  testID: "new-session-error",
@@ -327,20 +328,21 @@ function GitNewSessionSheetView({ workspaceRoot, branches, loadError = "", initi
327
328
  variant: "primary",
328
329
  size: "lg",
329
330
  loading: busy,
330
- loadingLabel: mode === "plain" ? "Creating session" : "Creating worktree",
331
+ loadingLabel: mode === "plain" ? t("git.ui.creatingSession", "Creating session") : t("git.ui.creatingWorktree", "Creating worktree"),
331
332
  disabled: loading || problem !== void 0,
332
333
  accessibilityHint: problem,
333
334
  onPress: () => onCreate(state),
334
- children: "Create session"
335
+ children: t("git.ui.createSession", "Create session")
335
336
  })
336
337
  ]
337
338
  })] });
338
339
  }
339
340
  function errorOf(body, status) {
340
- return typeof body === "object" && body !== null && typeof body.error === "string" ? body.error : `The cockpit answered ${String(status)}.`;
341
+ return typeof body === "object" && body !== null && typeof body.error === "string" ? body.error : t("git.request.status", "The cockpit answered {status}.", { status });
341
342
  }
342
343
  /** The native new-session sheet when git is installed; mirrors GitNewSessionDialog's calls. */
343
344
  function GitNewSessionSheet({ newSession }) {
345
+ const t = useT();
344
346
  const [branches, setBranches] = useState(null);
345
347
  const [loadError, setLoadError] = useState("");
346
348
  const [error, setError] = useState("");
@@ -356,15 +358,15 @@ function GitNewSessionSheet({ newSession }) {
356
358
  if (!response.ok) setLoadError(errorOf(body, response.status));
357
359
  else setBranches(body);
358
360
  }).catch(() => {
359
- if (!stale) setLoadError("The branches could not be loaded.");
361
+ if (!stale) setLoadError(t("git.ui.theBranchesCouldNotBeLoaded", "The branches could not be loaded."));
360
362
  });
361
363
  return () => {
362
364
  stale = true;
363
365
  };
364
- }, [workspaceId]);
366
+ }, [workspaceId, t]);
365
367
  if (newSession === void 0) return null;
366
368
  const submit = async (state) => {
367
- if (busy || formProblem(state) !== void 0) return;
369
+ if (busy || formProblem(t, state) !== void 0) return;
368
370
  setBusy(true);
369
371
  setError("");
370
372
  const body = createRequest(state);
@@ -381,7 +383,7 @@ function GitNewSessionSheet({ newSession }) {
381
383
  failure = response.ok ? await newSession.openCreated(answer.sessionId) : errorOf(answer, response.status);
382
384
  }
383
385
  } catch {
384
- failure = "The cockpit is unreachable.";
386
+ failure = t("git.ui.theCockpitIsUnreachable", "The cockpit is unreachable.");
385
387
  }
386
388
  if (failure === void 0) return;
387
389
  setError(failure);
@@ -635,16 +637,17 @@ function useWorktrees(sessionId) {
635
637
  function worktreesTab() {
636
638
  return {
637
639
  id: "git-worktrees",
638
- label: "worktrees",
640
+ label: t("git.tab.worktrees", "worktrees"),
639
641
  panel: WorktreesPanel
640
642
  };
641
643
  }
642
644
  function WorktreesHeader({ activity = false, onNew, disabled = false, showNew = true }) {
645
+ const t = useT();
643
646
  return /* @__PURE__ */ jsxs(View, {
644
647
  style: styles$2.header,
645
648
  children: [/* @__PURE__ */ jsx(Text, {
646
649
  style: styles$2.title,
647
- children: activity ? "Activity" : "Worktrees"
650
+ children: activity ? t("git.ui.activity", "Activity") : t("git.ui.worktrees", "Worktrees")
648
651
  }), !activity && showNew ? /* @__PURE__ */ jsx(Button, {
649
652
  testID: "git-worktree-create",
650
653
  variant: "ghost",
@@ -653,12 +656,13 @@ function WorktreesHeader({ activity = false, onNew, disabled = false, showNew =
653
656
  onPress: onNew,
654
657
  children: /* @__PURE__ */ jsx(Text, {
655
658
  style: styles$2.jade,
656
- children: "+ New"
659
+ children: t("git.ui.new", "+ New")
657
660
  })
658
661
  }) : null]
659
662
  });
660
663
  }
661
664
  function WorktreeRow({ item, error, compact = false, onClose, onOpen, disabled = false }) {
665
+ const t = useT();
662
666
  return /* @__PURE__ */ jsxs(View, {
663
667
  style: styles$2.worktree,
664
668
  children: [
@@ -672,7 +676,7 @@ function WorktreeRow({ item, error, compact = false, onClose, onOpen, disabled =
672
676
  /* @__PURE__ */ jsxs(Pressable, {
673
677
  style: styles$2.grow,
674
678
  accessibilityRole: onOpen ? "button" : void 0,
675
- accessibilityLabel: onOpen ? `Open session for ${item.branch}` : void 0,
679
+ accessibilityLabel: onOpen ? t("git.worktree.openSession", "Open session for {branch}", { branch: item.branch }) : void 0,
676
680
  onPress: onOpen,
677
681
  disabled: !onOpen,
678
682
  children: [/* @__PURE__ */ jsx(Text, {
@@ -682,23 +686,23 @@ function WorktreeRow({ item, error, compact = false, onClose, onOpen, disabled =
682
686
  children: compact && item.branch.length > 36 ? `${item.branch.slice(0, 19)}…${item.branch.slice(-14)}` : item.branch
683
687
  }), !compact ? /* @__PURE__ */ jsx(Text, {
684
688
  style: styles$2.dim,
685
- children: item.orphaned ? "Its folder is missing" : item.unowned ? "Its session has ended" : "Session running"
689
+ children: item.orphaned ? t("git.ui.itsFolderIsMissing", "Its folder is missing") : item.unowned ? t("git.ui.itsSessionHasEnded", "Its session has ended") : t("git.ui.sessionRunning", "Session running")
686
690
  }) : null]
687
691
  }),
688
692
  item.orphaned ? /* @__PURE__ */ jsx(Badge, {
689
693
  tone: "yellow",
690
694
  style: styles$2.caution,
691
- children: "Orphaned"
695
+ children: t("git.ui.orphaned", "Orphaned")
692
696
  }) : null,
693
697
  item.unowned ? /* @__PURE__ */ jsx(Badge, {
694
698
  tone: "blue",
695
699
  style: styles$2.info,
696
- children: "Unowned"
700
+ children: t("git.ui.unowned", "Unowned")
697
701
  }) : null,
698
702
  !compact ? /* @__PURE__ */ jsx(Button, {
699
703
  variant: "ghost",
700
704
  style: styles$2.more,
701
- accessibilityLabel: `Close ${item.branch}`,
705
+ accessibilityLabel: t("git.worktree.closeBranch", "Close {branch}", { branch: item.branch }),
702
706
  testID: `git-worktree-close-${item.id}`,
703
707
  onPress: onClose,
704
708
  disabled,
@@ -724,9 +728,10 @@ function WorktreeRow({ item, error, compact = false, onClose, onOpen, disabled =
724
728
  });
725
729
  }
726
730
  function WorktreeStarting({ branch }) {
731
+ const t = useT();
727
732
  return /* @__PURE__ */ jsxs(View, {
728
733
  style: styles$2.starting,
729
- children: [/* @__PURE__ */ jsx(Spinner, { label: "Starting session..." }), /* @__PURE__ */ jsxs(View, {
734
+ children: [/* @__PURE__ */ jsx(Spinner, { label: t("git.ui.startingSessionPending", "Starting session...") }), /* @__PURE__ */ jsxs(View, {
730
735
  style: styles$2.grow,
731
736
  children: [branch ? /* @__PURE__ */ jsx(Text, {
732
737
  numberOfLines: 1,
@@ -735,7 +740,7 @@ function WorktreeStarting({ branch }) {
735
740
  children: branch
736
741
  }) : null, /* @__PURE__ */ jsx(Text, {
737
742
  style: styles$2.dim,
738
- children: "Starting session..."
743
+ children: t("git.ui.startingSessionPending", "Starting session...")
739
744
  })]
740
745
  })]
741
746
  });
@@ -753,44 +758,45 @@ function WorktreeGroup({ title, count }) {
753
758
  });
754
759
  }
755
760
  function WorktreeForm({ close = false, branch = "", baseRef = "", onBranch, onBaseRef, onConfirm, onCancel, disabled = false, framed = true }) {
761
+ const t = useT();
756
762
  return /* @__PURE__ */ jsxs(View, {
757
763
  style: [styles$2.sheet, !framed && styles$2.unframed],
758
764
  children: [
759
765
  framed ? /* @__PURE__ */ jsx(View, { style: styles$2.handle }) : null,
760
766
  /* @__PURE__ */ jsx(Text, {
761
767
  style: styles$2.sheetTitle,
762
- children: close ? "Close this worktree?" : "New worktree"
768
+ children: close ? t("git.ui.closeThisWorktreeConfirm", "Close this worktree?") : t("git.ui.newWorktree", "New worktree")
763
769
  }),
764
770
  close ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
765
771
  style: styles$2.branch,
766
772
  children: branch
767
773
  }), /* @__PURE__ */ jsx(Text, {
768
774
  style: styles$2.body,
769
- children: "Removes the checkout and stops its session."
775
+ children: t("git.ui.removesTheCheckoutAndStopsItsSession", "Removes the checkout and stops its session.")
770
776
  })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
771
777
  /* @__PURE__ */ jsx(Text, {
772
778
  style: styles$2.body,
773
- children: "A separate checkout on its own branch, with its own session. This session stays where it is."
779
+ children: t("git.ui.aSeparateCheckoutOnItsOwnBranchWithItsOwnSessionThisSessionStaysWhereItIs", "A separate checkout on its own branch, with its own session. This session stays where it is.")
774
780
  }),
775
781
  /* @__PURE__ */ jsx(Text, {
776
782
  style: styles$2.label,
777
- children: "Branch"
783
+ children: t("git.ui.branch", "Branch")
778
784
  }),
779
785
  /* @__PURE__ */ jsx(Input, {
780
- accessibilityLabel: "Branch",
786
+ accessibilityLabel: t("git.ui.branch", "Branch"),
781
787
  value: branch,
782
788
  onChangeText: onBranch,
783
789
  style: styles$2.monoInput
784
790
  }),
785
791
  /* @__PURE__ */ jsx(Text, {
786
792
  style: styles$2.label,
787
- children: "Start from"
793
+ children: t("git.ui.startFrom", "Start from")
788
794
  }),
789
795
  /* @__PURE__ */ jsx(Input, {
790
- accessibilityLabel: "Start from",
796
+ accessibilityLabel: t("git.ui.startFrom", "Start from"),
791
797
  value: baseRef,
792
798
  onChangeText: onBaseRef,
793
- placeholder: "Current branch"
799
+ placeholder: t("git.ui.currentBranch", "Current branch")
794
800
  })
795
801
  ] }),
796
802
  /* @__PURE__ */ jsx(Button, {
@@ -798,21 +804,22 @@ function WorktreeForm({ close = false, branch = "", baseRef = "", onBranch, onBa
798
804
  disabled: disabled || !close && branch.trim() === "",
799
805
  variant: close ? "danger" : "primary",
800
806
  style: [styles$2.fullButton, !close && styles$2.createButton],
801
- children: close ? "Close worktree" : /* @__PURE__ */ jsx(Text, {
807
+ children: close ? t("git.ui.closeWorktree", "Close worktree") : /* @__PURE__ */ jsx(Text, {
802
808
  style: styles$2.createLabel,
803
- children: "Create worktree"
809
+ children: t("git.ui.createWorktree", "Create worktree")
804
810
  })
805
811
  }),
806
812
  /* @__PURE__ */ jsx(Button, {
807
813
  variant: "outline",
808
814
  style: styles$2.fullButton,
809
815
  onPress: onCancel,
810
- children: "Cancel"
816
+ children: t("git.ui.cancel", "Cancel")
811
817
  })
812
818
  ]
813
819
  });
814
820
  }
815
821
  function WorktreesView({ state, disabled = false, onNew, onClose, onOpen }) {
822
+ const t = useT();
816
823
  const { working, attention, starting, closeErrorId } = worktreesPresentation(state);
817
824
  const empty = state.worktrees.length === 0 && !starting;
818
825
  const busy = disabled || !!state.pending;
@@ -835,22 +842,25 @@ function WorktreesView({ state, disabled = false, onNew, onClose, onOpen }) {
835
842
  style: styles$2.content,
836
843
  children: [
837
844
  /* @__PURE__ */ jsx(WorktreeGroup, {
838
- title: "Working",
839
- count: `${working.length} open${starting ? " · 1 starting" : ""}`
845
+ title: t("git.ui.working", "Working"),
846
+ count: t("git.worktree.openStarting", "{count} open{starting}", {
847
+ count: working.length,
848
+ starting: starting ? t("git.worktree.oneStarting", " · 1 starting") : ""
849
+ })
840
850
  }),
841
851
  working.map(row),
842
852
  starting ? /* @__PURE__ */ jsx(WorktreeStarting, { branch: state.requestedBranch }) : null,
843
853
  attention.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
844
854
  /* @__PURE__ */ jsx(WorktreeGroup, {
845
- title: "Needs a look",
846
- count: `${attention.length} open`
855
+ title: t("git.ui.needsALook", "Needs a look"),
856
+ count: t("git.worktree.openCount", "{count} open", { count: attention.length })
847
857
  }),
848
858
  /* @__PURE__ */ jsxs(Text, {
849
859
  style: styles$2.dim,
850
860
  children: [
851
- attention.length === 2 ? "Two worktrees" : attention.length === 1 ? "One worktree" : `${attention.length} worktrees`,
861
+ attention.length === 2 ? t("git.ui.twoWorktrees", "Two worktrees") : attention.length === 1 ? t("git.ui.oneWorktree", "One worktree") : t("git.worktree.count", "{count} worktrees", { count: attention.length }),
852
862
  " ",
853
- "would like your eye, whenever you are ready."
863
+ t("git.ui.wouldLikeYourEyeWheneverYouAreReady", "would like your eye, whenever you are ready.")
854
864
  ]
855
865
  }),
856
866
  attention.map(row)
@@ -859,10 +869,10 @@ function WorktreesView({ state, disabled = false, onNew, onClose, onOpen }) {
859
869
  }) : /* @__PURE__ */ jsx(EmptyState, {
860
870
  testID: "git-worktrees-empty",
861
871
  icon: /* @__PURE__ */ jsx(BranchIcon, { size: 20 }),
862
- title: "No worktrees yet",
863
- description: "A worktree gives a branch its own checkout and a session nested under this one.",
872
+ title: t("git.ui.noWorktreesYet", "No worktrees yet"),
873
+ description: t("git.ui.aWorktreeGivesABranchItsOwnCheckoutAndASessionNestedUnderThisOne", "A worktree gives a branch its own checkout and a session nested under this one."),
864
874
  action: onNew ? {
865
- label: "New worktree",
875
+ label: t("git.ui.newWorktree", "New worktree"),
866
876
  onAction: onNew,
867
877
  disabled: busy,
868
878
  testId: "git-worktree-create"
@@ -1278,6 +1288,7 @@ function requestGitSync(sessionId, action, force = false) {
1278
1288
  //#endregion
1279
1289
  //#region src/extensions/workspaces/sessions/(frontend)/activity-group/git.native.ts
1280
1290
  var git_native_default = defineActivityGroup({
1291
+ label: "Git",
1281
1292
  keys: "g w",
1282
1293
  icon: () => createElement(BranchIcon),
1283
1294
  activeSource: {
@@ -1312,14 +1323,14 @@ var git_worktrees_native_default = defineChannelFile(worktreesChannel);
1312
1323
  * spells a route or reaches for `fetch`. What travels is file contents, which a
1313
1324
  * tunnel's relay must never see in the clear.
1314
1325
  */
1315
- const UNREACHABLE = "The session is unreachable.";
1326
+ const unreachable = () => t("git.ui.theSessionIsUnreachable", "The session is unreachable.");
1316
1327
  function isRecord(value) {
1317
1328
  return typeof value === "object" && value !== null && !Array.isArray(value);
1318
1329
  }
1319
1330
  /** The message a reader is shown: the route's own words, or why there were none. */
1320
1331
  function messageOf(result) {
1321
- if (result.status === 0) return UNREACHABLE;
1322
- return result.error === "" ? `The session answered ${String(result.status)}.` : result.error;
1332
+ if (result.status === 0) return unreachable();
1333
+ return result.error === "" ? t("git.request.sessionStatus", "The session answered {status}.", { status: result.status }) : result.error;
1323
1334
  }
1324
1335
  async function fetchReviewSummary(sessionId, signal) {
1325
1336
  const result = await api.session(sessionId).review(signal === void 0 ? {} : { signal });
@@ -1329,7 +1340,7 @@ async function fetchReviewSummary(sessionId, signal) {
1329
1340
  };
1330
1341
  if (!isRecord(result.data) || !Array.isArray(result.data.files)) return {
1331
1342
  ok: false,
1332
- error: "The session answered with no file list."
1343
+ error: t("git.ui.theSessionAnsweredWithNoFileList", "The session answered with no file list.")
1333
1344
  };
1334
1345
  return {
1335
1346
  ok: true,
@@ -1347,7 +1358,7 @@ async function fetchReviewFile(sessionId, path, signal) {
1347
1358
  };
1348
1359
  if (!isRecord(result.data) || !Array.isArray(result.data.hunks)) return {
1349
1360
  ok: false,
1350
- error: "The session answered with no diff."
1361
+ error: t("git.ui.theSessionAnsweredWithNoDiff", "The session answered with no diff.")
1351
1362
  };
1352
1363
  return {
1353
1364
  ok: true,
@@ -1436,16 +1447,19 @@ function suggestedSyncAction(changes) {
1436
1447
  return changes.upstream.ahead > 0 ? "push" : void 0;
1437
1448
  }
1438
1449
  /** "2 to push, 1 new on origin/feat/git", or "Up to date with origin/feat/git". */
1439
- function upstreamSummary(upstream) {
1440
- if (upstream === void 0) return "No upstream yet";
1441
- const parts = [...upstream.ahead > 0 ? [`${String(upstream.ahead)} to push`] : [], ...upstream.behind > 0 ? [`${String(upstream.behind)} new on ${upstream.ref}`] : []];
1442
- return parts.length === 0 ? `Up to date with ${upstream.ref}` : parts.join(", ");
1450
+ function upstreamSummary(t, upstream) {
1451
+ if (upstream === void 0) return t("git.ui.noUpstreamYet", "No upstream yet");
1452
+ const parts = [...upstream.ahead > 0 ? [t("git.sync.toPush", "{count} to push", { count: upstream.ahead })] : [], ...upstream.behind > 0 ? [t("git.sync.newOn", "{count} new on {ref}", {
1453
+ count: upstream.behind,
1454
+ ref: upstream.ref
1455
+ })] : []];
1456
+ return parts.length === 0 ? t("git.sync.upToDate", "Up to date with {ref}", { ref: upstream.ref }) : parts.join(", ");
1443
1457
  }
1444
1458
  /**
1445
1459
  * Hands one deferred follow-up to the session. Returns the reason it failed,
1446
1460
  * or undefined once sent. The sender throws when the session is disconnected.
1447
1461
  */
1448
- function deliverToAgent(send, sessionId, message) {
1462
+ function deliverToAgent(t, send, sessionId, message) {
1449
1463
  try {
1450
1464
  send(sessionId, {
1451
1465
  type: "follow_up",
@@ -1453,7 +1467,7 @@ function deliverToAgent(send, sessionId, message) {
1453
1467
  });
1454
1468
  return;
1455
1469
  } catch (error) {
1456
- return error instanceof Error ? error.message : "The session did not take the message.";
1470
+ return error instanceof Error ? error.message : t("git.ui.theSessionDidNotTakeTheMessage", "The session did not take the message.");
1457
1471
  }
1458
1472
  }
1459
1473
  //#endregion
@@ -1472,38 +1486,35 @@ function Action({ children, variant = "outline", disabled = false, onPress }) {
1472
1486
  });
1473
1487
  }
1474
1488
  function Footer({ count, discard = false, confirmation = false, onReview, onSend, onDiscard }) {
1489
+ const t = useT();
1475
1490
  return /* @__PURE__ */ jsxs(View, {
1476
1491
  style: styles$1.footer,
1477
1492
  children: [discard ? /* @__PURE__ */ jsx(Action, {
1478
1493
  variant: "ghost",
1479
1494
  onPress: onDiscard,
1480
- children: "Discard"
1495
+ children: t("git.ui.discard", "Discard")
1481
1496
  }) : /* @__PURE__ */ jsxs(Pressable, {
1482
1497
  accessibilityRole: "button",
1483
- accessibilityLabel: "Review queued comments",
1498
+ accessibilityLabel: t("git.ui.reviewQueuedComments", "Review queued comments"),
1484
1499
  onPress: onReview,
1485
1500
  style: [styles$1.inline, styles$1.action],
1486
1501
  children: [/* @__PURE__ */ jsx(MessageIcon, {
1487
1502
  size: 16,
1488
1503
  color: "blue"
1489
- }), /* @__PURE__ */ jsxs(Text, {
1504
+ }), /* @__PURE__ */ jsx(Text, {
1490
1505
  style: styles$1.dim,
1491
- children: [
1492
- count,
1493
- " ",
1494
- count === 1 ? "comment" : "comments",
1495
- " queued"
1496
- ]
1506
+ children: count === 1 ? t("git.ui.queuedCommentCount", "{count} comment queued", { count }) : t("git.ui.queuedCommentsCount", "{count} comments queued", { count })
1497
1507
  })]
1498
1508
  }), /* @__PURE__ */ jsx(Action, {
1499
1509
  variant: confirmation ? "outline" : "primary",
1500
1510
  disabled: count === 0,
1501
1511
  onPress: onSend,
1502
- children: "Send review"
1512
+ children: t("git.ui.sendReview", "Send review")
1503
1513
  })]
1504
1514
  });
1505
1515
  }
1506
1516
  function SyncCard({ changes, busy = false, onSync }) {
1517
+ const t = useT();
1507
1518
  const suggested = suggestedSyncAction(changes);
1508
1519
  return /* @__PURE__ */ jsxs(View, {
1509
1520
  style: styles$1.card,
@@ -1517,7 +1528,7 @@ function SyncCard({ changes, busy = false, onSync }) {
1517
1528
  }),
1518
1529
  /* @__PURE__ */ jsx(Text, {
1519
1530
  style: styles$1.branch,
1520
- children: changes?.branch ?? "Detached HEAD"
1531
+ children: changes?.branch ?? t("git.ui.detachedHEAD", "Detached HEAD")
1521
1532
  }),
1522
1533
  /* @__PURE__ */ jsx(View, { style: styles$1.grow }),
1523
1534
  /* @__PURE__ */ jsxs(Text, {
@@ -1532,11 +1543,11 @@ function SyncCard({ changes, busy = false, onSync }) {
1532
1543
  }),
1533
1544
  /* @__PURE__ */ jsx(Text, {
1534
1545
  style: [styles$1.dim, styles$1.mono],
1535
- children: changes?.base ? `vs ${changes.base}` : "Uncommitted changes"
1546
+ children: changes?.base ? t("git.review.versus", "vs {base}", { base: changes.base }) : t("git.ui.uncommittedChanges", "Uncommitted changes")
1536
1547
  }),
1537
1548
  /* @__PURE__ */ jsx(Text, {
1538
1549
  style: styles$1.dim,
1539
- children: upstreamSummary(changes?.upstream)
1550
+ children: upstreamSummary(t, changes?.upstream)
1540
1551
  }),
1541
1552
  /* @__PURE__ */ jsx(View, {
1542
1553
  style: styles$1.inline,
@@ -1549,18 +1560,23 @@ function SyncCard({ changes, busy = false, onSync }) {
1549
1560
  style: suggested === action ? [styles$1.action, styles$1.suggested] : styles$1.action,
1550
1561
  disabled: busy || changes?.rebase !== void 0 || (action === "pull" ? changes?.upstream === void 0 : action === "push" ? changes?.branch === void 0 : changes?.base === void 0),
1551
1562
  onPress: () => onSync?.(action),
1552
- children: action === "pull" ? "Pull" : action === "push" ? "Push" : "Rebase"
1563
+ children: action === "pull" ? t("git.ui.pull", "Pull") : action === "push" ? t("git.ui.push", "Push") : t("git.ui.rebase", "Rebase")
1553
1564
  }, action))
1554
1565
  })
1555
1566
  ]
1556
1567
  });
1557
1568
  }
1558
1569
  function FileList({ files, comments = [], onFile }) {
1570
+ const t = useT();
1559
1571
  return /* @__PURE__ */ jsxs(View, {
1560
1572
  style: styles$1.list,
1561
1573
  children: [/* @__PURE__ */ jsxs(Text, {
1562
1574
  style: styles$1.section,
1563
- children: [files.length, " files"]
1575
+ children: [
1576
+ files.length,
1577
+ " ",
1578
+ t("git.ui.files", "files")
1579
+ ]
1564
1580
  }), files.map((file) => /* @__PURE__ */ jsxs(Pressable, {
1565
1581
  accessibilityRole: "button",
1566
1582
  testID: `git-review-file-${file.path}`,
@@ -1612,6 +1628,7 @@ function FileList({ files, comments = [], onFile }) {
1612
1628
  });
1613
1629
  }
1614
1630
  function RebaseCard({ confirmation = false, conflicts, busy = false, onResolve, onAbort }) {
1631
+ const t = useT();
1615
1632
  return /* @__PURE__ */ jsxs(View, {
1616
1633
  style: [styles$1.card, styles$1.caution],
1617
1634
  children: [
@@ -1622,12 +1639,12 @@ function RebaseCard({ confirmation = false, conflicts, busy = false, onResolve,
1622
1639
  color: "yellow"
1623
1640
  }), /* @__PURE__ */ jsx(Text, {
1624
1641
  style: styles$1.section,
1625
- children: "Rebase paused"
1642
+ children: t("git.ui.rebasePaused", "Rebase paused")
1626
1643
  })]
1627
1644
  }),
1628
1645
  /* @__PURE__ */ jsx(Text, {
1629
1646
  style: styles$1.body,
1630
- children: "Resolve conflicts or ask Po to do it for you."
1647
+ children: t("git.ui.resolveConflictsOrAskPoToDoItForYou", "Resolve conflicts or ask Po to do it for you.")
1631
1648
  }),
1632
1649
  /* @__PURE__ */ jsx(Text, {
1633
1650
  style: [styles$1.dim, styles$1.mono],
@@ -1637,18 +1654,19 @@ function RebaseCard({ confirmation = false, conflicts, busy = false, onResolve,
1637
1654
  disabled: busy,
1638
1655
  onPress: onResolve,
1639
1656
  variant: confirmation ? "outline" : "primary",
1640
- children: "Ask Po to resolve"
1657
+ children: t("git.ui.askPoToResolve", "Ask Po to resolve")
1641
1658
  }),
1642
1659
  /* @__PURE__ */ jsx(Action, {
1643
1660
  disabled: busy,
1644
1661
  onPress: onAbort,
1645
1662
  variant: "danger-outline",
1646
- children: "Abort rebase"
1663
+ children: t("git.ui.abortRebase", "Abort rebase")
1647
1664
  })
1648
1665
  ]
1649
1666
  });
1650
1667
  }
1651
1668
  function FileHeader({ entry, index, total, onPrevious, onNext, onChanges }) {
1669
+ const t = useT();
1652
1670
  return /* @__PURE__ */ jsxs(View, {
1653
1671
  style: styles$1.content,
1654
1672
  children: [
@@ -1684,19 +1702,21 @@ function FileHeader({ entry, index, total, onPrevious, onNext, onChanges }) {
1684
1702
  variant: "ghost",
1685
1703
  disabled: index === 0,
1686
1704
  onPress: onPrevious,
1687
- children: "Previous"
1705
+ children: t("git.ui.previous", "Previous")
1688
1706
  }),
1689
1707
  /* @__PURE__ */ jsx(Pressable, {
1690
1708
  accessibilityRole: "button",
1691
- accessibilityLabel: "Return to changes",
1709
+ accessibilityLabel: t("git.ui.returnToChanges", "Return to changes"),
1692
1710
  onPress: onChanges,
1693
1711
  style: [styles$1.inline, styles$1.action],
1694
1712
  children: /* @__PURE__ */ jsxs(Text, {
1695
1713
  style: styles$1.dim,
1696
1714
  children: [
1697
- onChanges ? "Changes · " : "",
1715
+ onChanges ? t("git.ui.changes", "Changes · ") : "",
1698
1716
  index + 1,
1699
- " of ",
1717
+ " ",
1718
+ t("git.ui.of", "of"),
1719
+ " ",
1700
1720
  total
1701
1721
  ]
1702
1722
  })
@@ -1705,7 +1725,7 @@ function FileHeader({ entry, index, total, onPrevious, onNext, onChanges }) {
1705
1725
  variant: "ghost",
1706
1726
  disabled: index === total - 1,
1707
1727
  onPress: onNext,
1708
- children: "Next"
1728
+ children: t("git.ui.next", "Next")
1709
1729
  })
1710
1730
  ]
1711
1731
  })
@@ -1729,7 +1749,10 @@ const DiffRows = memo(function DiffRows({ rows, comments = [], selection, onLine
1729
1749
  const anchored = anchoredComments.get(`${side}:${row.line}`) ?? [];
1730
1750
  return /* @__PURE__ */ jsxs(View, { children: [/* @__PURE__ */ jsxs(Pressable, {
1731
1751
  accessibilityRole: "button",
1732
- accessibilityLabel: `Select ${side} line ${row.line}`,
1752
+ accessibilityLabel: t("git.review.selectLine", "Select {side} line {line}", {
1753
+ side: side === "old" ? t("git.review.oldSide", "old") : t("git.review.newSide", "new"),
1754
+ line: row.line
1755
+ }),
1733
1756
  onPress: () => onLine?.(row),
1734
1757
  style: [
1735
1758
  styles$1.diffRow,
@@ -1760,7 +1783,11 @@ const DiffRows = memo(function DiffRows({ rows, comments = [], selection, onLine
1760
1783
  style: styles$1.inlineComment,
1761
1784
  children: [/* @__PURE__ */ jsxs(Text, {
1762
1785
  style: styles$1.blue,
1763
- children: ["Queued comment · ", lineLabel(comment)]
1786
+ children: [
1787
+ t("git.ui.queuedComment", "Queued comment ·"),
1788
+ " ",
1789
+ lineLabel(comment)
1790
+ ]
1764
1791
  }), /* @__PURE__ */ jsx(Text, {
1765
1792
  style: styles$1.body,
1766
1793
  children: comment.body
@@ -1769,16 +1796,20 @@ const DiffRows = memo(function DiffRows({ rows, comments = [], selection, onLine
1769
1796
  }) });
1770
1797
  });
1771
1798
  function lineLabel(comment) {
1772
- return comment.startLine === void 0 ? "File comment" : comment.endLine === comment.startLine || comment.endLine === void 0 ? `Line ${comment.startLine}` : `Lines ${comment.startLine} to ${comment.endLine}`;
1799
+ return comment.startLine === void 0 ? t("git.ui.fileComment", "File comment") : comment.endLine === comment.startLine || comment.endLine === void 0 ? t("git.review.line", "Line {line}", { line: comment.startLine }) : t("git.review.lines", "Lines {start} to {end}", {
1800
+ start: comment.startLine,
1801
+ end: comment.endLine
1802
+ });
1773
1803
  }
1774
1804
  function CommentSheet({ range, snippet, value, onChange, onAdd, onCancel }) {
1805
+ const t = useT();
1775
1806
  return /* @__PURE__ */ jsxs(View, {
1776
1807
  style: styles$1.sheet,
1777
1808
  children: [
1778
1809
  /* @__PURE__ */ jsx(View, { style: styles$1.handle }),
1779
1810
  /* @__PURE__ */ jsx(Text, {
1780
1811
  style: styles$1.sheetTitle,
1781
- children: range ? lineLabel(range) : "Comment on file"
1812
+ children: range ? lineLabel(range) : t("git.ui.commentOnFile", "Comment on file")
1782
1813
  }),
1783
1814
  snippet ? /* @__PURE__ */ jsx(View, {
1784
1815
  style: styles$1.quote,
@@ -1788,8 +1819,8 @@ function CommentSheet({ range, snippet, value, onChange, onAdd, onCancel }) {
1788
1819
  })
1789
1820
  }) : null,
1790
1821
  /* @__PURE__ */ jsx(Textarea, {
1791
- accessibilityLabel: "What should change here?",
1792
- placeholder: "What should change here?",
1822
+ accessibilityLabel: t("git.ui.whatShouldChangeHereConfirm", "What should change here?"),
1823
+ placeholder: t("git.ui.whatShouldChangeHereConfirm", "What should change here?"),
1793
1824
  rows: 4,
1794
1825
  value,
1795
1826
  onChangeText: onChange
@@ -1798,27 +1829,23 @@ function CommentSheet({ range, snippet, value, onChange, onAdd, onCancel }) {
1798
1829
  variant: "primary",
1799
1830
  disabled: value !== void 0 && value.trim() === "",
1800
1831
  onPress: onAdd,
1801
- children: "Add comment"
1832
+ children: t("git.ui.addComment", "Add comment")
1802
1833
  }),
1803
1834
  /* @__PURE__ */ jsx(Action, {
1804
1835
  variant: "ghost",
1805
1836
  onPress: onCancel,
1806
- children: "Cancel"
1837
+ children: t("git.ui.cancel", "Cancel")
1807
1838
  })
1808
1839
  ]
1809
1840
  });
1810
1841
  }
1811
1842
  function CommentCards({ comments, onRemove }) {
1843
+ const t = useT();
1812
1844
  return /* @__PURE__ */ jsxs(View, {
1813
1845
  style: styles$1.content,
1814
- children: [/* @__PURE__ */ jsxs(Text, {
1846
+ children: [/* @__PURE__ */ jsx(Text, {
1815
1847
  style: styles$1.body,
1816
- children: [
1817
- comments.length === 2 ? "Two" : comments.length,
1818
- " ",
1819
- comments.length === 1 ? "comment" : "comments",
1820
- " queued for Po, whenever you are ready."
1821
- ]
1848
+ children: comments.length === 1 ? t("git.review.readyCommentsOne", "{count} comment queued for Po, whenever you are ready.", { count: comments.length }) : t("git.review.readyComments", "{count} comments queued for Po, whenever you are ready.", { count: comments.length })
1822
1849
  }), comments.map((comment) => /* @__PURE__ */ jsxs(View, {
1823
1850
  style: styles$1.card,
1824
1851
  children: [
@@ -1846,7 +1873,7 @@ function CommentCards({ comments, onRemove }) {
1846
1873
  children: /* @__PURE__ */ jsx(Action, {
1847
1874
  variant: "ghost",
1848
1875
  onPress: () => onRemove?.(comment.id),
1849
- children: "Remove"
1876
+ children: t("git.ui.remove", "Remove")
1850
1877
  })
1851
1878
  })
1852
1879
  ]
@@ -2086,6 +2113,7 @@ const styles$1 = StyleSheet.create((theme) => ({
2086
2113
  }));
2087
2114
  const DIFF_ROW_STEP = 200;
2088
2115
  function GitReviewView(props) {
2116
+ const t = useT();
2089
2117
  const { screen, activity, summary, file, path, comments } = props;
2090
2118
  const rows = useMemo(() => file?.hunks.flatMap((hunk) => hunk.rows) ?? [], [file?.hunks]);
2091
2119
  const gutterDigits = useMemo(() => rows.reduce((max, row) => Math.max(max, String(row.line).length), 1), [rows]);
@@ -2113,11 +2141,11 @@ function GitReviewView(props) {
2113
2141
  children: [/* @__PURE__ */ jsx(Action, {
2114
2142
  variant: "ghost",
2115
2143
  onPress: () => props.onScreen("changes"),
2116
- children: "Changes"
2144
+ children: t("git.ui.changesLabel", "Changes")
2117
2145
  }), screen === "review" && path ? /* @__PURE__ */ jsx(Action, {
2118
2146
  variant: "ghost",
2119
2147
  onPress: () => props.onScreen("file"),
2120
- children: "File diff"
2148
+ children: t("git.ui.fileDiff", "File diff")
2121
2149
  }) : null]
2122
2150
  }) : null,
2123
2151
  /* @__PURE__ */ jsxs(ScrollView, {
@@ -2144,12 +2172,12 @@ function GitReviewView(props) {
2144
2172
  props.forceRequired ? /* @__PURE__ */ jsx(Action, {
2145
2173
  variant: "danger-outline",
2146
2174
  onPress: props.onForce,
2147
- children: "Force push with lease"
2175
+ children: t("git.ui.forcePushWithLease", "Force push with lease")
2148
2176
  }) : null,
2149
2177
  /* @__PURE__ */ jsx(Action, {
2150
2178
  variant: "ghost",
2151
2179
  onPress: props.onDismiss,
2152
- children: "Dismiss"
2180
+ children: t("git.ui.dismiss", "Dismiss")
2153
2181
  })
2154
2182
  ]
2155
2183
  }) : null,
@@ -2161,7 +2189,7 @@ function GitReviewView(props) {
2161
2189
  }) : null,
2162
2190
  !summary ? /* @__PURE__ */ jsx(Text, {
2163
2191
  style: styles$1.dim,
2164
- children: "Loading changes…"
2192
+ children: t("git.ui.loadingChangesProgress", "Loading changes…")
2165
2193
  }) : summary.files.length ? /* @__PURE__ */ jsx(FileList, {
2166
2194
  files: summary.files,
2167
2195
  comments,
@@ -2169,17 +2197,17 @@ function GitReviewView(props) {
2169
2197
  }) : summary.repository ? /* @__PURE__ */ jsx(EmptyState, {
2170
2198
  testID: "git-review-empty",
2171
2199
  icon: /* @__PURE__ */ jsx(BranchIcon, { size: 20 }),
2172
- title: "No changes yet",
2173
- description: summary.base === void 0 ? "Nothing uncommitted in this checkout." : `Nothing differs from ${summary.base}, committed or not.`
2200
+ title: t("git.ui.noChangesYet", "No changes yet"),
2201
+ description: summary.base === void 0 ? t("git.ui.nothingUncommittedInThisCheckout", "Nothing uncommitted in this checkout.") : t("git.review.nothingDiffers", "Nothing differs from {base}, committed or not.", { base: summary.base })
2174
2202
  }) : /* @__PURE__ */ jsx(EmptyState, {
2175
2203
  testID: "git-review-no-repository",
2176
2204
  icon: /* @__PURE__ */ jsx(BranchIcon, { size: 20 }),
2177
- title: "Not a Git checkout",
2178
- description: "This session's folder is not inside a Git repository."
2205
+ title: t("git.ui.notAGitCheckout", "Not a Git checkout"),
2206
+ description: t("git.ui.thisSessionSFolderIsNotInsideAGitRepository", "This session's folder is not inside a Git repository.")
2179
2207
  }),
2180
2208
  summary?.truncated ? /* @__PURE__ */ jsx(Text, {
2181
2209
  style: styles$1.dim,
2182
- children: "The file list was truncated."
2210
+ children: t("git.ui.theFileListWasTruncated", "The file list was truncated.")
2183
2211
  }) : null
2184
2212
  ]
2185
2213
  }) : screen === "file" ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -2204,16 +2232,16 @@ function GitReviewView(props) {
2204
2232
  style: styles$1.content,
2205
2233
  children: [/* @__PURE__ */ jsx(Text, {
2206
2234
  style: styles$1.dim,
2207
- children: props.error ? "The diff could not be loaded. Please try again." : "Loading diff…"
2235
+ children: props.error ? t("git.ui.theDiffCouldNotBeLoadedPleaseTryAgain", "The diff could not be loaded. Please try again.") : t("git.ui.loadingDiffProgress", "Loading diff…")
2208
2236
  }), props.error && path ? /* @__PURE__ */ jsx(Action, {
2209
2237
  onPress: () => props.onFile(path),
2210
- children: "Retry"
2238
+ children: t("git.ui.retry", "Retry")
2211
2239
  }) : null]
2212
2240
  }) : file.binary || file.tooLarge ? /* @__PURE__ */ jsx(View, {
2213
2241
  style: styles$1.content,
2214
2242
  children: /* @__PURE__ */ jsx(Text, {
2215
2243
  style: styles$1.section,
2216
- children: file.binary ? "Binary file" : "Diff too large to display"
2244
+ children: file.binary ? t("git.ui.binaryFile", "Binary file") : t("git.ui.diffTooLargeToDisplay", "Diff too large to display")
2217
2245
  })
2218
2246
  }) : /* @__PURE__ */ jsx(DiffRows, {
2219
2247
  rows: visibleRows,
@@ -2226,7 +2254,7 @@ function GitReviewView(props) {
2226
2254
  style: styles$1.inlineComment,
2227
2255
  children: [/* @__PURE__ */ jsx(Text, {
2228
2256
  style: styles$1.blue,
2229
- children: "Queued file comment"
2257
+ children: t("git.ui.queuedFileComment", "Queued file comment")
2230
2258
  }), /* @__PURE__ */ jsx(Text, {
2231
2259
  style: styles$1.body,
2232
2260
  children: comment.body
@@ -2236,7 +2264,7 @@ function GitReviewView(props) {
2236
2264
  style: styles$1.content,
2237
2265
  children: /* @__PURE__ */ jsx(Action, {
2238
2266
  onPress: props.onComment,
2239
- children: "Comment on file"
2267
+ children: t("git.ui.commentOnFile", "Comment on file")
2240
2268
  })
2241
2269
  })
2242
2270
  ] }) : /* @__PURE__ */ jsx(CommentCards, {
@@ -2260,27 +2288,23 @@ function GitReviewView(props) {
2260
2288
  children: [/* @__PURE__ */ jsxs(Text, {
2261
2289
  style: styles$1.dim,
2262
2290
  accessibilityLiveRegion: "polite",
2263
- children: [
2264
- Math.min(current.limit, rows.length),
2265
- " of ",
2266
- rows.length,
2267
- " diff rows shown",
2268
- props.selection ? ` · ${props.selection.side} line ${props.selection.startLine} selected` : ""
2269
- ]
2270
- }), current.limit < rows.length ? /* @__PURE__ */ jsxs(Button, {
2291
+ children: [t("git.review.rowsShown", "{shown} of {total} diff rows shown", {
2292
+ shown: Math.min(current.limit, rows.length),
2293
+ total: rows.length
2294
+ }), props.selection ? t("git.review.selectedLine", " · {side} line {line} selected", {
2295
+ side: props.selection.side === "old" ? t("git.review.oldSide", "old") : t("git.review.newSide", "new"),
2296
+ line: props.selection.startLine
2297
+ }) : ""]
2298
+ }), current.limit < rows.length ? /* @__PURE__ */ jsx(Button, {
2271
2299
  variant: "outline",
2272
2300
  onPress: () => setDisclosure({
2273
2301
  ...current,
2274
2302
  limit: Math.min(rows.length, current.limit + DIFF_ROW_STEP)
2275
2303
  }),
2276
- children: [
2277
- "Show ",
2278
- Math.min(DIFF_ROW_STEP, rows.length - current.limit),
2279
- " more rows"
2280
- ]
2304
+ children: t("git.review.showMoreRows", "Show {count} more rows", { count: Math.min(DIFF_ROW_STEP, rows.length - current.limit) })
2281
2305
  }) : /* @__PURE__ */ jsx(Text, {
2282
2306
  style: styles$1.dim,
2283
- children: "All diff rows shown"
2307
+ children: t("git.ui.allDiffRowsShown", "All diff rows shown")
2284
2308
  })]
2285
2309
  }) : null
2286
2310
  ]
@@ -2298,7 +2322,7 @@ function useGitChanges(sessionId) {
2298
2322
  function reviewTab() {
2299
2323
  return {
2300
2324
  id: "git-review",
2301
- label: "review",
2325
+ label: t("git.tab.review", "review"),
2302
2326
  panel: GitReviewPanel
2303
2327
  };
2304
2328
  }
@@ -2306,6 +2330,7 @@ function GitReviewPanel(props) {
2306
2330
  return /* @__PURE__ */ jsx(GitReviewPanelSession, { ...props }, props.sessionId);
2307
2331
  }
2308
2332
  function GitReviewPanelSession({ sessionId, sendSessionFrame }) {
2333
+ const t = useT();
2309
2334
  const activity = useGitChanges(sessionId);
2310
2335
  const subscribe = useCallback((listener) => {
2311
2336
  const sub = gitReview.store.subscribe(listener);
@@ -2363,7 +2388,7 @@ function GitReviewPanelSession({ sessionId, sendSessionFrame }) {
2363
2388
  if (sessionId === null) return null;
2364
2389
  const changes = activity.changes;
2365
2390
  const send = (message, onSent) => {
2366
- const failure = deliverToAgent(sendSessionFrame, sessionId, message);
2391
+ const failure = deliverToAgent(t, sendSessionFrame, sessionId, message);
2367
2392
  setError(failure);
2368
2393
  if (failure === void 0) onSent?.();
2369
2394
  };
@@ -2458,10 +2483,10 @@ function GitReviewPanelSession({ sessionId, sendSessionFrame }) {
2458
2483
  onOpenChange: (open) => {
2459
2484
  if (!open) setConfirm(void 0);
2460
2485
  },
2461
- children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: confirm === "force" ? "Force push with lease?" : confirm === "abort" ? "Abort rebase?" : "Discard review?" }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [
2486
+ children: /* @__PURE__ */ jsxs(SheetContent, { children: [/* @__PURE__ */ jsx(SheetHeader, { children: /* @__PURE__ */ jsx(SheetTitle, { children: confirm === "force" ? t("git.ui.forcePushWithLeaseConfirm", "Force push with lease?") : confirm === "abort" ? t("git.ui.abortRebaseConfirm", "Abort rebase?") : t("git.ui.discardReviewConfirm", "Discard review?") }) }), /* @__PURE__ */ jsxs(SheetBody, { children: [
2462
2487
  /* @__PURE__ */ jsx(Text, {
2463
2488
  style: styles$1.dim,
2464
- children: confirm === "force" ? "Git refuses this if the remote holds commits you never fetched and integrated." : confirm === "abort" ? "Abort discards any conflict resolution in progress." : "Your queued comments will be removed."
2489
+ children: confirm === "force" ? t("git.ui.gitRefusesThisIfTheRemoteHoldsCommitsYouNeverFetchedAndIntegrated", "Git refuses this if the remote holds commits you never fetched and integrated.") : confirm === "abort" ? t("git.ui.abortDiscardsAnyConflictResolutionInProgress", "Abort discards any conflict resolution in progress.") : t("git.ui.yourQueuedCommentsWillBeRemoved", "Your queued comments will be removed.")
2465
2490
  }),
2466
2491
  /* @__PURE__ */ jsx(Button, {
2467
2492
  variant: "danger",
@@ -2472,12 +2497,12 @@ function GitReviewPanelSession({ sessionId, sendSessionFrame }) {
2472
2497
  else clearReviewComments(sessionId);
2473
2498
  setConfirm(void 0);
2474
2499
  },
2475
- children: confirm === "force" ? "Force push with lease" : confirm === "abort" ? "Abort rebase" : "Discard"
2500
+ children: confirm === "force" ? t("git.ui.forcePushWithLease", "Force push with lease") : confirm === "abort" ? t("git.ui.abortRebase", "Abort rebase") : t("git.ui.discard", "Discard")
2476
2501
  }),
2477
2502
  /* @__PURE__ */ jsx(Button, {
2478
2503
  variant: "ghost",
2479
2504
  onPress: () => setConfirm(void 0),
2480
- children: "Cancel"
2505
+ children: t("git.ui.cancel", "Cancel")
2481
2506
  })
2482
2507
  ] })] })
2483
2508
  })
@@ -2494,11 +2519,12 @@ function CommentEditor({ onAdd, ...props }) {
2494
2519
  }
2495
2520
  //#endregion
2496
2521
  //#region src/extensions/workspaces/sessions/(frontend)/fill/_components/WorktreesActivitySection.native.tsx
2497
- function GitChangesRow({ state = "changes", branch = "Detached HEAD", added = 0, removed = 0, onReview }) {
2522
+ function GitChangesRow({ state = "changes", branch = t("git.ui.detachedHEAD", "Detached HEAD"), added = 0, removed = 0, onReview }) {
2523
+ const t$1 = useT();
2498
2524
  return /* @__PURE__ */ jsxs(Pressable, {
2499
2525
  testID: "activity-diff-changes",
2500
2526
  accessibilityRole: "button",
2501
- accessibilityLabel: "Open changes review",
2527
+ accessibilityLabel: t$1("git.ui.openChangesReview", "Open changes review"),
2502
2528
  onPress: onReview,
2503
2529
  style: styles.changeRow,
2504
2530
  children: [/* @__PURE__ */ jsxs(View, {
@@ -2510,7 +2536,7 @@ function GitChangesRow({ state = "changes", branch = "Detached HEAD", added = 0,
2510
2536
  }),
2511
2537
  /* @__PURE__ */ jsx(Text, {
2512
2538
  style: [styles.heading, styles.grow],
2513
- children: "Changes"
2539
+ children: t$1("git.ui.changesLabel", "Changes")
2514
2540
  }),
2515
2541
  /* @__PURE__ */ jsx(ChevronRightIcon, {
2516
2542
  size: 16,
@@ -2528,31 +2554,35 @@ function GitChangesRow({ state = "changes", branch = "Detached HEAD", added = 0,
2528
2554
  }), /* @__PURE__ */ jsxs(Text, {
2529
2555
  style: styles.error,
2530
2556
  children: ["-", removed]
2531
- })] }) : state === "pushing" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Spinner, { label: "Pushing..." }), /* @__PURE__ */ jsx(Text, {
2557
+ })] }) : state === "pushing" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Spinner, { label: t$1("git.ui.pushingPending", "Pushing...") }), /* @__PURE__ */ jsx(Text, {
2532
2558
  style: styles.dim,
2533
- children: "Pushing..."
2559
+ children: t$1("git.ui.pushingPending", "Pushing...")
2534
2560
  })] }) : /* @__PURE__ */ jsx(Text, {
2535
2561
  style: styles.dim,
2536
- children: "No changes yet"
2562
+ children: t$1("git.ui.noChangesYet", "No changes yet")
2537
2563
  })]
2538
2564
  })]
2539
2565
  });
2540
2566
  }
2541
2567
  function WorktreesActivityView({ git, state, disabled = false, onReview, onWorktrees }) {
2568
+ const t = useT();
2542
2569
  const { starting } = worktreesPresentation(state);
2543
2570
  return /* @__PURE__ */ jsxs(View, {
2544
2571
  style: styles.section,
2545
2572
  children: [
2546
2573
  git.changes ? /* @__PURE__ */ jsx(GitChangesRow, {
2547
- branch: git.changes.branch ?? "Detached HEAD",
2574
+ branch: git.changes.branch ?? t("git.ui.detachedHEAD", "Detached HEAD"),
2548
2575
  added: git.changes.added,
2549
2576
  removed: git.changes.removed,
2550
2577
  state: git.pending?.startsWith("pushing") ? "pushing" : git.changes.added === 0 && git.changes.removed === 0 && git.changes.files === 0 ? "clean" : "changes",
2551
2578
  onReview
2552
2579
  }) : null,
2553
2580
  /* @__PURE__ */ jsx(WorktreeGroup, {
2554
- title: "Worktrees",
2555
- count: `${state.worktrees.length} open${starting ? " · 1 starting" : ""}`
2581
+ title: t("git.ui.worktrees", "Worktrees"),
2582
+ count: t("git.worktree.openStarting", "{count} open{starting}", {
2583
+ count: state.worktrees.length,
2584
+ starting: starting ? t("git.worktree.oneStarting", " · 1 starting") : ""
2585
+ })
2556
2586
  }),
2557
2587
  state.worktrees.map((item) => /* @__PURE__ */ jsx(WorktreeRow, {
2558
2588
  item,
@@ -2567,7 +2597,7 @@ function WorktreesActivityView({ git, state, disabled = false, onReview, onWorkt
2567
2597
  style: styles.idle,
2568
2598
  children: [/* @__PURE__ */ jsx(Text, {
2569
2599
  style: styles.dim,
2570
- children: "Idle"
2600
+ children: t("git.ui.idle", "Idle")
2571
2601
  }), /* @__PURE__ */ jsx(Button, {
2572
2602
  testID: "activity-git-create",
2573
2603
  variant: "ghost",
@@ -2576,7 +2606,7 @@ function WorktreesActivityView({ git, state, disabled = false, onReview, onWorkt
2576
2606
  onPress: onWorktrees,
2577
2607
  children: /* @__PURE__ */ jsx(Text, {
2578
2608
  style: styles.jade,
2579
- children: "Create a worktree →"
2609
+ children: t("git.ui.createAWorktree", "Create a worktree →")
2580
2610
  })
2581
2611
  })]
2582
2612
  }) : null