MDL-80611 general: do not translate url in help links

This commit is contained in:
Marina Glancy
2025-06-16 18:08:04 +01:00
committed by Marina Glancy
parent c42efe971f
commit 7e8210d8fd
2 changed files with 6 additions and 2 deletions
@@ -51,7 +51,9 @@ class content_item_readonly_repository implements content_item_readonly_reposito
if ($sm->string_exists('modulename_help', $modname)) {
$help = get_string('modulename_help', $modname);
if ($sm->string_exists('modulename_link', $modname)) { // Link to further info in Moodle docs.
$link = get_string('modulename_link', $modname);
// The link is stored in a language file but should not be translated, use value for English.
$link = $sm->get_string('modulename_link', $modname, null, 'en');
// The text 'More help' and other strings should be in the current language.
$linktext = get_string('morehelp');
$arialabel = get_string('morehelpaboutmodule', '', get_string('modulename', $modname));
$doclink = $OUTPUT->doc_link($link, $linktext, true, ['aria-label' => $arialabel]);
+3 -1
View File
@@ -2676,7 +2676,9 @@ function get_formatted_help_string($identifier, $component, $ajax = false, $a =
$helplink = $identifier . '_link';
if ($sm->string_exists($helplink, $component)) { // Link to further info in Moodle docs.
$link = get_string($helplink, $component);
// The link is stored in a language file but should not be translated, use value for English.
$link = $sm->get_string($helplink, $component, null, 'en');
// The text 'More help' should be in the current language.
$linktext = get_string('morehelp');
$data->doclink = new stdClass();