Skip to content

Commit

Permalink
refactor: add translate in all error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
iamejaaz committed Nov 12, 2024
1 parent e25f161 commit be49ba6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions frontend/src/components/Modals/LiveClassModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,19 @@ const submitLiveClass = (close) => {
return createLiveClass.submit(liveClass, {
validate() {
if (!liveClass.title) {
return 'Please enter a title.'
return __('Please enter a title.')
}
if (!liveClass.date) {
return 'Please select a date.'
return __('Please select a date.')
}
if (!liveClass.time) {
return 'Please select a time.'
return __('Please select a time.')
}
if (!liveClass.timezone) {
return 'Please select a timezone.'
return __('Please select a timezone.')
}
if (!valideTime()) {
return 'Please enter a valid time in the format HH:mm.'
return __('Please enter a valid time in the format HH:mm.')
}
const liveClassDateTime = dayjs(`${liveClass.date}T${liveClass.time}`).tz(
liveClass.timezone,
Expand All @@ -180,10 +180,10 @@ const submitLiveClass = (close) => {
'minute'
)
) {
return 'Please select a future date and time.'
return __('Please select a future date and time.')
}
if (!liveClass.duration) {
return 'Please select a duration.'
return __('Please select a duration.')
}
},
onSuccess() {
Expand Down

0 comments on commit be49ba6

Please sign in to comment.