diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index 54c0bc318494d..5f6ccc3285210 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -234,8 +234,8 @@ public function generateWhenStringSingular(EventReader $er): string { // TRANSLATORS // Indicates when a calendar event will happen, shown on invitation emails // Output produced in order: - // In a minute/hour/day/week/month/year on July 1, 2024 for the entire day - // In a minute/hour/day/week/month/year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto) + // In 1 minute/hour/day/week/month/year on July 1, 2024 for the entire day + // In 1 minute/hour/day/week/month/year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto) // In 2 minutes/hours/days/weeks/months/years on July 1, 2024 for the entire day // In 2 minutes/hours/days/weeks/months/years on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto) return match ([$occurring['scale'], $endTime !== null]) { @@ -244,37 +244,37 @@ public function generateWhenStringSingular(EventReader $er): string { [$startDate] ), ['minute', false] => $this->l10n->n( - 'In a minute on %1$s for the entire day', + 'In %n minute on %1$s for the entire day', 'In %n minutes on %1$s for the entire day', $occurring['interval'], [$startDate] ), ['hour', false] => $this->l10n->n( - 'In a hour on %1$s for the entire day', + 'In %n hour on %1$s for the entire day', 'In %n hours on %1$s for the entire day', $occurring['interval'], [$startDate] ), ['day', false] => $this->l10n->n( - 'In a day on %1$s for the entire day', + 'In %n day on %1$s for the entire day', 'In %n days on %1$s for the entire day', $occurring['interval'], [$startDate] ), ['week', false] => $this->l10n->n( - 'In a week on %1$s for the entire day', + 'In %n week on %1$s for the entire day', 'In %n weeks on %1$s for the entire day', $occurring['interval'], [$startDate] ), ['month', false] => $this->l10n->n( - 'In a month on %1$s for the entire day', + 'In %n month on %1$s for the entire day', 'In %n months on %1$s for the entire day', $occurring['interval'], [$startDate] ), ['year', false] => $this->l10n->n( - 'In a year on %1$s for the entire day', + 'In %n year on %1$s for the entire day', 'In %n years on %1$s for the entire day', $occurring['interval'], [$startDate] @@ -284,37 +284,37 @@ public function generateWhenStringSingular(EventReader $er): string { [$startDate, $startTime, $endTime] ), ['minute', true] => $this->l10n->n( - 'In a minute on %1$s between %2$s - %3$s', + 'In %n minute on %1$s between %2$s - %3$s', 'In %n minutes on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] ), ['hour', true] => $this->l10n->n( - 'In a hour on %1$s between %2$s - %3$s', + 'In %n hour on %1$s between %2$s - %3$s', 'In %n hours on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] ), ['day', true] => $this->l10n->n( - 'In a day on %1$s between %2$s - %3$s', + 'In %n day on %1$s between %2$s - %3$s', 'In %n days on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] ), ['week', true] => $this->l10n->n( - 'In a week on %1$s between %2$s - %3$s', + 'In %n week on %1$s between %2$s - %3$s', 'In %n weeks on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] ), ['month', true] => $this->l10n->n( - 'In a month on %1$s between %2$s - %3$s', + 'In %n month on %1$s between %2$s - %3$s', 'In %n months on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] ), ['year', true] => $this->l10n->n( - 'In a year on %1$s between %2$s - %3$s', + 'In %n year on %1$s between %2$s - %3$s', 'In %n years on %1$s between %2$s - %3$s', $occurring['interval'], [$startDate, $startTime, $endTime] @@ -652,9 +652,9 @@ public function generateOccurringString(EventReader $er): string { // TRANSLATORS // Indicates when a calendar event will happen, shown on invitation emails // Output produced in order: - // In a minute/hour/day/week/month/year on July 1, 2024 - // In a minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 - // In a minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 and July 5, 2024 + // In 1 minute/hour/day/week/month/year on July 1, 2024 + // In 1 minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 + // In 1 minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 and July 5, 2024 // In 2 minutes/hours/days/weeks/months/years on July 1, 2024 // In 2 minutes/hours/days/weeks/months/years on July 1, 2024 then on July 3, 2024 // In 2 minutes/hours/days/weeks/months/years on July 1, 2024 then on July 3, 2024 and July 5, 2024 @@ -664,37 +664,37 @@ public function generateOccurringString(EventReader $er): string { [$occurrence] ), ['minute', false, false] => $this->l10n->n( - 'In a minute on %1$s', + 'In %n minute on %1$s', 'In %n minutes on %1$s', $occurrenceIn['interval'], [$occurrence] ), ['hour', false, false] => $this->l10n->n( - 'In a hour on %1$s', + 'In %n hour on %1$s', 'In %n hours on %1$s', $occurrenceIn['interval'], [$occurrence] ), ['day', false, false] => $this->l10n->n( - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', $occurrenceIn['interval'], [$occurrence] ), ['week', false, false] => $this->l10n->n( - 'In a week on %1$s', + 'In %n week on %1$s', 'In %n weeks on %1$s', $occurrenceIn['interval'], [$occurrence] ), ['month', false, false] => $this->l10n->n( - 'In a month on %1$s', + 'In %n month on %1$s', 'In %n months on %1$s', $occurrenceIn['interval'], [$occurrence] ), ['year', false, false] => $this->l10n->n( - 'In a year on %1$s', + 'In %n year on %1$s', 'In %n years on %1$s', $occurrenceIn['interval'], [$occurrence] @@ -704,37 +704,37 @@ public function generateOccurringString(EventReader $er): string { [$occurrence, $occurrence2] ), ['minute', true, false] => $this->l10n->n( - 'In a minute on %1$s then on %2$s', + 'In %n minute on %1$s then on %2$s', 'In %n minutes on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] ), ['hour', true, false] => $this->l10n->n( - 'In a hour on %1$s then on %2$s', + 'In %n hour on %1$s then on %2$s', 'In %n hours on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] ), ['day', true, false] => $this->l10n->n( - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] ), ['week', true, false] => $this->l10n->n( - 'In a week on %1$s then on %2$s', + 'In %n week on %1$s then on %2$s', 'In %n weeks on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] ), ['month', true, false] => $this->l10n->n( - 'In a month on %1$s then on %2$s', + 'In %n month on %1$s then on %2$s', 'In %n months on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] ), ['year', true, false] => $this->l10n->n( - 'In a year on %1$s then on %2$s', + 'In %n year on %1$s then on %2$s', 'In %n years on %1$s then on %2$s', $occurrenceIn['interval'], [$occurrence, $occurrence2] @@ -744,37 +744,37 @@ public function generateOccurringString(EventReader $er): string { [$occurrence, $occurrence2, $occurrence3] ), ['minute', true, true] => $this->l10n->n( - 'In a minute on %1$s then on %2$s and %3$s', + 'In %n minute on %1$s then on %2$s and %3$s', 'In %n minutes on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] ), ['hour', true, true] => $this->l10n->n( - 'In a hour on %1$s then on %2$s and %3$s', + 'In %n hour on %1$s then on %2$s and %3$s', 'In %n hours on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] ), ['day', true, true] => $this->l10n->n( - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] ), ['week', true, true] => $this->l10n->n( - 'In a week on %1$s then on %2$s and %3$s', + 'In %n week on %1$s then on %2$s and %3$s', 'In %n weeks on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] ), ['month', true, true] => $this->l10n->n( - 'In a month on %1$s then on %2$s and %3$s', + 'In %n month on %1$s then on %2$s and %3$s', 'In %n months on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] ), ['year', true, true] => $this->l10n->n( - 'In a year on %1$s then on %2$s and %3$s', + 'In %n year on %1$s then on %2$s and %3$s', 'In %n years on %1$s then on %2$s and %3$s', $occurrenceIn['interval'], [$occurrence, $occurrence2, $occurrence3] diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php index 2be6a1cf8b1e8..ef335faeae777 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipServiceTest.php @@ -167,11 +167,11 @@ function ($v1, $v2, $v3) { ); $this->l10n->method('n')->willReturnMap([ [ - 'In a day on %1$s between %2$s - %3$s', + 'In %n day on %1$s between %2$s - %3$s', 'In %n days on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ] ]); // construct time factory return(s) @@ -215,11 +215,11 @@ function ($v1, $v2, $v3) { ); $this->l10n->method('n')->willReturnMap([ [ - 'In a day on %1$s between %2$s - %3$s', + 'In %n day on %1$s between %2$s - %3$s', 'In %n days on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ] ]); // construct time factory return(s) @@ -360,85 +360,85 @@ function ($v1, $v2, $v3) { $this->l10n->method('n')->willReturnMap([ // singular entire day [ - 'In a minute on %1$s for the entire day', + 'In %n minute on %1$s for the entire day', 'In %n minutes on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a minute on July 1, 2024 for the entire day' + 'In 1 minute on July 1, 2024 for the entire day' ], [ - 'In a hour on %1$s for the entire day', + 'In %n hour on %1$s for the entire day', 'In %n hours on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a hour on July 1, 2024 for the entire day' + 'In 1 hour on July 1, 2024 for the entire day' ], [ - 'In a day on %1$s for the entire day', + 'In %n day on %1$s for the entire day', 'In %n days on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a day on July 1, 2024 for the entire day' + 'In 1 day on July 1, 2024 for the entire day' ], [ - 'In a week on %1$s for the entire day', + 'In %n week on %1$s for the entire day', 'In %n weeks on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a week on July 1, 2024 for the entire day' + 'In 1 week on July 1, 2024 for the entire day' ], [ - 'In a month on %1$s for the entire day', + 'In %n month on %1$s for the entire day', 'In %n months on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a month on July 1, 2024 for the entire day' + 'In 1 month on July 1, 2024 for the entire day' ], [ - 'In a year on %1$s for the entire day', + 'In %n year on %1$s for the entire day', 'In %n years on %1$s for the entire day', 1, ['July 1, 2024'], - 'In a year on July 1, 2024 for the entire day' + 'In 1 year on July 1, 2024 for the entire day' ], // plural entire day [ - 'In a minute on %1$s for the entire day', + 'In %n minute on %1$s for the entire day', 'In %n minutes on %1$s for the entire day', 2, ['July 1, 2024'], 'In 2 minutes on July 1, 2024 for the entire day' ], [ - 'In a hour on %1$s for the entire day', + 'In %n hour on %1$s for the entire day', 'In %n hours on %1$s for the entire day', 2, ['July 1, 2024'], 'In 2 hours on July 1, 2024 for the entire day' ], [ - 'In a day on %1$s for the entire day', + 'In %n day on %1$s for the entire day', 'In %n days on %1$s for the entire day', 2, ['July 1, 2024'], 'In 2 days on July 1, 2024 for the entire day' ], [ - 'In a week on %1$s for the entire day', + 'In %n week on %1$s for the entire day', 'In %n weeks on %1$s for the entire day', 2, ['July 1, 2024'], 'In 2 weeks on July 1, 2024 for the entire day' ], [ - 'In a month on %1$s for the entire day', + 'In %n month on %1$s for the entire day', 'In %n months on %1$s for the entire day', 2, ['July 1, 2024'], 'In 2 months on July 1, 2024 for the entire day' ], [ - 'In a year on %1$s for the entire day', + 'In %n year on %1$s for the entire day', 'In %n years on %1$s for the entire day', 2, ['July 1, 2024'], @@ -446,85 +446,85 @@ function ($v1, $v2, $v3) { ], // singular partial day [ - 'In a minute on %1$s between %2$s - %3$s', + 'In %n minute on %1$s between %2$s - %3$s', 'In %n minutes on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a minute on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 minute on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a hour on %1$s between %2$s - %3$s', + 'In %n hour on %1$s between %2$s - %3$s', 'In %n hours on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a hour on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 hour on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a day on %1$s between %2$s - %3$s', + 'In %n day on %1$s between %2$s - %3$s', 'In %n days on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a week on %1$s between %2$s - %3$s', + 'In %n week on %1$s between %2$s - %3$s', 'In %n weeks on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a week on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 week on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a month on %1$s between %2$s - %3$s', + 'In %n month on %1$s between %2$s - %3$s', 'In %n months on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a month on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 month on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a year on %1$s between %2$s - %3$s', + 'In %n year on %1$s between %2$s - %3$s', 'In %n years on %1$s between %2$s - %3$s', 1, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], - 'In a year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' + 'In 1 year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], // plural partial day [ - 'In a minute on %1$s between %2$s - %3$s', + 'In %n minute on %1$s between %2$s - %3$s', 'In %n minutes on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], 'In 2 minutes on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a hour on %1$s between %2$s - %3$s', + 'In %n hour on %1$s between %2$s - %3$s', 'In %n hours on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], 'In 2 hours on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a day on %1$s between %2$s - %3$s', + 'In %n day on %1$s between %2$s - %3$s', 'In %n days on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], 'In 2 days on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a week on %1$s between %2$s - %3$s', + 'In %n week on %1$s between %2$s - %3$s', 'In %n weeks on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], 'In 2 weeks on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a month on %1$s between %2$s - %3$s', + 'In %n month on %1$s between %2$s - %3$s', 'In %n months on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], 'In 2 months on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)' ], [ - 'In a year on %1$s between %2$s - %3$s', + 'In %n year on %1$s between %2$s - %3$s', 'In %n years on %1$s between %2$s - %3$s', 2, ['July 1, 2024', '8:00 AM', '9:00 AM (America/Toronto)'], @@ -607,7 +607,7 @@ function ($v1, $v2, $v3) { $vCalendar = clone $this->vCalendar1a; $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); $this->assertEquals( - 'In a minute on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 minute on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -615,7 +615,7 @@ function ($v1, $v2, $v3) { $vCalendar = clone $this->vCalendar2; $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); $this->assertEquals( - 'In a minute on July 1, 2024 for the entire day', + 'In 1 minute on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -639,7 +639,7 @@ function ($v1, $v2, $v3) { $vCalendar = clone $this->vCalendar1a; $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); $this->assertEquals( - 'In a hour on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 hour on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -647,7 +647,7 @@ function ($v1, $v2, $v3) { $vCalendar = clone $this->vCalendar2; $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); $this->assertEquals( - 'In a hour on July 1, 2024 for the entire day', + 'In 1 hour on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -673,7 +673,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 day on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -683,7 +683,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 for the entire day', + 'In 1 day on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -713,7 +713,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a week on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 week on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -723,7 +723,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a week on July 1, 2024 for the entire day', + 'In 1 week on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -753,7 +753,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a month on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 month on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -763,7 +763,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a month on July 1, 2024 for the entire day', + 'In 1 month on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -793,7 +793,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', + 'In 1 year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)', $this->service->generateWhenString($eventReader) ); @@ -803,7 +803,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a year on July 1, 2024 for the entire day', + 'In 1 year on July 1, 2024 for the entire day', $this->service->generateWhenString($eventReader) ); @@ -1543,43 +1543,43 @@ function ($v1, $v2, $v3) { $this->l10n->method('n')->willReturnMap([ // singular [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 1, ['July 1, 2024'], - 'In a day on July 1, 2024' + 'In 1 day on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 1, ['July 1, 2024', 'July 3, 2024'], - 'In a day on July 1, 2024 then on July 3, 2024' + 'In 1 day on July 1, 2024 then on July 3, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 1, ['July 1, 2024', 'July 3, 2024', 'July 5, 2024'], - 'In a day on July 1, 2024 then on July 3, 2024 and July 5, 2024' + 'In 1 day on July 1, 2024 then on July 3, 2024 and July 5, 2024' ], // plural [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 2, ['July 1, 2024'], 'In 2 days on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 2, ['July 1, 2024', 'July 3, 2024'], 'In 2 days on July 1, 2024 then on July 3, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 2, ['July 1, 2024', 'July 3, 2024', 'July 5, 2024'], @@ -1610,7 +1610,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader) ); @@ -1621,7 +1621,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 3, 2024', + 'In 1 day on July 1, 2024 then on July 3, 2024', $this->service->generateOccurringString($eventReader) ); @@ -1632,7 +1632,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 3, 2024 and July 5, 2024', + 'In 1 day on July 1, 2024 then on July 3, 2024 and July 5, 2024', $this->service->generateOccurringString($eventReader) ); @@ -1685,43 +1685,43 @@ function ($v1, $v2, $v3) { $this->l10n->method('n')->willReturnMap([ // singular [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 1, ['July 1, 2024'], - 'In a day on July 1, 2024' + 'In 1 day on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 1, ['July 1, 2024', 'July 3, 2024'], - 'In a day on July 1, 2024 then on July 3, 2024' + 'In 1 day on July 1, 2024 then on July 3, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 1, ['July 1, 2024', 'July 3, 2024', 'July 5, 2024'], - 'In a day on July 1, 2024 then on July 3, 2024 and July 5, 2024' + 'In 1 day on July 1, 2024 then on July 3, 2024 and July 5, 2024' ], // plural [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 2, ['July 1, 2024'], 'In 2 days on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 2, ['July 1, 2024', 'July 3, 2024'], 'In 2 days on July 1, 2024 then on July 3, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 2, ['July 1, 2024', 'July 3, 2024', 'July 5, 2024'], @@ -1752,7 +1752,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with single occurrence remaining' ); @@ -1764,7 +1764,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 3, 2024', + 'In 1 day on July 1, 2024 then on July 3, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with two occurrences remaining' ); @@ -1776,7 +1776,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 3, 2024 and July 5, 2024', + 'In 1 day on July 1, 2024 then on July 3, 2024 and July 5, 2024', $this->service->generateOccurringString($eventReader), '' ); @@ -1836,43 +1836,43 @@ function ($v1, $v2, $v3) { $this->l10n->method('n')->willReturnMap([ // singular [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 1, ['July 1, 2024'], - 'In a day on July 1, 2024' + 'In 1 day on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 1, ['July 1, 2024', 'July 5, 2024'], - 'In a day on July 1, 2024 then on July 5, 2024' + 'In 1 day on July 1, 2024 then on July 5, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 1, ['July 1, 2024', 'July 5, 2024', 'July 7, 2024'], - 'In a day on July 1, 2024 then on July 5, 2024 and July 7, 2024' + 'In 1 day on July 1, 2024 then on July 5, 2024 and July 7, 2024' ], // plural [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 2, ['July 1, 2024'], 'In 2 days on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 2, ['July 1, 2024', 'July 5, 2024'], 'In 2 days on July 1, 2024 then on July 5, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 2, ['July 1, 2024', 'July 5, 2024', 'July 7, 2024'], @@ -1908,7 +1908,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with single occurrence remaining and one exception' ); @@ -1921,7 +1921,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with two occurrences remaining and one exception' ); @@ -1934,7 +1934,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 5, 2024', + 'In 1 day on July 1, 2024 then on July 5, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with three occurrences remaining and one exception' ); @@ -1947,7 +1947,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 5, 2024 and July 7, 2024', + 'In 1 day on July 1, 2024 then on July 5, 2024 and July 7, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with four occurrences remaining and one exception' ); @@ -2020,43 +2020,43 @@ function ($v1, $v2, $v3) { $this->l10n->method('n')->willReturnMap([ // singular [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 1, ['July 1, 2024'], - 'In a day on July 1, 2024' + 'In 1 day on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 1, ['July 1, 2024', 'July 5, 2024'], - 'In a day on July 1, 2024 then on July 5, 2024' + 'In 1 day on July 1, 2024 then on July 5, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 1, ['July 1, 2024', 'July 5, 2024', 'July 9, 2024'], - 'In a day on July 1, 2024 then on July 5, 2024 and July 9, 2024' + 'In 1 day on July 1, 2024 then on July 5, 2024 and July 9, 2024' ], // plural [ - 'In a day on %1$s', + 'In %n day on %1$s', 'In %n days on %1$s', 2, ['July 1, 2024'], 'In 2 days on July 1, 2024' ], [ - 'In a day on %1$s then on %2$s', + 'In %n day on %1$s then on %2$s', 'In %n days on %1$s then on %2$s', 2, ['July 1, 2024', 'July 5, 2024'], 'In 2 days on July 1, 2024 then on July 5, 2024' ], [ - 'In a day on %1$s then on %2$s and %3$s', + 'In %n day on %1$s then on %2$s and %3$s', 'In %n days on %1$s then on %2$s and %3$s', 2, ['July 1, 2024', 'July 5, 2024', 'July 9, 2024'], @@ -2093,7 +2093,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with single occurrence remaining and two exception' ); @@ -2107,7 +2107,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024', + 'In 1 day on July 1, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with two occurrences remaining and two exception' ); @@ -2121,7 +2121,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 5, 2024', + 'In 1 day on July 1, 2024 then on July 5, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with three occurrences remaining and two exception' ); @@ -2135,7 +2135,7 @@ function ($v1, $v2, $v3) { $eventReader = new EventReader($vCalendar, $vCalendar->VEVENT[0]->UID->getValue()); // test output $this->assertEquals( - 'In a day on July 1, 2024 then on July 5, 2024 and July 9, 2024', + 'In 1 day on July 1, 2024 then on July 5, 2024 and July 9, 2024', $this->service->generateOccurringString($eventReader), 'test patrial day recurring event in 1 day with four occurrences remaining and two exception' );