diff --git a/apps/web/components/gitlab/action-presets-section.tsx b/apps/web/components/gitlab/action-presets-section.tsx index 99530561dc..ac22425b4b 100644 --- a/apps/web/components/gitlab/action-presets-section.tsx +++ b/apps/web/components/gitlab/action-presets-section.tsx @@ -13,7 +13,12 @@ import { useSettingsSaveContributor } from "@/components/settings/settings-save- import { useToast } from "@/components/toast-provider"; import { useGitLabActionPresets } from "@/hooks/domains/gitlab/use-gitlab-action-presets"; import type { GitLabActionPreset, GitLabActionPresets } from "@/lib/types/gitlab"; +import { useTranslation } from "react-i18next"; +// `label` is PERSISTED to workspace settings as part of `GitLabActionPreset`, and +// the row below is immediately editable, so it must stay locale-neutral: a preset +// seeded in one locale and saved unedited would keep that locale's text forever. +// Same contract as `newPreset` in components/github/action-presets-section.tsx. function newPreset(): GitLabActionPreset { return { id: `preset_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 7)}`, @@ -33,6 +38,7 @@ function PresetList({ onChange: (next: GitLabActionPreset[]) => void; addLabel: string; }) { + const { t } = useTranslation(); const patch = (index: number, change: Partial) => onChange( presets.map((preset, current) => (current === index ? { ...preset, ...change } : preset)), @@ -43,15 +49,15 @@ function PresetList({
patch(index, { label: event.target.value })} /> patch(index, { hint: event.target.value })} />