feat(i18n): implement localization using LinguiJS

This commit is contained in:
Amruth Pillai
2023-11-10 09:07:47 +01:00
parent 13d91411e3
commit 6ad4358d70
108 changed files with 4631 additions and 798 deletions

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { awardSchema, defaultAward } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const AwardsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Title</FormLabel>
<FormLabel>{t({ message: "Title", context: "Name of the Award" })}</FormLabel>
<FormControl>
<Input {...field} placeholder="3rd Runner Up" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,9 @@ export const AwardsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Awarder</FormLabel>
<FormLabel>{t`Awarder`}</FormLabel>
<FormControl>
<Input {...field} placeholder="TechCrunch Disrupt SF" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +64,15 @@ export const AwardsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Aug 2019" />
<Input
{...field}
placeholder={t({
message: "March 2023",
comment: "The month and year should be uniform across all languages.",
})}
/>
</FormControl>
<FormMessage />
</FormItem>
@ -77,9 +84,9 @@ export const AwardsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://techcrunch.com/events/disrupt-sf-2019" />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -91,7 +98,7 @@ export const AwardsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { certificationSchema, defaultCertification } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const CertificationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t({ message: "Name", context: "Name of the Certification" })}</FormLabel>
<FormControl>
<Input {...field} placeholder="Web Developer Bootcamp" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,9 @@ export const CertificationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Issuer</FormLabel>
<FormLabel>{t`Issuer`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Udemy" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +64,9 @@ export const CertificationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Aug 2019" />
<Input {...field} placeholder={t`March 2023`} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,7 +78,7 @@ export const CertificationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://udemy.com/certificate/UC-..." />
</FormControl>
@ -91,7 +92,7 @@ export const CertificationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { X } from "@phosphor-icons/react";
import { CustomSection, customSectionSchema, defaultCustomSection } from "@reactive-resume/schema";
import {
@ -49,7 +50,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
@ -63,7 +64,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Description</FormLabel>
<FormLabel>{t`Description`}</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
@ -77,7 +78,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
@ -91,7 +92,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Location</FormLabel>
<FormLabel>{t`Location`}</FormLabel>
<FormControl>
<Input {...field} />
</FormControl>
@ -105,7 +106,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} />
</FormControl>
@ -119,7 +120,7 @@ export const CustomSectionDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}
@ -141,12 +142,12 @@ export const CustomSectionDialog = () => {
render={({ field }) => (
<div className="col-span-2 space-y-3">
<FormItem>
<FormLabel>Keywords</FormLabel>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
<BadgeInput {...field} />
</FormControl>
<FormDescription>
You can add multiple keywords by separating them with a comma.
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
</FormDescription>
<FormMessage />
</FormItem>

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultEducation, educationSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Institution</FormLabel>
<FormLabel>{t`Institution`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Carnegie Mellon University" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,14 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Type of Study</FormLabel>
<FormLabel>
{t({
message: "Type of Study",
comment: "For example, Bachelor's Degree or Master's Degree",
})}
</FormLabel>
<FormControl>
<Input {...field} placeholder="Bachelor's Degree" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +69,14 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Area of Study</FormLabel>
<FormLabel>
{t({
message: "Area of Study",
comment: "For example, Computer Science or Business Administration",
})}
</FormLabel>
<FormControl>
<Input {...field} placeholder="Computer Science" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,7 +88,12 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Score</FormLabel>
<FormLabel>
{t({
message: "Score",
comment: "Score or honors for the degree, for example, CGPA or magna cum laude",
})}
</FormLabel>
<FormControl>
<Input {...field} placeholder="9.2 GPA" />
</FormControl>
@ -91,9 +107,9 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Aug 2006 - Oct 2012" />
<Input {...field} placeholder={t`March 2023 - Present`} />
</FormControl>
<FormMessage />
</FormItem>
@ -105,9 +121,9 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://www.cmu.edu/" />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -119,7 +135,7 @@ export const EducationDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultExperience, experienceSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Company</FormLabel>
<FormLabel>{t`Company`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Alphabet Inc." />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,14 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Position</FormLabel>
<FormLabel>
{t({
message: "Position",
context: "Position held at a company, for example, Software Engineer",
})}
</FormLabel>
<FormControl>
<Input {...field} placeholder="Chief Executive Officer" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +69,9 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Dec 2019 - Present" />
<Input {...field} placeholder={t`March 2023 - Present`} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,9 +83,9 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Location</FormLabel>
<FormLabel>{t`Location`}</FormLabel>
<FormControl>
<Input {...field} placeholder="New York, NY" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -91,9 +97,9 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://www.abc.xyz/" />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -105,7 +111,7 @@ export const ExperienceDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { X } from "@phosphor-icons/react";
import { defaultInterest, interestSchema } from "@reactive-resume/schema";
import {
@ -36,9 +37,9 @@ export const InterestsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Video Games" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -51,12 +52,12 @@ export const InterestsDialog = () => {
render={({ field }) => (
<div className="col-span-2 space-y-3">
<FormItem>
<FormLabel>Keywords</FormLabel>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
<BadgeInput {...field} placeholder="FIFA 23, Call of Duty, etc." />
<BadgeInput {...field} />
</FormControl>
<FormDescription>
You can add multiple keywords by separating them with a comma.
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
</FormDescription>
<FormMessage />
</FormItem>

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultLanguage, languageSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -33,9 +34,9 @@ export const LanguagesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="German" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -47,9 +48,9 @@ export const LanguagesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Fluency</FormLabel>
<FormLabel>{t`Fluency`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Native Speaker" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -61,7 +62,7 @@ export const LanguagesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel>Fluency (CEFR)</FormLabel>
<FormLabel>{t`Fluency (CEFR)`}</FormLabel>
<FormControl className="py-2">
<div className="flex items-center gap-x-4">
<Slider

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t, Trans } from "@lingui/macro";
import { defaultProfile, profileSchema } from "@reactive-resume/schema";
import {
Avatar,
@ -35,8 +36,9 @@ export const ProfilesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Network</FormLabel>
<FormLabel>{t`Network`}</FormLabel>
<FormControl>
{/* eslint-disable-next-line lingui/no-unlocalized-strings */}
<Input {...field} placeholder="LinkedIn" />
</FormControl>
<FormMessage />
@ -49,9 +51,9 @@ export const ProfilesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Username</FormLabel>
<FormLabel>{t`Username`}</FormLabel>
<FormControl>
<Input {...field} placeholder="johndoe" />
<Input {...field} placeholder="john.doe" />
</FormControl>
<FormMessage />
</FormItem>
@ -63,7 +65,7 @@ export const ProfilesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>URL</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://linkedin.com/in/johndoe" />
</FormControl>
@ -77,7 +79,7 @@ export const ProfilesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel htmlFor="iconSlug">Icon</FormLabel>
<FormLabel htmlFor="iconSlug">{t`Icon`}</FormLabel>
<FormControl>
<div className="flex items-center gap-x-2">
<Avatar className="h-8 w-8 bg-white">
@ -93,15 +95,17 @@ export const ProfilesDialog = () => {
</FormControl>
<FormMessage />
<FormDescription className="ml-10">
Powered by{" "}
<a
href="https://simpleicons.org/"
target="_blank"
rel="noopener noreferrer nofollow"
className="font-medium"
>
Simple Icons
</a>
<Trans>
Powered by{" "}
<a
href="https://simpleicons.org/"
target="_blank"
rel="noopener noreferrer nofollow"
className="font-medium"
>
Simple Icons
</a>
</Trans>
</FormDescription>
</FormItem>
)}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { X } from "@phosphor-icons/react";
import { defaultProject, projectSchema } from "@reactive-resume/schema";
import {
@ -40,9 +41,9 @@ export const ProjectsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Reactive Resume" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -54,9 +55,9 @@ export const ProjectsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Description</FormLabel>
<FormLabel>{t`Description`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Open Source Resume Builder" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -68,9 +69,9 @@ export const ProjectsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Sep 2018 - Present" />
<Input {...field} placeholder={t`March 2023 - Present`} />
</FormControl>
<FormMessage />
</FormItem>
@ -82,7 +83,7 @@ export const ProjectsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://rxresu.me" />
</FormControl>
@ -96,7 +97,7 @@ export const ProjectsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}
@ -118,12 +119,12 @@ export const ProjectsDialog = () => {
render={({ field }) => (
<div className="col-span-2 space-y-3">
<FormItem>
<FormLabel>Keywords</FormLabel>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
<BadgeInput {...field} placeholder="FIFA 23, Call of Duty, etc." />
<BadgeInput {...field} />
</FormControl>
<FormDescription>
You can add multiple keywords by separating them with a comma.
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
</FormDescription>
<FormMessage />
</FormItem>

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultPublication, publicationSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const PublicationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="The Great Gatsby" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,9 @@ export const PublicationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Publisher</FormLabel>
<FormLabel>{t`Publisher`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Charles Scribner's Sons" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +64,9 @@ export const PublicationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Release Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="April 10, 1925" />
<Input {...field} placeholder={t`March 2023`} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,9 +78,9 @@ export const PublicationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://books.google.com/..." />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -91,7 +92,7 @@ export const PublicationsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultReference, referenceSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const ReferencesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Cosmo Kramer" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,9 @@ export const ReferencesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Description</FormLabel>
<FormLabel>{t`Description`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Neighbour" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +64,9 @@ export const ReferencesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://linkedin.com/in/cosmo.kramer" />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,7 +78,7 @@ export const ReferencesDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { X } from "@phosphor-icons/react";
import { defaultSkill, skillSchema } from "@reactive-resume/schema";
import {
@ -37,9 +38,9 @@ export const SkillsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Name</FormLabel>
<FormLabel>{t`Name`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Content Management" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -51,9 +52,9 @@ export const SkillsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Description</FormLabel>
<FormLabel>{t`Description`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Advanced" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -65,7 +66,7 @@ export const SkillsDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-2">
<FormLabel>Level</FormLabel>
<FormLabel>{t`Level`}</FormLabel>
<FormControl className="py-2">
<div className="flex items-center gap-x-4">
<Slider
@ -91,12 +92,12 @@ export const SkillsDialog = () => {
render={({ field }) => (
<div className="col-span-2 space-y-3">
<FormItem>
<FormLabel>Keywords</FormLabel>
<FormLabel>{t`Keywords`}</FormLabel>
<FormControl>
<BadgeInput {...field} placeholder="WordPress, Joomla, Webflow etc." />
<BadgeInput {...field} />
</FormControl>
<FormDescription>
You can add multiple keywords by separating them with a comma.
{t`You can add multiple keywords by separating them with a comma or pressing enter.`}
</FormDescription>
<FormMessage />
</FormItem>

View File

@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { t } from "@lingui/macro";
import { defaultVolunteer, volunteerSchema } from "@reactive-resume/schema";
import {
FormControl,
@ -35,9 +36,9 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Organization</FormLabel>
<FormLabel>{t`Organization`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Amnesty International" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -49,9 +50,9 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Position</FormLabel>
<FormLabel>{t`Position`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Recruiter" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -63,9 +64,9 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Date</FormLabel>
<FormLabel>{t`Date`}</FormLabel>
<FormControl>
<Input {...field} placeholder="Dec 2016 - Aug 2017" />
<Input {...field} placeholder={t`March 2023 - Present`} />
</FormControl>
<FormMessage />
</FormItem>
@ -77,9 +78,9 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1">
<FormLabel>Location</FormLabel>
<FormLabel>{t`Location`}</FormLabel>
<FormControl>
<Input {...field} placeholder="New York, NY" />
<Input {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -91,9 +92,9 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Website</FormLabel>
<FormLabel>{t`Website`}</FormLabel>
<FormControl>
<URLInput {...field} placeholder="https://www.amnesty.org/" />
<URLInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
@ -105,7 +106,7 @@ export const VolunteerDialog = () => {
control={form.control}
render={({ field }) => (
<FormItem className="col-span-1 sm:col-span-2">
<FormLabel>Summary</FormLabel>
<FormLabel>{t`Summary`}</FormLabel>
<FormControl>
<RichInput
{...field}