mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-26 00:02:32 +10:00
chore: add missing translations
This commit is contained in:
@@ -133,7 +133,11 @@ export function CustomSectionBuilder() {
|
||||
);
|
||||
}
|
||||
|
||||
function CustomSectionContainer({ section }: { section: CustomSection }) {
|
||||
type CustomSectionContainerProps = {
|
||||
section: CustomSection;
|
||||
};
|
||||
|
||||
function CustomSectionContainer({ section }: CustomSectionContainerProps) {
|
||||
const { openDialog } = useDialogStore();
|
||||
const updateResumeData = useUpdateResumeData();
|
||||
|
||||
@@ -203,7 +207,11 @@ function CustomSectionContainer({ section }: { section: CustomSection }) {
|
||||
);
|
||||
}
|
||||
|
||||
function CustomSectionDropdownMenu({ section }: { section: CustomSection }) {
|
||||
type CustomSectionDropdownMenuProps = {
|
||||
section: CustomSection;
|
||||
};
|
||||
|
||||
function CustomSectionDropdownMenu({ section }: CustomSectionDropdownMenuProps) {
|
||||
const confirm = useConfirm();
|
||||
const { openDialog } = useDialogStore();
|
||||
const updateResumeData = useUpdateResumeData();
|
||||
|
||||
+16
-3
@@ -61,6 +61,19 @@ const experienceItems = vi.hoisted(() => [
|
||||
},
|
||||
]);
|
||||
|
||||
type SectionBaseProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionAddItemButtonProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionItemProps = {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
};
|
||||
|
||||
vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useCurrentResume: () => ({
|
||||
data: {
|
||||
@@ -73,11 +86,11 @@ vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useUpdateResumeData: () => vi.fn(),
|
||||
}));
|
||||
vi.mock("../shared/section-base", () => ({
|
||||
SectionBase: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
||||
SectionBase: ({ children }: SectionBaseProps) => <div>{children}</div>,
|
||||
}));
|
||||
vi.mock("../shared/section-item", () => ({
|
||||
SectionAddItemButton: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: { title: string; subtitle: string }) => (
|
||||
SectionAddItemButton: ({ children }: SectionAddItemButtonProps) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: SectionItemProps) => (
|
||||
<div>
|
||||
<span data-testid="item-title">{title}</span>
|
||||
<span data-testid="item-subtitle">{subtitle}</span>
|
||||
|
||||
+17
-3
@@ -72,6 +72,20 @@ const sections = vi.hoisted(() => ({
|
||||
],
|
||||
}));
|
||||
|
||||
type SectionBaseProps = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
type SectionAddItemButtonProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionItemProps = {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
};
|
||||
|
||||
vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useCurrentResume: () => ({
|
||||
data: {
|
||||
@@ -89,19 +103,19 @@ vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useUpdateResumeData: () => vi.fn(),
|
||||
}));
|
||||
vi.mock("../shared/section-base", () => ({
|
||||
SectionBase: ({ children, className }: { children: React.ReactNode; className?: string }) => (
|
||||
SectionBase: ({ children, className }: SectionBaseProps) => (
|
||||
<div className={className} data-testid="section-base">
|
||||
{children}
|
||||
</div>
|
||||
),
|
||||
}));
|
||||
vi.mock("../shared/section-item", () => ({
|
||||
SectionAddItemButton: ({ children }: { children: React.ReactNode }) => (
|
||||
SectionAddItemButton: ({ children }: SectionAddItemButtonProps) => (
|
||||
<button type="button" data-testid="add-button">
|
||||
{children}
|
||||
</button>
|
||||
),
|
||||
SectionItem: ({ title, subtitle }: { title: string; subtitle: string }) => (
|
||||
SectionItem: ({ title, subtitle }: SectionItemProps) => (
|
||||
<div>
|
||||
<span data-testid="item-title">{title}</span>
|
||||
<span data-testid="item-subtitle">{subtitle}</span>
|
||||
|
||||
@@ -32,6 +32,18 @@ export function PictureSectionBuilder() {
|
||||
);
|
||||
}
|
||||
|
||||
type PicturePreviewControlsProps = {
|
||||
fileInputRef: React.RefObject<HTMLInputElement | null>;
|
||||
form: PictureSettingsForm;
|
||||
normalizedPictureUrl: string;
|
||||
picture: PictureValues;
|
||||
pictureSrc: string;
|
||||
onAutoSave: () => void;
|
||||
onDeletePicture: () => void;
|
||||
onSelectPicture: () => void;
|
||||
onUploadPicture: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
};
|
||||
|
||||
function PicturePreviewControls({
|
||||
fileInputRef,
|
||||
form,
|
||||
@@ -42,17 +54,7 @@ function PicturePreviewControls({
|
||||
onDeletePicture,
|
||||
onSelectPicture,
|
||||
onUploadPicture,
|
||||
}: {
|
||||
fileInputRef: React.RefObject<HTMLInputElement | null>;
|
||||
form: PictureSettingsForm;
|
||||
normalizedPictureUrl: string;
|
||||
picture: PictureValues;
|
||||
pictureSrc: string;
|
||||
onAutoSave: () => void;
|
||||
onDeletePicture: () => void;
|
||||
onSelectPicture: () => void;
|
||||
onUploadPicture: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
}) {
|
||||
}: PicturePreviewControlsProps) {
|
||||
return (
|
||||
<div className="flex items-center gap-x-4">
|
||||
<input
|
||||
@@ -122,7 +124,12 @@ function PicturePreviewControls({
|
||||
);
|
||||
}
|
||||
|
||||
function PictureGeometryFields({ form, onAutoSave }: { form: PictureSettingsForm; onAutoSave: () => void }) {
|
||||
type PictureGeometryFieldsProps = {
|
||||
form: PictureSettingsForm;
|
||||
onAutoSave: () => void;
|
||||
};
|
||||
|
||||
function PictureGeometryFields({ form, onAutoSave }: PictureGeometryFieldsProps) {
|
||||
return (
|
||||
<>
|
||||
<form.Field name="size">
|
||||
|
||||
@@ -26,6 +26,20 @@ const sectionItems = vi.hoisted(() => [
|
||||
},
|
||||
]);
|
||||
|
||||
type SectionBaseProps = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
type SectionAddItemButtonProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionItemProps = {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
};
|
||||
|
||||
vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useCurrentResume: () => ({
|
||||
data: {
|
||||
@@ -35,15 +49,15 @@ vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useUpdateResumeData: () => vi.fn(),
|
||||
}));
|
||||
vi.mock("../shared/section-base", () => ({
|
||||
SectionBase: ({ children, className }: { children: React.ReactNode; className?: string }) => (
|
||||
SectionBase: ({ children, className }: SectionBaseProps) => (
|
||||
<div className={className} data-testid="section-base">
|
||||
{children}
|
||||
</div>
|
||||
),
|
||||
}));
|
||||
vi.mock("../shared/section-item", () => ({
|
||||
SectionAddItemButton: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: { title: string; subtitle: string }) => (
|
||||
SectionAddItemButton: ({ children }: SectionAddItemButtonProps) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: SectionItemProps) => (
|
||||
<div>
|
||||
<span data-testid="item-title">{title}</span>
|
||||
<span data-testid="item-subtitle">{subtitle}</span>
|
||||
|
||||
@@ -35,6 +35,19 @@ const items = vi.hoisted(() => [
|
||||
},
|
||||
]);
|
||||
|
||||
type SectionBaseProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionAddItemButtonProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionItemProps = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
};
|
||||
|
||||
vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useCurrentResume: () => ({
|
||||
data: { sections: { projects: { title: "Projects", columns: 1, hidden: false, items } } },
|
||||
@@ -42,11 +55,11 @@ vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useUpdateResumeData: () => vi.fn(),
|
||||
}));
|
||||
vi.mock("../shared/section-base", () => ({
|
||||
SectionBase: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
||||
SectionBase: ({ children }: SectionBaseProps) => <div>{children}</div>,
|
||||
}));
|
||||
vi.mock("../shared/section-item", () => ({
|
||||
SectionAddItemButton: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: { title: string; subtitle?: string }) => (
|
||||
SectionAddItemButton: ({ children }: SectionAddItemButtonProps) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: SectionItemProps) => (
|
||||
<div>
|
||||
<span data-testid="item-title">{title}</span>
|
||||
<span data-testid="item-subtitle">{subtitle ?? "<undefined>"}</span>
|
||||
|
||||
@@ -10,6 +10,20 @@ const sectionItems = vi.hoisted(() => [
|
||||
{ id: "s2", name: "Go", proficiency: "Intermediate", level: 3, keywords: [], description: "", hidden: false },
|
||||
]);
|
||||
|
||||
type SectionBaseProps = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
type SectionAddItemButtonProps = {
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
type SectionItemProps = {
|
||||
title: string;
|
||||
subtitle: string;
|
||||
};
|
||||
|
||||
vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useCurrentResume: () => ({
|
||||
data: { sections: { skills: { title: "Skills", columns: 1, hidden: false, items: sectionItems } } },
|
||||
@@ -17,15 +31,15 @@ vi.mock("@/features/resume/builder/draft", () => ({
|
||||
useUpdateResumeData: () => vi.fn(),
|
||||
}));
|
||||
vi.mock("../shared/section-base", () => ({
|
||||
SectionBase: ({ children, className }: { children: React.ReactNode; className?: string }) => (
|
||||
SectionBase: ({ children, className }: SectionBaseProps) => (
|
||||
<div className={className} data-testid="section-base">
|
||||
{children}
|
||||
</div>
|
||||
),
|
||||
}));
|
||||
vi.mock("../shared/section-item", () => ({
|
||||
SectionAddItemButton: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: { title: string; subtitle: string }) => (
|
||||
SectionAddItemButton: ({ children }: SectionAddItemButtonProps) => <button type="button">{children}</button>,
|
||||
SectionItem: ({ title, subtitle }: SectionItemProps) => (
|
||||
<div>
|
||||
<span data-testid="item-title">{title}</span>
|
||||
<span data-testid="item-subtitle">{subtitle}</span>
|
||||
|
||||
Reference in New Issue
Block a user