Skip to content

Commit

Permalink
Merge pull request #275 from Liturgical-Calendar:JohnRDOrazio/issue271
Browse files Browse the repository at this point in the history
when the celebration cannot be moved, remove it if it exists
  • Loading branch information
JohnRDOrazio authored Dec 6, 2024
2 parents f93fddb + 1f0c94c commit 0603c98
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions src/Paths/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -3687,21 +3687,24 @@ private function handleNationalCalendarRows(array $rows): void
}
}
} else {
$this->Messages[] = sprintf(
/**translators:
* 1. ID of the liturgical event
* 2. New date of the liturgical event
* 3. Year from which the date has been changed
* 4. ID of the national calendar
* 5. Requested calendar year
*/
_('The liturgical event \'%1$s\' has been moved to %2$s since the year %3$d in the national calendar \'%4$s\', but this could not take place in the year %5$d since the new date %2$s seems to be a Sunday or a festivity of greater rank.'),
$row->festivity->event_key,
$this->dayAndMonth->format($festivityNewDate->format('U')),
$row->metadata->since_year,
$this->CalendarParams->NationalCalendar,
$this->CalendarParams->Year
);
if (null !== $festivity) {
$this->Messages[] = sprintf(
/**translators:
* 1. ID of the liturgical event
* 2. New date of the liturgical event
* 3. Year from which the date has been changed
* 4. ID of the national calendar
* 5. Requested calendar year
*/
_('The liturgical event \'%1$s\' has been moved to %2$s since the year %3$d in the national calendar \'%4$s\', but this could not take place in the year %5$d since the new date %2$s seems to be a Sunday or a festivity of greater rank.'),
$row->festivity->event_key,
$this->dayAndMonth->format($festivityNewDate->format('U')),
$row->metadata->since_year,
$this->CalendarParams->NationalCalendar,
$this->CalendarParams->Year
);
$this->Cal->removeFestivity($row->festivity->event_key);
}
}
break;
}
Expand Down

0 comments on commit 0603c98

Please sign in to comment.