summaryrefslogtreecommitdiff
path: root/modules/throttle/throttle.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-08-18 12:17:00 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-08-18 12:17:00 +0000
commit81938a3cdc7b9bd13d58e355c59d9835e830fea4 (patch)
tree4d6156a6edb7898d74d5b1836b80d08750aa39c2 /modules/throttle/throttle.module
parent885a29c4cd13776165c40080a00180cddd420a46 (diff)
downloadbrdo-81938a3cdc7b9bd13d58e355c59d9835e830fea4.tar.gz
brdo-81938a3cdc7b9bd13d58e355c59d9835e830fea4.tar.bz2
#76802: Introduce placeholder magic into t()
See: http://drupal.org/node/64279#t-placeholders
Diffstat (limited to 'modules/throttle/throttle.module')
-rw-r--r--modules/throttle/throttle.module20
1 files changed, 10 insertions, 10 deletions
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 .= '<p>'. 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. ') .'</p>';
$output .= t('<p>You can</p>
<ul>
-<li>enable throttle for modules at <a href="%admin-modules">administer &gt;&gt; site configuration &gt;&gt; modules</a>.</li>
-<li>enable throttle for blocks at <a href="%admin-block">administer &gt;&gt; site building &gt;&gt; blocks</a>.</li>
-<li>administer throttle at <a href="%admin-settings-throttle">administer &gt;&gt; site configuration &gt;&gt; throttle</a>.</li>
+<li>enable throttle for modules at <a href="@admin-modules">administer &gt;&gt; site configuration &gt;&gt; modules</a>.</li>
+<li>enable throttle for blocks at <a href="@admin-block">administer &gt;&gt; site building &gt;&gt; blocks</a>.</li>
+<li>administer throttle at <a href="@admin-settings-throttle">administer &gt;&gt; site configuration &gt;&gt; throttle</a>.</li>
</ul>
-', array('%admin-modules' => url('admin/settings/modules'), '%admin-block' => url('admin/build/block'), '%admin-settings-throttle' => url('admin/settings/throttle')));
- $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="%throttle">Throttle page</a>.', array('%throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'</p>';
+', array('@admin-modules' => url('admin/settings/modules'), '@admin-block' => url('admin/build/block'), '@admin-settings-throttle' => url('admin/settings/throttle')));
+ $output .= '<p>'. t('For more information please read the configuration and customization handbook <a href="@throttle">Throttle page</a>.', array('@throttle' => 'http://drupal.org/handbook/modules/throttle/')) .'</p>';
return $output;
case 'admin/settings/modules#description':
return t('Handles the auto-throttling mechanism, to control site congestion.');