--- notify.module 2008-12-18 06:00:06.000000000 +0800
+++ notify.module.new 2009-10-22 18:02:50.181124000 +0800
@@ -48,23 +48,23 @@ function notify_admin_settings() {
$form['notify_settings']['notify_send'] = array(
'#type' => 'select',
- '#title' => 'Send notifications every',
+ '#title' => t('Send notifications every'),
'#default_value' => variable_get('notify_send', array(86400)),
'#options' => $period,
- '#description' => 'How often should new content notifications be sent? Requires cron to be running at least this often.',
+ '#description' => t('How often should new content notifications be sent? Requires cron to be running at least this often.'),
);
$form['notify_settings']['notify_send_hour'] = array(
'#type' => 'select',
- '#title' => 'Hour to Send Notifications',
- '#description' => 'Specify the hour (24-hour clock) in which notifications should be sent, if the frequency is one day or greater.',
+ '#title' => t('Hour to Send Notifications'),
+ '#description' => t('Specify the hour (24-hour clock) in which notifications should be sent, if the frequency is one day or greater.'),
'#default_value' => variable_get('notify_send_hour', 9),
'#options' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23),
);
$form['notify_settings']['notify_attempts'] = array(
'#type' => 'select',
- '#title' => 'Number of failed sends after which notifications are disabled',
+ '#title' => t('Number of failed sends after which notifications are disabled'),
'#default_value' => variable_get('notify_attempts', array(5)),
'#options' => array(t('Disabled'), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20),
);
@@ -72,10 +72,10 @@ function notify_admin_settings() {
$set = 'ntype';
$form[$set] = array(
'#type' => 'fieldset',
- '#title' => 'Notification by node type',
+ '#title' => t('Notification by node type'),
'#collapsible' => true,
'#collapsed' => false,
- '#description' => 'Having nothing checked defaults to sending notifications about all node types.'
+ '#description' => t('Having nothing checked defaults to sending notifications about all node types.'),
);
foreach (node_get_types('types', array()) as $type => $object) {
@@ -147,10 +147,10 @@ function _notify_user_reg_fields() {
// Add the checkbox to the fieldset
$fields['notify_agree']['notify_decision'] = array(
'#type' => 'checkbox',
- '#title' => t('Receive email notifications of news posted to this site. Notifications are sent every ' . format_interval($period).'.'),
+ '#title' => t('Receive email notifications of news posted to this site. Notifications are sent every !interval.', array('!interval' => format_interval($period))),
'#return_value' => 1,
'#default_value' => 1,
- '#description' => t('By accepting to receive daily email news notifications, you will be kept informed of news associated with ' . variable_get('site_name', 'Drupal') . '.')
+ '#description' => t('By accepting to receive daily email news notifications, you will be kept informed of news associated with !sitename.', array('!sitename' => variable_get('site_name', 'Drupal'))),
);
return $fields;
@@ -238,9 +238,9 @@ function notify_user_settings_form(&$for
drupal_set_message(t('Your e-mail address must be specified on your my account page.', array('@url' => url('user/'. $account->uid .'/edit'))), 'error');
}
- $form['notify_page_master'] = array('#type' => 'fieldset', '#title' => 'Master switch');
+ $form['notify_page_master'] = array('#type' => 'fieldset', '#title' => t('Status'));
$form['notify_page_master']['status'] = array('#type' => 'radios',
- '#title' => 'Notify status',
+ '#title' => t('Notify status'),
'#default_value' => $notify->status,
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t('Do you wish to receive periodic e-mails when new content is posted?'),
@@ -248,13 +248,13 @@ function notify_user_settings_form(&$for
$form['notify_page_detailed'] = array('#type' => 'fieldset', '#title' => t('Detailed settings'));
$form['notify_page_detailed']['node'] = array('#type' => 'radios',
- '#title' => 'Notify new content',
+ '#title' => t('Notify new content'),
'#default_value' => $notify->node,
'#options' => array(t('Disabled'), t('Enabled')),
'#description' => t('Include new content in the notification mail.'),
);
$form['notify_page_detailed']['teasers'] = array('#type' => 'radios',
- '#title' => 'Content',
+ '#title' => t('Content'),
'#default_value' => $notify->teasers,
'#options' => array(t('Title only'), t('Title + Teaser'), t('Title + Body')),
'#description' => t('Select the amount of each post that you would like to see in your notification e-mails.'),
@@ -473,7 +473,7 @@ function _notify_send() {
// Prepend node e-mail header as long as user could access at least one node.
if ($node_count > 0) {
$node_body = $separator ."\n"
- . t('Recent content - !count', array('!count' => format_plural(count($nodes), '1 new post', count($nodes) .' new posts'))) ."\n"
+ . t('Recent content - !count', array('!count' => format_plural(count($nodes), '1 new post', '@count new posts', array('@count' => count($nodes))))) ."\n"
. $separator ."\n\n". $node_body;
}
}