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 /core/helpers/photo.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 'core/helpers/photo.php')
| -rw-r--r-- | core/helpers/photo.php | 22 |
1 files changed, 11 insertions, 11 deletions
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; } |
