Skip to content

Commit

Permalink
Merge branch 'MDL-80344' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Jun 26, 2024
2 parents 5c41522 + d5316ae commit 0bccb0b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions calendar/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,8 @@ public function render_subscriptions_header(): string {
*/
public function render_no_calendar_subscriptions(): string {
$output = html_writer::start_div('mt-5');
$importlink = html_writer::link((new moodle_url('/calendar/import.php', calendar_get_export_import_link_params()))->out(),
get_string('importcalendarexternal', 'calendar'));
$output .= get_string('nocalendarsubscriptions', 'calendar', $importlink);
$importlink = (new moodle_url('/calendar/import.php', calendar_get_export_import_link_params()))->out();
$output .= get_string('nocalendarsubscriptionsimportexternal', 'core_calendar', $importlink);
$output .= html_writer::end_div();

return $output;
Expand All @@ -329,7 +328,8 @@ public function subscription_details($unused, $subscriptions, $unused2 = '') {
$table->id = 'subscription_details_table';

if (empty($subscriptions)) {
$cell = new html_table_cell(get_string('nocalendarsubscriptions', 'calendar'));
$importlink = (new moodle_url('/calendar/import.php', calendar_get_export_import_link_params()))->out();
$cell = new html_table_cell(get_string('nocalendarsubscriptionsimportexternal', 'core_calendar', $importlink));
$cell->colspan = 5;
$table->data[] = new html_table_row(array($cell));
}
Expand Down
7 changes: 5 additions & 2 deletions lang/en/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
$string['hideeventtype'] = 'Hide {$a} events';
$string['showeventtype'] = 'Show {$a} events';
$string['hourly'] = 'Hourly';
$string['importcalendarexternal'] = 'Import an external calendar?';
$string['importcalendar'] = 'Import calendar';
$string['importcalendarheading'] = 'Import calendar...';
$string['importcalendarfrom'] = 'Import from';
Expand All @@ -193,9 +192,9 @@
$string['never'] = 'Never';
$string['newevent'] = 'New event';
$string['newmonthannouncement'] = 'Calendar is now set to {$a}.';
$string['nocalendarsubscriptionsimportexternal'] = 'No calendar subscriptions yet. <a href="{$a}">Import an external calendar</a>';
$string['notitle'] = 'no title';
$string['noupcomingevents'] = 'There are no upcoming events';
$string['nocalendarsubscriptions'] = 'No calendar subscriptions yet. Do you want to {$a}';
$string['oneevent'] = '1 event';
$string['pollinterval'] = 'Update interval';
$string['pollinterval_help'] = 'How often you would like the calendar to update with new events.';
Expand Down Expand Up @@ -287,3 +286,7 @@

// Deprecated since Moodle 4.4.
$string['coursecalendar'] = '{$a} calendar';

// Deprecated since Moodle 4.5.
$string['importcalendarexternal'] = 'Import an external calendar?';
$string['nocalendarsubscriptions'] = 'No calendar subscriptions yet. Do you want to {$a}';
2 changes: 2 additions & 0 deletions lang/en/deprecated.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,6 @@ coursesearch_help,core
blocknotexist,core_debug
modulenotexist,core_debug
coursecalendar,core_calendar
importcalendarexternal,core_calendar
nocalendarsubscriptions,core_calendar
datechanged,core

0 comments on commit 0bccb0b

Please sign in to comment.