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/controllers | |
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/controllers')
-rw-r--r-- | modules/tag/controllers/admin_tags.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php index 7370fb42..b30f5b95 100644 --- a/modules/tag/controllers/admin_tags.php +++ b/modules/tag/controllers/admin_tags.php @@ -52,8 +52,8 @@ class Admin_Tags_Controller extends Admin_Controller { $name = $tag->name; Database::instance()->query("DELETE from `items_tags` where `tag_id` = $tag->id"); $tag->delete(); - message::success(sprintf(_("Deleted tag %s"), $name)); - log::success("tags", sprintf(_("Deleted tag %s"), $name)); + message::success(t("Deleted tag {{tag_name}}", array("tag_name" => $name))); + log::success("tags", t("Deleted tag {{tag_name}}", array("tag_name" => $name))); print json_encode( array("result" => "success", @@ -96,8 +96,10 @@ class Admin_Tags_Controller extends Admin_Controller { $tag->name = $new_name; $tag->save(); - message::success(sprintf(_("Renamed tag %s to %s"), $old_name, $tag->name)); - log::success("tags", sprintf(_("Renamed tag %s to %s"), $old_name, $tag->name)); + $message = t("Renamed tag {{old_name}} to {{new_name}}", + array("old_name" => $old_name, "new_name" => $tag->name)); + message::success($message); + log::success("tags", $message); print json_encode( array("result" => "success", |