fix(i18n): anchor the literal guard's exclusions so they stop swallowing copy (#2288)

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
João Salavisa
2026-08-05 19:36:27 +02:00
committed by GitHub
parent fef76fda57
commit 24c3b594ce
15 changed files with 260 additions and 5 deletions
@@ -180,6 +180,10 @@ function RepositoryScopeFields({
data-settings-dirty={orgs !== baseline.orgs}
onChange={(event) => onOrgsChange(event.target.value)}
disabled={loading || mode !== "orgs"}
// Sample GitHub organization logins, i.e. the shape of the value
// this field accepts. A translated `example-org` would stop being
// a usable example.
// eslint-disable-next-line i18next/no-literal-string -- example org logins
placeholder="kdlbs, example-org"
data-testid="github-scope-orgs-input"
/>
@@ -195,6 +199,9 @@ function RepositoryScopeFields({
onChange={(event) => onReposChange(event.target.value)}
disabled={loading || mode !== "repos"}
aria-invalid={invalidRepos}
// Sample `owner/repo` slugs — the format the sibling validation
// message describes, not copy.
// eslint-disable-next-line i18next/no-literal-string -- example repo slugs
placeholder="kdlbs/kandev, example/api"
data-testid="github-scope-repos-input"
/>
@@ -396,6 +396,9 @@ function ReviewWatchSection({ workspaceId }: { workspaceId: string }) {
}}
onUpdate={async (id, req) => {
const watch = watches.find((item) => item.id === id);
// Unreachable-invariant guard: the dialog only ever calls onUpdate for
// a row it was opened from. A developer diagnostic, not user copy.
// eslint-disable-next-line i18next/no-literal-string -- invariant message
if (!watch) throw new Error("review watch not found");
await update(id, watch.workspace_id, req);
toast({ description: t("github:reviewWatchUpdated"), variant: "success" });
@@ -499,6 +502,8 @@ function IssueWatchSection({ workspaceId }: { workspaceId: string }) {
}}
onUpdate={async (id, req) => {
const watch = issueActions.watches.find((item) => item.id === id);
// Unreachable-invariant guard, as above. Developer diagnostic.
// eslint-disable-next-line i18next/no-literal-string -- invariant message
if (!watch) throw new Error("issue watch not found");
await issueActions.update(id, watch.workspace_id, req);
toast({ description: t("github:issueWatchUpdated"), variant: "success" });