@@ -303,7 +303,7 @@ const ManagePromotionsPage = () => {
303303 setShowCreateModal ( false ) ;
304304 setShowEditModal ( false ) ;
305305 } }
306- title = { showEditModal ? 'Edit Promotion' : 'Create Promotion' }
306+ title = { showEditModal ? t ( 'promotions.edit.title' ) : t ( 'promotions.create.title' ) }
307307 size = "medium"
308308 >
309309 < form onSubmit = { handleSubmit } className = "promotion-form" >
@@ -312,34 +312,34 @@ const ManagePromotionsPage = () => {
312312 ) }
313313
314314 < div className = "form-group" >
315- < label htmlFor = "name" className = "form-label" > Promotion Name *</ label >
315+ < label htmlFor = "name" className = "form-label" > { t ( 'promotions.create.nameLabel' ) } *</ label >
316316 < input
317317 type = "text"
318318 id = "name"
319319 name = "name"
320320 value = { formData . name }
321321 onChange = { handleInputChange }
322322 required
323- placeholder = "e.g., Summer Sale"
323+ placeholder = { t ( 'promotions.create.namePlaceholder' ) }
324324 className = "form-input"
325325 />
326326 </ div >
327327
328328 < div className = "form-group" >
329- < label htmlFor = "description" className = "form-label" > Description </ label >
329+ < label htmlFor = "description" className = "form-label" > { t ( 'promotions.create.descriptionLabel' ) } </ label >
330330 < textarea
331331 id = "description"
332332 name = "description"
333333 value = { formData . description }
334334 onChange = { handleInputChange }
335335 rows = { 3 }
336- placeholder = "Describe the promotion..."
336+ placeholder = { t ( 'promotions.create.descriptionPlaceholder' ) }
337337 className = "form-textarea"
338338 />
339339 </ div >
340340
341341 < div className = "form-group" >
342- < label htmlFor = "type" className = "form-label" > Type *</ label >
342+ < label htmlFor = "type" className = "form-label" > { t ( 'promotions.create.typeLabel' ) } *</ label >
343343 < select
344344 id = "type"
345345 name = "type"
@@ -348,14 +348,14 @@ const ManagePromotionsPage = () => {
348348 required
349349 className = "form-select"
350350 >
351- < option value = "automatic" > Automatic (Rate-based) </ option >
352- < option value = "one-time" > One-Time Code </ option >
351+ < option value = "automatic" > { t ( 'promotions.types.automatic' ) } </ option >
352+ < option value = "one-time" > { t ( 'promotions.types.oneTime' ) } </ option >
353353 </ select >
354354 </ div >
355355
356356 < div className = "form-row" >
357357 < div className = "form-group" >
358- < label htmlFor = "startTime" className = "form-label" > Start Date *</ label >
358+ < label htmlFor = "startTime" className = "form-label" > { t ( 'common:startDate' ) } *</ label >
359359 < input
360360 type = "datetime-local"
361361 id = "startTime"
@@ -368,7 +368,7 @@ const ManagePromotionsPage = () => {
368368 </ div >
369369
370370 < div className = "form-group" >
371- < label htmlFor = "endTime" className = "form-label" > End Date *</ label >
371+ < label htmlFor = "endTime" className = "form-label" > { t ( 'common:endDate' ) } *</ label >
372372 < input
373373 type = "datetime-local"
374374 id = "endTime"
@@ -384,7 +384,7 @@ const ManagePromotionsPage = () => {
384384 { formData . type === 'automatic' ? (
385385 < div className = "form-row" >
386386 < div className = "form-group" >
387- < label htmlFor = "rate" className = "form-label" > Bonus Rate *</ label >
387+ < label htmlFor = "rate" className = "form-label" > { t ( 'promotions.manage.bonusRate' ) } *</ label >
388388 < input
389389 type = "number"
390390 id = "rate"
@@ -394,15 +394,15 @@ const ManagePromotionsPage = () => {
394394 step = "0.01"
395395 min = "0"
396396 max = "10"
397- placeholder = "e.g., 0.5 for 50%"
397+ placeholder = { t ( 'promotions.manage.ratePlaceholder' ) }
398398 required = { formData . type === 'automatic' }
399399 className = "form-input"
400400 />
401- < span className = "form-helper" > Enter as decimal (0.5 = 50%) </ span >
401+ < span className = "form-helper" > { t ( 'promotions.manage.rateHelper' ) } </ span >
402402 </ div >
403403
404404 < div className = "form-group" >
405- < label htmlFor = "minSpending" className = "form-label" > Min Spending ($) </ label >
405+ < label htmlFor = "minSpending" className = "form-label" > { t ( 'promotions.manage.minSpending' ) } </ label >
406406 < input
407407 type = "number"
408408 id = "minSpending"
@@ -418,15 +418,15 @@ const ManagePromotionsPage = () => {
418418 </ div >
419419 ) : (
420420 < div className = "form-group" >
421- < label htmlFor = "points" className = "form-label" > Points *</ label >
421+ < label htmlFor = "points" className = "form-label" > { t ( 'promotions.manage.points' ) } *</ label >
422422 < input
423423 type = "number"
424424 id = "points"
425425 name = "points"
426426 value = { formData . points }
427427 onChange = { handleInputChange }
428428 min = "1"
429- placeholder = "e.g., 100"
429+ placeholder = { t ( 'promotions.manage.pointsPlaceholder' ) }
430430 required = { formData . type === 'one-time' }
431431 className = "form-input"
432432 />
@@ -457,9 +457,9 @@ const ManagePromotionsPage = () => {
457457 isOpen = { showDeleteConfirm }
458458 onClose = { ( ) => setShowDeleteConfirm ( false ) }
459459 onConfirm = { handleDelete }
460- title = "Delete Promotion"
461- message = { `Are you sure you want to delete " ${ selectedPromotion ?. name } "? This action cannot be undone.` }
462- confirmText = "Delete"
460+ title = { t ( 'promotions.delete.title' ) }
461+ message = { t ( 'promotions. delete.message' , { name : selectedPromotion ?. name } ) }
462+ confirmText = { t ( 'common:delete' ) }
463463 confirmVariant = "danger"
464464 />
465465 </ div >
0 commit comments