diff options
author | Andy Staudacher <andy.st@gmail.com> | 2009-01-08 17:13:06 +0000 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2009-01-08 17:13:06 +0000 |
commit | a631fe29f3950f8db1f7fb4ce1f47261a9b0feff (patch) | |
tree | b5af3ad39362dea97ce01be63d5ec09b7846bb9c /modules/comment/controllers/admin_comments.php | |
parent | fd081159f1783918d81e355e25e262ccc5249913 (diff) |
i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
Diffstat (limited to 'modules/comment/controllers/admin_comments.php')
-rw-r--r-- | modules/comment/controllers/admin_comments.php | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php index 7c88c1d9..9d7e1222 100644 --- a/modules/comment/controllers/admin_comments.php +++ b/modules/comment/controllers/admin_comments.php @@ -33,42 +33,47 @@ class Admin_Comments_Controller extends Admin_Controller { $view->content->menu = Menu::factory("root") ->append(Menu::factory("link") ->id("all") - ->label(sprintf(_("All Comments (%d)"), - $view->content->all->count())) + ->label(t(array("one" => "All Comments ({{count}})", + "other" => "All Comments ({{count}})"), + array("count" => $view->content->all->count()))) ->url(url::site("admin/comments/queue/all"))) ->append(Menu::factory("link") ->id("unpublished") - ->label(sprintf(_("Awaiting Moderation (%d)"), - $view->content->unpublished->count())) + ->label(t(array("one" => "Awaiting Moderation ({{count}})", + "other" => "Awaiting Moderation ({{count}})"), + array("count" => $view->content->unpublished->count()))) ->url(url::site("admin/comments/queue/unpublished"))) ->append(Menu::factory("link") ->id("published") - ->label(sprintf(_("Approved (%d)"), - $view->content->published->count())) + ->label(t(array("one" => "Approved ({{count}})", + "other" => "Approved ({{count}})"), + array("count" => $view->content->published->count()))) ->url(url::site("admin/comments/queue/published"))) ->append(Menu::factory("link") ->id("spam") - ->label(sprintf(_("Spam (%d)"), $view->content->spam->count())) + ->label(t(array("one" => "Spam ({{count}})", + "other" => "Spam ({{count}})"), + array("count" => $view->content->spam->count()))) ->url(url::site("admin/comments/queue/spam"))); switch ($state) { case "all": $view->content->comments = $view->content->all; - $view->content->title = _("All Comments"); + $view->content->title = t("All Comments"); break; case "published": $view->content->comments = $view->content->published; - $view->content->title = _("Approved Comments"); + $view->content->title = t("Approved Comments"); break; case "unpublished": $view->content->comments = $view->content->unpublished; - $view->content->title = _("Comments Awaiting Moderation"); + $view->content->title = t("Comments Awaiting Moderation"); break; case "spam": - $view->content->title = _("Spam Comments"); + $view->content->title = t("Spam Comments"); $view->content->comments = $view->content->spam; $view->content->spam_caught = module::get_var("comment", "spam_caught"); break; |