From a631fe29f3950f8db1f7fb4ce1f47261a9b0feff Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 8 Jan 2009 17:13:06 +0000 Subject: 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. --- core/helpers/photo.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'core/helpers/photo.php') diff --git a/core/helpers/photo.php b/core/helpers/photo.php index 29f2ac6f..749efb87 100644 --- a/core/helpers/photo.php +++ b/core/helpers/photo.php @@ -96,13 +96,13 @@ class photo_Core { static function get_add_form($parent) { $form = new Forge("albums/{$parent->id}", "", "post", array("id" => "gAddPhotoForm")); - $group = $form->group("add_photo")->label(sprintf(_("Add Photo to %s"), $parent->title)); - $group->input("name")->label(_("Name")); - $group->input("title")->label(_("Title")); - $group->textarea("description")->label(_("Description")); - $group->upload("file")->label(_("File"))->rules("required|allow[jpg,png,gif]"); + $group = $form->group("add_photo")->label(t("Add Photo to {{album_title}}", array("album_title" =>$parent->title))); + $group->input("name")->label(t("Name")); + $group->input("title")->label(t("Title")); + $group->textarea("description")->label(t("Description")); + $group->upload("file")->label(t("File"))->rules("required|allow[jpg,png,gif]"); $group->hidden("type")->value("photo"); - $group->submit(_("Upload")); + $group->submit(t("Upload")); $form->add_rules_from(ORM::factory("item")); return $form; } @@ -110,11 +110,11 @@ class photo_Core { static function get_edit_form($photo) { $form = new Forge("photos/$photo->id", "", "post", array("id" => "gEditPhotoForm")); $form->hidden("_method")->value("put"); - $group = $form->group("edit_photo")->label(_("Edit Photo")); - $group->input("name")->label(_("Name"))->value($photo->name); - $group->input("title")->label(_("Title"))->value($photo->title); - $group->textarea("description")->label(_("Description"))->value($photo->description); - $group->submit(_("Modify")); + $group = $form->group("edit_photo")->label(t("Edit Photo")); + $group->input("name")->label(t("Name"))->value($photo->name); + $group->input("title")->label(t("Title"))->value($photo->title); + $group->textarea("description")->label(t("Description"))->value($photo->description); + $group->submit(t("Modify")); $form->add_rules_from(ORM::factory("item")); return $form; } -- cgit v1.2.3