Posted by fago on October 3, 2008 at 10:32am
Attention developers, I've just committed a small API change to rules. Now you should use t() for help provided directly in your hook_rules_*_info implementation.
Example: The previous code
<?php
function node_rules_condition_info() {
$items = array();
$items['rules_condition_content_is_type'] = array(
'label' => t('Content has type'),
'arguments' => array(
'node' => array('type' => 'node', 'label' => t('Content')),
),
'module' => 'Node',
'help' => 'Evaluates to TRUE, if the given content has one of the selected content types.',
);
return $items;
}
?>should be changed to:
<?php
function node_rules_condition_info() {
$items = array();
$items['rules_condition_content_is_type'] = array(
'label' => t('Content has type'),
'arguments' => array(
'node' => array('type' => 'node', 'label' => t('Content')),
),
'module' => 'Node',
'help' => t('Evaluates to TRUE, if the given content has one of the selected content types.'),
);
return $items;
}
?>For more about providing help have a look at http://drupal.org/node/298545.
The change has been implemented to ease translation of the help strings - so these help strings get properly extracted into the translation template.
This change is not part of beta3, but will be of all further releases.
