MDL-81358 calendar: avoid hard-coded English string concatenation.

This commit is contained in:
Paul Holden 2024-04-02 11:01:10 +01:00
parent 4da813d35e
commit a64c272c4b
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
3 changed files with 7 additions and 11 deletions

View File

@ -14,17 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Class for exporting calendar footer view options data.
*
* @package core_calendar
* @copyright 2017 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_calendar\external;
defined('MOODLE_INTERNAL') || die();
use core\external\exporter;
use renderer_base;
use stdClass;
@ -33,6 +24,7 @@ use moodle_url;
/**
* Class for exporting calendar footer view options data.
*
* @package core_calendar
* @copyright 2017 Simey Lameze
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@ -102,7 +94,7 @@ class footer_options_exporter extends exporter {
if ($this->showfullcalendarlink) {
if ($this->calendar->courseid !== SITEID) {
$linkname = get_string('coursecalendar', 'calendar', 'Course');
$linkname = get_string('coursecalendarlink', 'calendar');
} else {
$linkname = get_string('fullcalendar', 'calendar');
}

View File

@ -48,10 +48,10 @@ $string['confirmsubscriptiondelete'] = 'Are you sure you want to delete the "{$a
$string['copycalendarurl'] = 'Copy calendar URL';
$string['copyurl'] = 'Copy URL';
$string['course'] = 'Course';
$string['coursecalendarlink'] = 'Course calendar';
$string['courseevent'] = 'Course event';
$string['courseevents'] = 'Course events';
$string['categoryevents'] = 'Category events';
$string['coursecalendar'] = '{$a} calendar';
$string['courses'] = 'Courses';
$string['customexport'] = 'Custom range ({$a->timestart} - {$a->timeend})';
$string['daily'] = 'Daily';
@ -284,3 +284,6 @@ $string['whendate'] = 'When: {$a}';
$string['yesterday'] = 'Yesterday';
$string['youcandeleteallrepeats'] = 'This event is part of a repeating event series. You can delete this event only, or all {$a} events in the series at once.';
$string['yoursubscriptions'] = 'Imported calendars';
// Deprecated since Moodle 4.4.
$string['coursecalendar'] = '{$a} calendar';

View File

@ -125,3 +125,4 @@ from,core
aria-toggledropdown,core_grades
aria:dropdowngrades,core_grades
viewresults,core
coursecalendar,core_calendar