--- ../../../../../../tmp/kde-brenda/cervisia6Nzjza-nudge.module-HEAD 2008-03-16 21:13:46.000000000 +1300 +++ nudge.module 2008-03-16 21:13:21.000000000 +1300 @@ -11,6 +11,7 @@ define('NUDGE_EMAIL', 'nudge_email'); define('NUDGE_EMAIL_TEXT', 'nudge_email_text'); define('NUDGE_EMAIL_TEXT_DEFAULT', "Hello!\nA user on @site, @user, has nudged you about your post, @title.\nMessage: @message"); +define('NUDGE_ACTION_NAME', "nudge_action_name"); function nudge_perm() { return array(NUDGE_PERM_SEND, NUDGE_PERM_VIEW, NUDGE_PERM_ADMIN); @@ -50,6 +51,13 @@ } function nudge_admin_settings() { + $form[NUDGE_ACTION_NAME] = array( + '#type' => 'textfield', + '#title' => t('Name for the action "nudge"'), + '#description' => t('What word to use for nudge links'), + '#required' => true, + '#default_value' => variable_get(NUDGE_ACTION_NAME, 'Nudge'), + ); $set = 'types'; $form[$set] = array( '#type' => 'fieldset', @@ -94,7 +102,7 @@ '#type' => 'textarea', '#title' => t('Email text to send'), '#default_value' => variable_get(NUDGE_EMAIL_TEXT, NUDGE_EMAIL_TEXT_DEFAULT), - '#description' => t('Text of the email to send to the user. The values !site, !user, !title and !message are substituted with the site name, user name, node title and custom message respectively.'), + '#description' => t('Text of the email to send to the user. The values !site, !user, !title, !url and !message are substituted with the site name, user name, node title, node url and custom message respectively.'), ); return system_settings_form($form); @@ -141,7 +149,7 @@ } else { $links['nudge_link'] = array( - 'title' => t('Nudge the author'), + 'title' => t('!action the author', array('!action' => variable_get(NUDGE_ACTION_NAME, 'Nudge'))), 'href' => "nudge/do/$node->nid" ); } @@ -193,10 +201,10 @@ return confirm_form( $form, - t('Are you sure you want to nudge %name?', array('%name' => $nudgee->name)), + t('Are you sure you want to !action %name?', array('!action' => variable_get(NUDGE_ACTION_NAME, 'Nudge'), '%name' => $nudgee->name)), 'node/'. $nid, ' ', - t('Nudge'), + t('!action', array('!action' => variable_get(NUDGE_ACTION_NAME, 'Nudge'))), t('Cancel')); }