@@ -56,17 +56,34 @@ const STRINGS = {
5656 diff_1hour_minutes : '1 hour {minutes} mins' ,
5757 diff_hours : '{hours} hours' ,
5858 diff_hours_minutes : '{hours} hours {minutes} mins' ,
59- spaces : '{spaces} spaces available' ,
60- no_spaces : 'No spaces available' ,
61- spaces_attending : "You're already attending, {spaces} more spaces available" ,
62- no_spaces_attending : "You're already attending, no more spaces available" ,
59+ spaces : ( { spaces } ) => {
60+ if ( spaces === null ) {
61+ return 'Spaces available'
62+ } else if ( spaces === 0 ) {
63+ return 'No spaces available'
64+ } else if ( spaces === 1 ) {
65+ return '1 space available'
66+ } else {
67+ return `${ spaces } spaces available`
68+ }
69+ } ,
70+ spaces_attending : ( { spaces } ) => {
71+ if ( spaces === null ) {
72+ return "You're already attending, more spaces available"
73+ } else if ( spaces === 0 ) {
74+ return "You're already attending, no more spaces available"
75+ } else if ( spaces === 1 ) {
76+ return "You're already attending, 1 more space available"
77+ } else {
78+ return `You're already attending, ${ spaces } more spaces available`
79+ }
80+ } ,
6381 add_existing_students : 'Add your existing Students to the lesson' ,
6482 add_new_student : 'Add a new Student to the lesson' ,
6583 appointment_not_found : 'Appointment not Found' ,
6684 appointment_not_found_id : 'No Appointment found with id {apt_id}.' ,
6785 price : 'Price' ,
6886 job : 'Job' ,
69- spaces_available : 'Spaces Available' ,
7087 start : 'Start' ,
7188 finish : 'Finish' ,
7289 location : 'Location' ,
0 commit comments