Adding hook_variable_info() to pm_email_notify will make variables translatable, key to many of us.

Patch attached.

Comments

Status: Needs review » Needs work

The last submitted patch, privatemsg.pm_email_notify_add_hook_variable_info.patch, failed testing.

Status: Needs work » Needs review
berdir’s picture

Status: Needs review » Needs work
  1. +++ b/pm_email_notify/pm_email_notify.module
    @@ -186,3 +187,61 @@ function pm_email_notify_form_privatemsg_admin_settings_alter(&$form, &$form_sta
    + * Implements hook_variable_info(), provided by variable module
    + * This is required for variables to be translatable.
    + * @param $options
    + * @return array
    

    Remove the @param and @return from both and add an empty line between the additional description. And a . at the end of the first sentence.

  2. +++ b/pm_email_notify/pm_email_notify.module
    @@ -186,3 +187,61 @@ function pm_email_notify_form_privatemsg_admin_settings_alter(&$form, &$form_sta
    + * Implements hook_variable_group_info()
    + * (which is via variable module)
    

    The module part is different from above, should be the same. Also not sure it's really needed but if we add it, then i prefer the format of the first function.

rfay’s picture

Status: Needs work » Needs review
StatusFileSize
new2.46 KB

Here is the patch with suggestions from @Berdir in #3

ivnish’s picture

Category: Task » Feature request
ivnish’s picture

Component: Code (pm_email_notify) » Code
Status: Needs review » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.