MDL-60449 lang: Properly replace the generic string with a specific one

The general string 'Publish' has been used in sense of publishing a
course on a hub - as such, it is better to keep that string together
with other related strings in the core_hub component. All these are
being reworded to 'Share'.

As this has been the only meaning of the string in the core, I am
deprecating it now. Third party plugins should better come with their
own variant of the string, should they need it.
This commit is contained in:
David Mudrák 2017-10-19 17:35:06 +02:00
parent 89db57ca6d
commit 2e86fdb0a2
5 changed files with 8 additions and 3 deletions

View File

@ -36,7 +36,7 @@ $shortname = format_string($COURSE->shortname);
$PAGE->set_url('/course/publish/index.php', array('id' => $courseid));
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('publish') . ': ' . $COURSE->fullname);
$PAGE->set_title(get_string('publish', 'core_hub') . ': ' . $COURSE->fullname);
$PAGE->set_heading($COURSE->fullname);
require_capability('moodle/course:publish', context_course::instance($courseid));

View File

@ -116,6 +116,7 @@ prioritise,core_hub
private,core_hub
privatehuburl,core_hub
publichub,core_hub
publish,core
publishon,core_hub
publishonspecifichub,core_hub
registeredmoodleorg,core_hub

View File

@ -117,6 +117,7 @@ $string['previousregistrationdeleted'] = 'The previous registration has been del
$string['privacy'] = 'Privacy';
$string['privacy_help'] = 'The hub may want to display a list of registered sites. If it does then you can choose whether or not you want to appear on that list.';
$string['publicationinfo'] = 'Course publication information';
$string['publish'] = 'Share';
$string['publishcourse'] = 'Share {$a}';
$string['publishcourseon'] = 'Share on {$a}';
$string['publishedon'] = 'Publications';

View File

@ -1548,7 +1548,6 @@ $string['publicprofile'] = 'Public profile';
$string['publicsitefileswarning'] = 'Note: files placed here can be accessed by anyone';
$string['publicsitefileswarning2'] = 'Note: Files placed here can be accessed by anyone who knows (or can guess) the URL. For security reasons, it is recommended that any backup files are deleted immediately after restoring them.';
$string['publicsitefileswarning3'] = 'Note: Files placed here can be accessed by anyone who knows (or can guess) the URL. <br />For security reasons, backup files should be saved in the secure backupdata folder only.';
$string['publish'] = 'Publish';
$string['question'] = 'Question';
$string['questionsinthequestionbank'] = 'Questions in the question bank';
$string['quotausage'] = 'You have currently used {$a->used} of your {$a->total} limit.';
@ -2158,3 +2157,6 @@ $string['modchooserdisable'] = 'Activity chooser off';
// Deprecated since Moodle 3.3.
$string['deletecomment'] = 'Delete this comment';
$string['sectionusedefaultname'] = 'Use default section name';
// Deprecated since Moodle 3.4.
$string['publish'] = 'Publish';

View File

@ -4381,7 +4381,8 @@ class settings_navigation extends navigation_node {
// Publish course on a hub
if ($adminoptions->publish) {
$url = new moodle_url('/course/publish/index.php', array('id'=>$course->id));
$coursenode->add(get_string('publish'), $url, self::TYPE_SETTING, null, 'publish', new pix_icon('i/publish', ''));
$coursenode->add(get_string('publish', 'core_hub'), $url, self::TYPE_SETTING, null, 'publish',
new pix_icon('i/publish', ''));
}
// Reset this course