summaryrefslogtreecommitdiff
path: root/core/controllers/admin_maintenance.php
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-01-15 09:30:15 +0000
committerAndy Staudacher <andy.st@gmail.com>2009-01-15 09:30:15 +0000
commite53916dd0622e3db61d6a05ad0fe69e8d7c7f11a (patch)
treedd7b6c0bbb6884341691189e98451f90870b6c35 /core/controllers/admin_maintenance.php
parent0bbde9e059c51fe61c92d23f9f6a4518b2fb1a8c (diff)
Simplifying the way t() is called. Refactoring localization function t($message, $options=array()) into 2 separate functions:
- the new t($message, $options=array()) is for simple strings, optionally with placeholder interpolation. - t2($singular, $plural, $count, $options=array()) is for plurals.
Diffstat (limited to 'core/controllers/admin_maintenance.php')
-rw-r--r--core/controllers/admin_maintenance.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/controllers/admin_maintenance.php b/core/controllers/admin_maintenance.php
index 3eec16fc..1c9b4164 100644
--- a/core/controllers/admin_maintenance.php
+++ b/core/controllers/admin_maintenance.php
@@ -30,9 +30,9 @@ class Admin_Maintenance_Controller extends Admin_Controller {
"callback" => "graphics::rebuild_dirty_images",
"description" => (
$dirty_count ?
- t(array("one" => "You have one image which is out of date",
- "other" => "You have {{count}} out-of-date images"),
- array("count" => $dirty_count))
+ t2("You have one image which is out of date",
+ "You have {{count}} out-of-date images",
+ $dirty_count)
: t("All your images are up to date")),
"severity" => $dirty_count ? log::WARNING : log::SUCCESS),
ArrayObject::ARRAY_AS_PROPS));
@@ -50,9 +50,9 @@ class Admin_Maintenance_Controller extends Admin_Controller {
$stalled_count = $query->count();
if ($stalled_count) {
log::warning("tasks",
- t(array("one" => "One task is stalled",
- "other" => "{{count}} tasks are stalled"),
- array("count" => $stalled_count)),
+ t2("One task is stalled",
+ "{{count}} tasks are stalled",
+ $stalled_count),
t("{{link_start}}view{{link_end}}",
array("link_start" => "<a href=\"" . url::site("admin/maintenance") . "\">",
"link_start" => "</a>")));