chore: add missing translations

This commit is contained in:
Amruth Pillai
2026-05-27 23:31:58 +02:00
parent c6a654191c
commit b491582637
125 changed files with 2807 additions and 606 deletions
+10 -2
View File
@@ -35,7 +35,11 @@ type ChipItemProps = {
onRemove: (index: number) => void;
};
function ChipDragPreview({ chip }: { chip: string }) {
type ChipDragPreviewProps = {
chip: string;
};
function ChipDragPreview({ chip }: ChipDragPreviewProps) {
return (
<Badge
variant="outline"
@@ -46,7 +50,11 @@ function ChipDragPreview({ chip }: { chip: string }) {
);
}
function ChipDragOverlay({ activeChip }: { activeChip: string | null }) {
type ChipDragOverlayProps = {
activeChip: string | null;
};
function ChipDragOverlay({ activeChip }: ChipDragOverlayProps) {
const overlay = (
<DragOverlay dropAnimation={null}>{activeChip ? <ChipDragPreview chip={activeChip} /> : null}</DragOverlay>
);
@@ -7,6 +7,10 @@ import { I18nProvider } from "@lingui/react";
const queryResult = vi.hoisted(() => ({ data: undefined as number | undefined }));
type CountUpProps = {
to: number;
};
vi.mock("@tanstack/react-query", () => ({
useQuery: () => queryResult,
}));
@@ -14,7 +18,7 @@ vi.mock("@/libs/orpc/client", () => ({
orpc: { statistics: { github: { getStarCount: { queryOptions: () => ({}) } } } },
}));
vi.mock("../animation/count-up", () => ({
CountUp: ({ to }: { to: number }) => <span data-testid="count-up">{to.toLocaleString()}</span>,
CountUp: ({ to }: CountUpProps) => <span data-testid="count-up">{to.toLocaleString()}</span>,
}));
const { GithubStarsButton } = await import("./github-stars-button");
@@ -5,23 +5,20 @@ import { beforeAll, describe, expect, it, vi } from "vitest";
import { i18n } from "@lingui/core";
import { I18nProvider } from "@lingui/react";
type GridProps = {
rowCount: number;
columnCount: number;
cellComponent: React.ComponentType<
{ rowIndex: number; columnIndex: number; style: React.CSSProperties } & Record<string, unknown>
>;
cellProps: Record<string, unknown>;
};
// react-window's <Grid> uses ResizeObserver / IntersectionObserver heavily and
// expects measurable layouts that happy-dom can't provide. Stub it with a simple
// pass-through that renders the first row of cells via the supplied cellComponent.
vi.mock("react-window", () => ({
Grid: ({
rowCount,
columnCount,
cellComponent: CellComponent,
cellProps,
}: {
rowCount: number;
columnCount: number;
cellComponent: React.ComponentType<
{ rowIndex: number; columnIndex: number; style: React.CSSProperties } & Record<string, unknown>
>;
cellProps: Record<string, unknown>;
}) => {
Grid: ({ rowCount, columnCount, cellComponent: CellComponent, cellProps }: GridProps) => {
const cells: React.ReactNode[] = [];
for (let r = 0; r < Math.min(rowCount, 1); r++) {
for (let c = 0; c < columnCount; c++) {
+6 -1
View File
@@ -372,7 +372,12 @@ function useEditorToolbarState(editor: Editor) {
type EditorToolbarState = ReturnType<typeof useEditorToolbarState>;
function EditorToolbar({ editor, isFullscreen }: { editor: Editor; isFullscreen: boolean }) {
type EditorToolbarProps = {
editor: Editor;
isFullscreen: boolean;
};
function EditorToolbar({ editor, isFullscreen }: EditorToolbarProps) {
const state = useEditorToolbarState(editor);
return renderEditorToolbar(state, isFullscreen);