mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
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.
This commit is contained in:
@@ -63,22 +63,22 @@ class group_Core {
|
||||
|
||||
public static function get_edit_form_admin($group) {
|
||||
$form = new Forge("admin/groups/edit/$group->id");
|
||||
$form_group = $form->group("edit_group")->label(_("Edit Group"));
|
||||
$form_group->input("name")->label(_("Name"))->id("gName")->value($group->name);
|
||||
$form_group = $form->group("edit_group")->label(t("Edit Group"));
|
||||
$form_group->input("name")->label(t("Name"))->id("gName")->value($group->name);
|
||||
$form_group->inputs["name"]->error_messages(
|
||||
"in_use", _("There is already a group with that name"));
|
||||
$form_group->submit(_("Save"));
|
||||
"in_use", t("There is already a group with that name"));
|
||||
$form_group->submit(t("Save"));
|
||||
$form->add_rules_from($group);
|
||||
return $form;
|
||||
}
|
||||
|
||||
public static function get_add_form_admin() {
|
||||
$form = new Forge("admin/groups/add");
|
||||
$form_group = $form->group("add_group")->label(_("Add Group"));
|
||||
$form_group->input("name")->label(_("Name"))->id("gName");
|
||||
$form_group = $form->group("add_group")->label(t("Add Group"));
|
||||
$form_group->input("name")->label(t("Name"))->id("gName");
|
||||
$form_group->inputs["name"]->error_messages(
|
||||
"in_use", _("There is already a group with that name"));
|
||||
$form_group->submit(_("Add Group"));
|
||||
"in_use", t("There is already a group with that name"));
|
||||
$form_group->submit(t("Add Group"));
|
||||
$group = ORM::factory("group");
|
||||
$form->add_rules_from($group);
|
||||
return $form;
|
||||
@@ -87,8 +87,8 @@ class group_Core {
|
||||
public static function get_delete_form_admin($group) {
|
||||
$form = new Forge("admin/groups/delete/$group->id", "", "post");
|
||||
$form_group = $form->group("delete_group")->label(
|
||||
sprintf(_("Are you sure you want to delete group %s?"), $group->name));
|
||||
$form_group->submit(_("Delete"));
|
||||
t("Are you sure you want to delete group {{group_name}}?", array("group_name" => $group->name)));
|
||||
$form_group->submit(t("Delete"));
|
||||
return $form;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user