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/tag/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/tag/helpers')
-rw-r--r-- | modules/tag/helpers/tag.php | 18 | ||||
-rw-r--r-- | modules/tag/helpers/tag_block.php | 2 | ||||
-rw-r--r-- | modules/tag/helpers/tag_menu.php | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php index 43697165..f552c669 100644 --- a/modules/tag/helpers/tag.php +++ b/modules/tag/helpers/tag.php @@ -77,28 +77,28 @@ class tag_Core { public static function get_add_form($item) { $form = new Forge("tags", "", "post", array("id" => "gAddTagForm")); - $group = $form->group("add_tag")->label(_("Add Tag")); - $group->input("name")->label(_("Add tag")); + $group = $form->group("add_tag")->label(t("Add Tag")); + $group->input("name")->label(t("Add tag")); $group->hidden("item_id")->value($item->id); - $group->submit(_("Add Tag")); + $group->submit(t("Add Tag")); $form->add_rules_from(ORM::factory("tag")); return $form; } public static function get_rename_form($tag) { $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm")); - $group = $form->group("rename_tag")->label(_("Rename Tag")); - $group->input("name")->label(_("Tag name"))->value($tag->name); - $group->inputs["name"]->error_messages("in_use", _("There is already a tag with that name")); - $group->submit(_("Save")); + $group = $form->group("rename_tag")->label(t("Rename Tag")); + $group->input("name")->label(t("Tag name"))->value($tag->name); + $group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name")); + $group->submit(t("Save")); $form->add_rules_from(ORM::factory("tag")); return $form; } public static function get_delete_form($tag) { $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm")); - $group = $form->group("delete_tag")->label(sprintf(_("Really delete tag %s?"), $tag->name)); - $group->submit(_("Delete Tag")); + $group = $form->group("delete_tag")->label(t("Really delete tag {{tag_name}}?", array("tag_name" => $tag->name))); + $group->submit(t("Delete Tag")); $form->add_rules_from(ORM::factory("tag")); return $form; } diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php index 37f7f21e..adcc7d40 100644 --- a/modules/tag/helpers/tag_block.php +++ b/modules/tag/helpers/tag_block.php @@ -26,7 +26,7 @@ class tag_block_Core { public static function sidebar_blocks($theme) { $block = new Block(); $block->id = "gTag"; - $block->title = _("Popular Tags"); + $block->title = t("Popular Tags"); $block->content = new View("tag_block.html"); $block->content->cloud = tag::cloud(30); diff --git a/modules/tag/helpers/tag_menu.php b/modules/tag/helpers/tag_menu.php index b13453f8..5fa53b34 100644 --- a/modules/tag/helpers/tag_menu.php +++ b/modules/tag/helpers/tag_menu.php @@ -22,7 +22,7 @@ class tag_menu_Core { $menu->get("content_menu") ->append(Menu::factory("link") ->id("tags") - ->label(_("Tags")) + ->label(t("Tags")) ->url(url::site("admin/tags"))); } } |