From dfc47df6e8def7b60dba3eecf7c2c13b0c5adbe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Thu, 1 Feb 2024 19:30:58 +0100 Subject: [PATCH] MDL-80725 lang: Fix Help and documentation regressions --- .../customlang/tests/behat/customisation_create.feature | 4 ++-- lang/en/admin.php | 2 +- lib/pagelib.php | 8 ++++---- theme/boost/templates/footer.mustache | 2 +- theme/classic/templates/footer.mustache | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/tool/customlang/tests/behat/customisation_create.feature b/admin/tool/customlang/tests/behat/customisation_create.feature index 6325a2abc45..c0fcdd4e45d 100644 --- a/admin/tool/customlang/tests/behat/customisation_create.feature +++ b/admin/tool/customlang/tests/behat/customisation_create.feature @@ -22,12 +22,12 @@ Feature: Within a moodle instance, an administrator should be able to modify lan Scenario: Edit an string but don't save it to lang pack. When I press "Apply changes and continue editing" Then I should not see "moodle documents" in the "page-footer" "region" - And I should see "Help and documentation" in the "page-footer" "region" + And I should see "Documentation for this page" in the "page-footer" "region" @javascript Scenario: Customize an string as admin and save it to lang pack. Given I press "Save changes to the language pack" And I should see "There are 1 modified strings." When I click on "Continue" "button" - Then I should not see "Help and documentation" in the "page-footer" "region" + Then I should not see "Documentation for this page" in the "page-footer" "region" And I should see "moodle documents" in the "page-footer" "region" diff --git a/lang/en/admin.php b/lang/en/admin.php index bb79c42fdb4..c483bcfd0bd 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -242,7 +242,7 @@ $string['configdisableuserimages'] = 'Disable the ability for users to change us $string['configdisplayloginfailures'] = 'This will display information to users about previous failed logins.'; $string['configdndallowtextandlinks'] = 'Enable or disable the dragging and dropping of text and links onto a course page, alongside the dragging and dropping of files. Note that the dragging of text into Firefox or between different browsers is unreliable and may result in no data being uploaded, or corrupted text being uploaded.'; $string['configdoclang'] = 'This language will be used in links for the documentation pages.'; -$string['configdocroot'] = 'Defines the path to Moodle Docs for providing context-specific documentation via \'Help and documentation\' links in the footer of each page. If the field is left blank, links will not be displayed.'; +$string['configdocroot'] = 'Defines the path to Moodle Docs for providing context-specific documentation via \'Documentation for this page\' links in the footer of each page. If the field is left blank, links will not be displayed.'; $string['configdoctonewwindow'] = 'If enabled, then links to Moodle Docs will be shown in a new window.'; $string['configduration_low'] = 'This value is too low. The minimum value is {$a}.'; $string['configduration_high'] = 'This value is too high. The maximum value is {$a}.'; diff --git a/lib/pagelib.php b/lib/pagelib.php index 795542d5504..40d39c739b0 100644 --- a/lib/pagelib.php +++ b/lib/pagelib.php @@ -78,7 +78,7 @@ use core\output\activity_header; * course table. (Also available as $COURSE global.) If we are not inside * an actual course, this will be the site course. * @property-read string $devicetypeinuse The name of the device type in use - * @property-read string $docspath The path to the Help and documentation. + * @property-read string $docspath The path to the Documentation for this page. * @property-read string $focuscontrol The id of the HTML element to be focused when the page has loaded. * @property-read bool $headerprinted True if the page header has already been printed. * @property-read string $heading The main heading that should be displayed at the top of the . @@ -214,7 +214,7 @@ class moodle_page { protected $_subpage = ''; /** - * @var string Set a different path to use for the 'Help and documentation' link. + * @var string Set a different path to use for the 'Documentation for this page' link. * By default, it uses the path of the file for instance mod/quiz/attempt. */ protected $_docspath = null; @@ -658,7 +658,7 @@ class moodle_page { /** * Please do not call this method directly, use the ->docspath syntax. {@link moodle_page::__get()}. - * @return string the path to the Help and documentation. + * @return string the path to the Documentation for this page. */ protected function magic_get_docspath() { if (is_string($this->_docspath)) { @@ -1462,7 +1462,7 @@ class moodle_page { } /** - * Set a different path to use for the 'Help and documentation' link. + * Set a different path to use for the 'Documentation for this page' link. * * By default, it uses the pagetype, which is normally the same as the * script name. So, for example, for mod/quiz/attempt.php, pagetype is diff --git a/theme/boost/templates/footer.mustache b/theme/boost/templates/footer.mustache index e5f15bfa9b1..f9f34f9129c 100644 --- a/theme/boost/templates/footer.mustache +++ b/theme/boost/templates/footer.mustache @@ -22,7 +22,7 @@ Example context (json): { "output": { - "page_doc_link": "Help and documentation", + "page_doc_link": "Documentation for this page", "supportemail": "Contact site support", "has_popover_links": true, "services_support": "Services and support", diff --git a/theme/classic/templates/footer.mustache b/theme/classic/templates/footer.mustache index b8ab3d38655..c04c52cfcd2 100644 --- a/theme/classic/templates/footer.mustache +++ b/theme/classic/templates/footer.mustache @@ -23,7 +23,7 @@ { "output": { "course_footer": "More information about this course", - "page_doc_link": "Help and documentation", + "page_doc_link": "Documentation for this page", "login_info": "You are logged in as cute kitten", "supportemail": "Contact site support", "services_support_link": "Services and support"