Skip to content

Commit c81d40e

Browse files
Merge pull request #56486 from nextcloud/rakekniven-patch-3
fix(i18n): Corrected plural for multi plural languages
2 parents dc97bc0 + 6fd9115 commit c81d40e

File tree

2 files changed

+137
-137
lines changed

2 files changed

+137
-137
lines changed

apps/dav/lib/CalDAV/Schedule/IMipService.php

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ public function generateWhenStringSingular(EventReader $er): string {
234234
// TRANSLATORS
235235
// Indicates when a calendar event will happen, shown on invitation emails
236236
// Output produced in order:
237-
// In a minute/hour/day/week/month/year on July 1, 2024 for the entire day
238-
// In a minute/hour/day/week/month/year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)
237+
// In 1 minute/hour/day/week/month/year on July 1, 2024 for the entire day
238+
// In 1 minute/hour/day/week/month/year on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)
239239
// In 2 minutes/hours/days/weeks/months/years on July 1, 2024 for the entire day
240240
// In 2 minutes/hours/days/weeks/months/years on July 1, 2024 between 8:00 AM - 9:00 AM (America/Toronto)
241241
return match ([$occurring['scale'], $endTime !== null]) {
@@ -244,37 +244,37 @@ public function generateWhenStringSingular(EventReader $er): string {
244244
[$startDate]
245245
),
246246
['minute', false] => $this->l10n->n(
247-
'In a minute on %1$s for the entire day',
247+
'In %n minute on %1$s for the entire day',
248248
'In %n minutes on %1$s for the entire day',
249249
$occurring['interval'],
250250
[$startDate]
251251
),
252252
['hour', false] => $this->l10n->n(
253-
'In a hour on %1$s for the entire day',
253+
'In %n hour on %1$s for the entire day',
254254
'In %n hours on %1$s for the entire day',
255255
$occurring['interval'],
256256
[$startDate]
257257
),
258258
['day', false] => $this->l10n->n(
259-
'In a day on %1$s for the entire day',
259+
'In %n day on %1$s for the entire day',
260260
'In %n days on %1$s for the entire day',
261261
$occurring['interval'],
262262
[$startDate]
263263
),
264264
['week', false] => $this->l10n->n(
265-
'In a week on %1$s for the entire day',
265+
'In %n week on %1$s for the entire day',
266266
'In %n weeks on %1$s for the entire day',
267267
$occurring['interval'],
268268
[$startDate]
269269
),
270270
['month', false] => $this->l10n->n(
271-
'In a month on %1$s for the entire day',
271+
'In %n month on %1$s for the entire day',
272272
'In %n months on %1$s for the entire day',
273273
$occurring['interval'],
274274
[$startDate]
275275
),
276276
['year', false] => $this->l10n->n(
277-
'In a year on %1$s for the entire day',
277+
'In %n year on %1$s for the entire day',
278278
'In %n years on %1$s for the entire day',
279279
$occurring['interval'],
280280
[$startDate]
@@ -284,37 +284,37 @@ public function generateWhenStringSingular(EventReader $er): string {
284284
[$startDate, $startTime, $endTime]
285285
),
286286
['minute', true] => $this->l10n->n(
287-
'In a minute on %1$s between %2$s - %3$s',
287+
'In %n minute on %1$s between %2$s - %3$s',
288288
'In %n minutes on %1$s between %2$s - %3$s',
289289
$occurring['interval'],
290290
[$startDate, $startTime, $endTime]
291291
),
292292
['hour', true] => $this->l10n->n(
293-
'In a hour on %1$s between %2$s - %3$s',
293+
'In %n hour on %1$s between %2$s - %3$s',
294294
'In %n hours on %1$s between %2$s - %3$s',
295295
$occurring['interval'],
296296
[$startDate, $startTime, $endTime]
297297
),
298298
['day', true] => $this->l10n->n(
299-
'In a day on %1$s between %2$s - %3$s',
299+
'In %n day on %1$s between %2$s - %3$s',
300300
'In %n days on %1$s between %2$s - %3$s',
301301
$occurring['interval'],
302302
[$startDate, $startTime, $endTime]
303303
),
304304
['week', true] => $this->l10n->n(
305-
'In a week on %1$s between %2$s - %3$s',
305+
'In %n week on %1$s between %2$s - %3$s',
306306
'In %n weeks on %1$s between %2$s - %3$s',
307307
$occurring['interval'],
308308
[$startDate, $startTime, $endTime]
309309
),
310310
['month', true] => $this->l10n->n(
311-
'In a month on %1$s between %2$s - %3$s',
311+
'In %n month on %1$s between %2$s - %3$s',
312312
'In %n months on %1$s between %2$s - %3$s',
313313
$occurring['interval'],
314314
[$startDate, $startTime, $endTime]
315315
),
316316
['year', true] => $this->l10n->n(
317-
'In a year on %1$s between %2$s - %3$s',
317+
'In %n year on %1$s between %2$s - %3$s',
318318
'In %n years on %1$s between %2$s - %3$s',
319319
$occurring['interval'],
320320
[$startDate, $startTime, $endTime]
@@ -652,9 +652,9 @@ public function generateOccurringString(EventReader $er): string {
652652
// TRANSLATORS
653653
// Indicates when a calendar event will happen, shown on invitation emails
654654
// Output produced in order:
655-
// In a minute/hour/day/week/month/year on July 1, 2024
656-
// In a minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024
657-
// In a minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 and July 5, 2024
655+
// In 1 minute/hour/day/week/month/year on July 1, 2024
656+
// In 1 minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024
657+
// In 1 minute/hour/day/week/month/year on July 1, 2024 then on July 3, 2024 and July 5, 2024
658658
// In 2 minutes/hours/days/weeks/months/years on July 1, 2024
659659
// In 2 minutes/hours/days/weeks/months/years on July 1, 2024 then on July 3, 2024
660660
// 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 {
664664
[$occurrence]
665665
),
666666
['minute', false, false] => $this->l10n->n(
667-
'In a minute on %1$s',
667+
'In %n minute on %1$s',
668668
'In %n minutes on %1$s',
669669
$occurrenceIn['interval'],
670670
[$occurrence]
671671
),
672672
['hour', false, false] => $this->l10n->n(
673-
'In a hour on %1$s',
673+
'In %n hour on %1$s',
674674
'In %n hours on %1$s',
675675
$occurrenceIn['interval'],
676676
[$occurrence]
677677
),
678678
['day', false, false] => $this->l10n->n(
679-
'In a day on %1$s',
679+
'In %n day on %1$s',
680680
'In %n days on %1$s',
681681
$occurrenceIn['interval'],
682682
[$occurrence]
683683
),
684684
['week', false, false] => $this->l10n->n(
685-
'In a week on %1$s',
685+
'In %n week on %1$s',
686686
'In %n weeks on %1$s',
687687
$occurrenceIn['interval'],
688688
[$occurrence]
689689
),
690690
['month', false, false] => $this->l10n->n(
691-
'In a month on %1$s',
691+
'In %n month on %1$s',
692692
'In %n months on %1$s',
693693
$occurrenceIn['interval'],
694694
[$occurrence]
695695
),
696696
['year', false, false] => $this->l10n->n(
697-
'In a year on %1$s',
697+
'In %n year on %1$s',
698698
'In %n years on %1$s',
699699
$occurrenceIn['interval'],
700700
[$occurrence]
@@ -704,37 +704,37 @@ public function generateOccurringString(EventReader $er): string {
704704
[$occurrence, $occurrence2]
705705
),
706706
['minute', true, false] => $this->l10n->n(
707-
'In a minute on %1$s then on %2$s',
707+
'In %n minute on %1$s then on %2$s',
708708
'In %n minutes on %1$s then on %2$s',
709709
$occurrenceIn['interval'],
710710
[$occurrence, $occurrence2]
711711
),
712712
['hour', true, false] => $this->l10n->n(
713-
'In a hour on %1$s then on %2$s',
713+
'In %n hour on %1$s then on %2$s',
714714
'In %n hours on %1$s then on %2$s',
715715
$occurrenceIn['interval'],
716716
[$occurrence, $occurrence2]
717717
),
718718
['day', true, false] => $this->l10n->n(
719-
'In a day on %1$s then on %2$s',
719+
'In %n day on %1$s then on %2$s',
720720
'In %n days on %1$s then on %2$s',
721721
$occurrenceIn['interval'],
722722
[$occurrence, $occurrence2]
723723
),
724724
['week', true, false] => $this->l10n->n(
725-
'In a week on %1$s then on %2$s',
725+
'In %n week on %1$s then on %2$s',
726726
'In %n weeks on %1$s then on %2$s',
727727
$occurrenceIn['interval'],
728728
[$occurrence, $occurrence2]
729729
),
730730
['month', true, false] => $this->l10n->n(
731-
'In a month on %1$s then on %2$s',
731+
'In %n month on %1$s then on %2$s',
732732
'In %n months on %1$s then on %2$s',
733733
$occurrenceIn['interval'],
734734
[$occurrence, $occurrence2]
735735
),
736736
['year', true, false] => $this->l10n->n(
737-
'In a year on %1$s then on %2$s',
737+
'In %n year on %1$s then on %2$s',
738738
'In %n years on %1$s then on %2$s',
739739
$occurrenceIn['interval'],
740740
[$occurrence, $occurrence2]
@@ -744,37 +744,37 @@ public function generateOccurringString(EventReader $er): string {
744744
[$occurrence, $occurrence2, $occurrence3]
745745
),
746746
['minute', true, true] => $this->l10n->n(
747-
'In a minute on %1$s then on %2$s and %3$s',
747+
'In %n minute on %1$s then on %2$s and %3$s',
748748
'In %n minutes on %1$s then on %2$s and %3$s',
749749
$occurrenceIn['interval'],
750750
[$occurrence, $occurrence2, $occurrence3]
751751
),
752752
['hour', true, true] => $this->l10n->n(
753-
'In a hour on %1$s then on %2$s and %3$s',
753+
'In %n hour on %1$s then on %2$s and %3$s',
754754
'In %n hours on %1$s then on %2$s and %3$s',
755755
$occurrenceIn['interval'],
756756
[$occurrence, $occurrence2, $occurrence3]
757757
),
758758
['day', true, true] => $this->l10n->n(
759-
'In a day on %1$s then on %2$s and %3$s',
759+
'In %n day on %1$s then on %2$s and %3$s',
760760
'In %n days on %1$s then on %2$s and %3$s',
761761
$occurrenceIn['interval'],
762762
[$occurrence, $occurrence2, $occurrence3]
763763
),
764764
['week', true, true] => $this->l10n->n(
765-
'In a week on %1$s then on %2$s and %3$s',
765+
'In %n week on %1$s then on %2$s and %3$s',
766766
'In %n weeks on %1$s then on %2$s and %3$s',
767767
$occurrenceIn['interval'],
768768
[$occurrence, $occurrence2, $occurrence3]
769769
),
770770
['month', true, true] => $this->l10n->n(
771-
'In a month on %1$s then on %2$s and %3$s',
771+
'In %n month on %1$s then on %2$s and %3$s',
772772
'In %n months on %1$s then on %2$s and %3$s',
773773
$occurrenceIn['interval'],
774774
[$occurrence, $occurrence2, $occurrence3]
775775
),
776776
['year', true, true] => $this->l10n->n(
777-
'In a year on %1$s then on %2$s and %3$s',
777+
'In %n year on %1$s then on %2$s and %3$s',
778778
'In %n years on %1$s then on %2$s and %3$s',
779779
$occurrenceIn['interval'],
780780
[$occurrence, $occurrence2, $occurrence3]

0 commit comments

Comments
 (0)