diff --git a/calendar/renderer.php b/calendar/renderer.php index 3693953d85b..2c356347dc6 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -300,9 +300,8 @@ class core_calendar_renderer extends plugin_renderer_base { */ 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; @@ -329,7 +328,8 @@ class core_calendar_renderer extends plugin_renderer_base { $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)); } diff --git a/lang/en/calendar.php b/lang/en/calendar.php index f922d5d46d9..694efe548bf 100644 --- a/lang/en/calendar.php +++ b/lang/en/calendar.php @@ -168,7 +168,6 @@ $string['eventtypeuser'] = 'user'; $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'; @@ -193,9 +192,9 @@ $string['namewithsource'] = '{$a->name} ({$a->source})'; $string['never'] = 'Never'; $string['newevent'] = 'New event'; $string['newmonthannouncement'] = 'Calendar is now set to {$a}.'; +$string['nocalendarsubscriptionsimportexternal'] = 'No calendar subscriptions yet. Import an external calendar'; $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.'; @@ -287,3 +286,7 @@ $string['yoursubscriptions'] = 'Imported calendars'; // 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}'; diff --git a/lang/en/deprecated.txt b/lang/en/deprecated.txt index 31c9828e288..b934616128d 100644 --- a/lang/en/deprecated.txt +++ b/lang/en/deprecated.txt @@ -113,4 +113,6 @@ coursesearch_help,core blocknotexist,core_debug modulenotexist,core_debug coursecalendar,core_calendar +importcalendarexternal,core_calendar +nocalendarsubscriptions,core_calendar datechanged,core