From 81938a3cdc7b9bd13d58e355c59d9835e830fea4 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Fri, 18 Aug 2006 12:17:00 +0000 Subject: #76802: Introduce placeholder magic into t() See: http://drupal.org/node/64279#t-placeholders --- modules/throttle/throttle.module | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'modules/throttle') diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module index 8526e2ad0..641ee0490 100644 --- a/modules/throttle/throttle.module +++ b/modules/throttle/throttle.module @@ -81,7 +81,7 @@ function throttle_exit() { variable_set('throttle_level', 1); $message = format_plural($users, '1 user accessing site; throttle enabled.', - '%count users accessing site; throttle enabled.'); + '@count users accessing site; throttle enabled.'); } } elseif ($max_guests && $guests > $max_guests) { @@ -89,15 +89,15 @@ function throttle_exit() { variable_set('throttle_level', 1); $message = format_plural($guests, '1 guest accessing site; throttle enabled.', - '%count guests accessing site; throttle enabled.'); + '@count guests accessing site; throttle enabled.'); } } else { if ($throttle) { variable_set('throttle_level', 0); // Note: unorthodox format_plural() usage due to Gettext plural limitations. - $message = format_plural($users, '1 user', '%count users') .', '; - $message .= format_plural($guests, '1 guest accessing site; throttle disabled', '%count guests accessing site; throttle disabled'); + $message = format_plural($users, '1 user', '@count users') .', '; + $message .= format_plural($guests, '1 guest accessing site; throttle disabled', '@count guests accessing site; throttle disabled'); } } if ($message) { @@ -110,7 +110,7 @@ function throttle_exit() { function _throttle_validate($value, $form) { if ($value != NULL) { if (!is_numeric($value) || $value < 0) { - form_set_error($form, t("'%value' is not a valid auto-throttle setting. Please enter a positive numeric value.", array('%value' => theme('placeholder', $value)))); + form_set_error($form, t("%value is not a valid auto-throttle setting. Please enter a positive numeric value.", array('%value' => $value))); } } } @@ -125,12 +125,12 @@ function throttle_help($section) { $output .= '

'. t('The congestion control throttle can be automatically enabled when the number of anonymous or authenticated users currently visiting the site exceeds the specified threshold. ') .'

'; $output .= t('

You can

-', array('%admin-modules' => url('admin/settings/modules'), '%admin-block' => url('admin/build/block'), '%admin-settings-throttle' => url('admin/settings/throttle'))); - $output .= '

'. t('For more information please read the configuration and customization handbook Throttle page.', array('%throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'

'; +', array('@admin-modules' => url('admin/settings/modules'), '@admin-block' => url('admin/build/block'), '@admin-settings-throttle' => url('admin/settings/throttle'))); + $output .= '

'. t('For more information please read the configuration and customization handbook Throttle page.', array('@throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'

'; return $output; case 'admin/settings/modules#description': return t('Handles the auto-throttling mechanism, to control site congestion.'); -- cgit v1.2.3