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:
Andy Staudacher
2009-01-08 17:13:06 +00:00
parent fd081159f1
commit a631fe29f3
70 changed files with 479 additions and 414 deletions
+10 -10
View File
@@ -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;
}
}