Implement hook_help()

Created on 21 February 2023, over 1 year ago
Updated 24 February 2023, over 1 year ago

Problem/Motivation

When you enable the module, the method hook_help is not implemented.

Steps to reproduce

Download and activate the module and visit it's help page.

Proposed resolution

Implement the hook_help and describe the functionality of the module and it's usage.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India Charchil Khandelwal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Charchil Khandelwal
  • @charchil-khandelwal opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +    switch ($route_name) {
    +        case 'help.page.big_pipe_override':
    +        $output = '<h3>' . t('About Big pipe override') . '</h3>';
    +        $output .= '<p>' . t("This module is meant for development purposes.") . '</p>';
    +        // Add a link to the Drupal.org project.
    +        $output .= '<p>';
    +        $output .= t('Visit the <a href=":project_link">Big pipe override project page</a> on Drupal.org for more information.',
    +          [
    +            ':project_link' => 'https://www.drupal.org/project/big_pipe_override',
    +          ]
    +        );
    +        $output .= '</p>';
    +        return $output;
    +    }
    +}
    

    This module is meant for development purposes. is not sufficient as help. The link to the project link is useless, once the module has been installed. It would be better to give more information, preferably information that users have not already read from the project page.

  • First commit to issue fork.
  • @adminazhar opened merge request.
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    +        $output = '<h3>' . t('About Big Pipe Override') . '</h3>';
    

    I would just use About. For the rest, it gives the essential information that help at least to use the module. People who wonder why the module does not seem to work will notice from the help they need to add a line to a file.

    + $output .= '<p><code>' . t('$settings["big_pipe_override_enabled"] = TRUE;') . '

    ';

    Code cannot be translated. I would rather use a placeholder for the code and use that placeholder in a translatable sentence. This also avoids that translators would accidentally translate TRUE with VERO, for example (which is the Italian for true).

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India adminazhar

    @apaderno updated, as per your suggestion

  • Status changed to RTBC over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
Production build 0.71.5 2024