@@ -46,8 +46,8 @@ function AddContactInfo({
4646 const { t } = useTranslations ( ) ;
4747
4848 const pageTitle = contactInfoToEdit
49- ? "Edit Contact Info"
50- : "Add Contact Info" ;
49+ ? t ( "profile.editContactInfo" )
50+ : t ( "profile.addContactInfo" ) ;
5151
5252 const form = useForm < z . infer < typeof AddContactInfoFormSchema > > ( {
5353 resolver : zodResolver ( AddContactInfoFormSchema ) ,
@@ -119,9 +119,9 @@ function AddContactInfo({
119119 setDialogOpen ( false ) ;
120120 toast ( {
121121 variant : "success" ,
122- description : `Contact Info has been ${
123- contactInfoToEdit ? "updated" : "created"
124- } successfully` ,
122+ description : contactInfoToEdit
123+ ? t ( "profile.contactInfoUpdated" )
124+ : t ( "profile.contactInfoCreated" ) ,
125125 } ) ;
126126 }
127127 } ) ;
@@ -135,7 +135,7 @@ function AddContactInfo({
135135 < DialogHeader >
136136 < DialogTitle > { pageTitle } </ DialogTitle >
137137 < DialogDescription className = "sr-only" >
138- { contactInfoToEdit ? "Edit contact information" : "Add contact information" }
138+ { contactInfoToEdit ? t ( "profile.editContactInfo" ) : t ( "profile.addContactInfo" ) }
139139 </ DialogDescription >
140140 </ DialogHeader >
141141 < Form { ...form } >
@@ -150,9 +150,9 @@ function AddContactInfo({
150150 name = "firstName"
151151 render = { ( { field } ) => (
152152 < FormItem >
153- < FormLabel > First Name </ FormLabel >
153+ < FormLabel > { t ( "profile.firstName" ) } </ FormLabel >
154154 < FormControl >
155- < Input placeholder = "e.g. John" { ...field } />
155+ < Input placeholder = { t ( "profile.firstNamePlaceholder" ) } { ...field } />
156156 </ FormControl >
157157 < FormMessage />
158158 </ FormItem >
@@ -167,9 +167,9 @@ function AddContactInfo({
167167 name = "lastName"
168168 render = { ( { field } ) => (
169169 < FormItem >
170- < FormLabel > Last Name </ FormLabel >
170+ < FormLabel > { t ( "profile.lastName" ) } </ FormLabel >
171171 < FormControl >
172- < Input placeholder = "e.g. Doe" { ...field } />
172+ < Input placeholder = { t ( "profile.lastNamePlaceholder" ) } { ...field } />
173173 </ FormControl >
174174 < FormMessage />
175175 </ FormItem >
@@ -184,9 +184,9 @@ function AddContactInfo({
184184 name = "headline"
185185 render = { ( { field } ) => (
186186 < FormItem >
187- < FormLabel > Headline </ FormLabel >
187+ < FormLabel > { t ( "profile.headline" ) } </ FormLabel >
188188 < FormControl >
189- < Input placeholder = "e.g. Senior Software Engineer" { ...field } />
189+ < Input placeholder = { t ( "profile.headlinePlaceholder" ) } { ...field } />
190190 </ FormControl >
191191 < FormMessage />
192192 </ FormItem >
@@ -201,9 +201,9 @@ function AddContactInfo({
201201 name = "email"
202202 render = { ( { field } ) => (
203203 < FormItem >
204- < FormLabel > Email </ FormLabel >
204+ < FormLabel > { t ( "profile.email" ) } </ FormLabel >
205205 < FormControl >
206- < Input placeholder = "e.g. john@example.com" { ...field } />
206+ < Input placeholder = { t ( "profile.emailPlaceholder" ) } { ...field } />
207207 </ FormControl >
208208 < FormMessage />
209209 </ FormItem >
@@ -218,9 +218,9 @@ function AddContactInfo({
218218 name = "phone"
219219 render = { ( { field } ) => (
220220 < FormItem >
221- < FormLabel > Phone </ FormLabel >
221+ < FormLabel > { t ( "profile.phone" ) } </ FormLabel >
222222 < FormControl >
223- < Input placeholder = "e.g. +49 123 456789" { ...field } />
223+ < Input placeholder = { t ( "profile.phonePlaceholder" ) } { ...field } />
224224 </ FormControl >
225225 < FormMessage />
226226 </ FormItem >
@@ -235,9 +235,9 @@ function AddContactInfo({
235235 name = "address"
236236 render = { ( { field } ) => (
237237 < FormItem >
238- < FormLabel > Address </ FormLabel >
238+ < FormLabel > { t ( "profile.address" ) } </ FormLabel >
239239 < FormControl >
240- < Input placeholder = "e.g. Berlin, Germany" { ...field } value = { field . value ?? "" } />
240+ < Input placeholder = { t ( "profile.addressPlaceholder" ) } { ...field } value = { field . value ?? "" } />
241241 </ FormControl >
242242 < FormMessage />
243243 </ FormItem >
@@ -255,11 +255,11 @@ function AddContactInfo({
255255 className = "mt-2 md:mt-0 w-full"
256256 onClick = { closeDialog }
257257 >
258- Cancel
258+ { t ( "common.cancel" ) }
259259 </ Button >
260260 </ div >
261261 < Button type = "submit" disabled = { ! formState . isDirty } >
262- Save
262+ { t ( "common.save" ) }
263263 { isPending && < Loader className = "h-4 w-4 shrink-0 spinner" /> }
264264 </ Button >
265265 </ DialogFooter >
0 commit comments