diff --git a/core/modules/help_topics/help_topics.module b/core/modules/help_topics/help_topics.module index 8771631..b44d61f 100644 --- a/core/modules/help_topics/help_topics.module +++ b/core/modules/help_topics/help_topics.module @@ -12,25 +12,27 @@ * Implements hook_help(). */ function help_topics_help($route_name, RouteMatchInterface $route_match) { + $help_home = Url::fromRoute('help.main')->toString(); switch ($route_name) { case 'help.page.help_topics': + $locale_help = (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#'; $output = ''; $output .= '

' . t('About') . '

'; $output .= '

' . t('The Help Topics module adds module- and theme-provided help topics to the module overviews from the core Help module. For more information, see the online documentation for the Help Topics module.', [':online' => 'https://www.drupal.org/modules/help_topics']) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Viewing help topics') . '
'; - $output .= '
' . t('The top-level help topics are listed on the main Help page. Links to other topics, including non-top-level help topics, can be found under the "Related" heading when viewing a topic page.', [':help_page' => Url::fromRoute('help.main')->toString()]) . '
'; + $output .= '
' . t('The top-level help topics are listed on the main Help page. Links to other topics, including non-top-level help topics, can be found under the "Related" heading when viewing a topic page.', [':help_page' => $help_home]) . '
'; $output .= '
' . t('Providing help topics') . '
'; $output .= '
' . t("Modules and themes can provide help topics as Twig-file-based plugins in a project sub-directory called help_topics; plugin meta-data is provided in meta tags within each Twig file. Plugin-based help topics provided by modules and themes will automatically be updated when a module or theme is updated. Use the plugins in core/modules/help_topics/help_topics as a guide when writing and formatting a help topic plugin for your theme or module.") . '
'; $output .= '
' . t('Translating help topics') . '
'; - $output .= '
' . t('The title and body text of help topics provided by contributed modules and themes are translatable using the Interface Translation module. Topics provided by custom modules and themes are also translatable if they have been viewed at least once in a non-English language, which triggers putting their translatable text into the translation database.', [':locale_help' => (\Drupal::moduleHandler()->moduleExists('locale')) ? Url::fromRoute('help.page', ['name' => 'locale'])->toString() : '#']) . '
'; + $output .= '
' . t('The title and body text of help topics provided by contributed modules and themes are translatable using the Interface Translation module. Topics provided by custom modules and themes are also translatable if they have been viewed at least once in a non-English language, which triggers putting their translatable text into the translation database.', [':locale_help' => $locale_help]) . '
'; $output .= '
'; return ['#markup' => $output]; case 'help_topics.help_topic': return '

' . t('See the Help page for more topics.', [ - ':help_page' => Url::fromRoute('help.main')->toString(), + ':help_page' => $help_home, ]) . '

'; } }