feat(i18n): localize the GitHub and GitLab task surfaces (#2283)

Co-authored-by: Kandev Agent <agent@kandev.dev>
This commit is contained in:
João Salavisa
2026-08-05 15:14:26 +02:00
committed by GitHub
parent 56350ffc2b
commit 58eee5a314
57 changed files with 1572 additions and 467 deletions
@@ -16,6 +16,7 @@ import { cn } from "@/lib/utils";
import { linkToTask } from "@/lib/links";
import { useTaskById } from "@/hooks/domains/kanban/use-task-by-id";
import type { KanbanState } from "@/lib/state/slices";
import { useTranslation } from "react-i18next";
export type TaskRowLink = {
id: string;
@@ -72,6 +73,7 @@ function SingleTaskButton({
const taskData = useTaskById(task.taskId);
const stepTitle = useTaskStepTitle(taskData?.workflowStepId);
const title = taskData?.title ?? task.fallbackTitle;
const { t } = useTranslation();
return (
<Tooltip>
<TooltipTrigger asChild>
@@ -87,8 +89,10 @@ function SingleTaskButton({
</TooltipTrigger>
<TooltipContent>
<div className="flex flex-col gap-0.5 text-xs">
<span>Task: {title}</span>
{stepTitle ? <span className="text-muted-foreground">Step: {stepTitle}</span> : null}
<span>{t("github:taskLabelled", { title })}</span>
{stepTitle ? (
<span className="text-muted-foreground">{t("github:stepLabelled", { stepTitle })}</span>
) : null}
</div>
</TooltipContent>
</Tooltip>
@@ -96,6 +100,7 @@ function SingleTaskButton({
}
export function TaskRowIndicator({ tasks, testIdPrefix, emptyLabel }: TaskRowIndicatorProps) {
const { t } = useTranslation();
const setActiveTask = useAppStore((state) => state.setActiveTask);
const router = useRouter();
const navigate = useCallback(
@@ -124,7 +129,7 @@ export function TaskRowIndicator({ tasks, testIdPrefix, emptyLabel }: TaskRowInd
<DropdownMenuTrigger asChild>
<button type="button" data-testid={`${testIdPrefix}-multi`} className={buttonClass}>
<IconChecklist className={iconClass} />
<span className="text-foreground/80">Tasks</span>
<span className="text-foreground/80">{t("github:tasks")}</span>
<Badge variant="outline" className="h-4 px-1 py-0 text-[10px] shrink-0">
{tasks.length}
</Badge>