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/helpers | |
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/helpers')
-rw-r--r-- | modules/comment/helpers/comment.php | 24 | ||||
-rw-r--r-- | modules/comment/helpers/comment_block.php | 4 | ||||
-rw-r--r-- | modules/comment/helpers/comment_menu.php | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/modules/comment/helpers/comment.php b/modules/comment/helpers/comment.php index 4bc77e57..3b6c0240 100644 --- a/modules/comment/helpers/comment.php +++ b/modules/comment/helpers/comment.php @@ -100,25 +100,25 @@ class comment_Core { static function get_add_form($item) { $form = new Forge("comments", "", "post"); - $group = $form->group("add_comment")->label(_("Add comment")); - $group->input("author") ->label(_("Author")) ->id("gAuthor"); - $group->input("email") ->label(_("Email")) ->id("gEmail"); - $group->input("url") ->label(_("Website (hidden)"))->id("gUrl"); - $group->textarea("text") ->label(_("Text")) ->id("gText"); + $group = $form->group("add_comment")->label(t("Add comment")); + $group->input("author") ->label(t("Author")) ->id("gAuthor"); + $group->input("email") ->label(t("Email")) ->id("gEmail"); + $group->input("url") ->label(t("Website (hidden)"))->id("gUrl"); + $group->textarea("text") ->label(t("Text")) ->id("gText"); $group->hidden("item_id")->value($item->id); - $group->submit(_("Add")); + $group->submit(t("Add")); $form->add_rules_from(ORM::factory("comment")); return $form; } static function get_edit_form($comment) { $form = new Forge("comments/{$comment->id}?_method=put", "", "post"); - $group = $form->group("edit_comment")->label(_("Edit comment")); - $group->input("author") ->label(_("Author")) ->id("gAuthor")->value($comment->author); - $group->input("email") ->label(_("Email")) ->id("gEmail") ->value($comment->email); - $group->input("url") ->label(_("Website (hidden)"))->id("gUrl") ->value($comment->url); - $group->textarea("text")->label(_("Text")) ->id("gText") ->value($comment->text); - $group->submit(_("Edit")); + $group = $form->group("edit_comment")->label(t("Edit comment")); + $group->input("author") ->label(t("Author")) ->id("gAuthor")->value($comment->author); + $group->input("email") ->label(t("Email")) ->id("gEmail") ->value($comment->email); + $group->input("url") ->label(t("Website (hidden)"))->id("gUrl") ->value($comment->url); + $group->textarea("text")->label(t("Text")) ->id("gText") ->value($comment->text); + $group->submit(t("Edit")); $form->add_rules_from($comment); return $form; } diff --git a/modules/comment/helpers/comment_block.php b/modules/comment/helpers/comment_block.php index 9a104baf..837eebb9 100644 --- a/modules/comment/helpers/comment_block.php +++ b/modules/comment/helpers/comment_block.php @@ -27,7 +27,7 @@ class comment_block_Core { public static function photo_bottom($theme) { $block = new Block; $block->id = "gComments"; - $block->title = _("Comments"); + $block->title = t("Comments"); $view = new View("comments.html"); $view->comments = ORM::factory("comment") @@ -44,7 +44,7 @@ class comment_block_Core { public static function admin_dashboard_blocks($theme) { $block = new Block(); $block->id = "gRecentComments"; - $block->title = _("Recent Comments"); + $block->title = t("Recent Comments"); $block->content = new View("admin_block_recent_comments.html"); $block->content->comments = ORM::factory("comment")->orderby("created", "DESC")->limit(5)->find_all(); diff --git a/modules/comment/helpers/comment_menu.php b/modules/comment/helpers/comment_menu.php index 9c7a5698..9df3024a 100644 --- a/modules/comment/helpers/comment_menu.php +++ b/modules/comment/helpers/comment_menu.php @@ -22,7 +22,7 @@ class comment_menu_Core { $menu->get("content_menu") ->append(Menu::factory("link") ->id("comments") - ->label(_("Comments")) + ->label(t("Comments")) ->url(url::site("admin/comments"))); } @@ -30,7 +30,7 @@ class comment_menu_Core { $menu ->append(Menu::factory("link") ->id("comments") - ->label(_("View comments on this item")) + ->label(t("View comments on this item")) ->url("#comments") ->css_id("gCommentsLink")); } |