Permalink
Browse files

Revert "Fix for ticket #491: Make user and group names translatable."

This reverts commit 4091219.
  • Loading branch information...
1 parent 99c131e commit 7d98d4b7b9d16f32ed98c8eeb051be4149468dc6 @bharat bharat committed Feb 19, 2010
@@ -23,8 +23,7 @@ public function show($id) {
$user = identity::lookup_user($id);
$active_user = identity::active_user();
$is_current_active = $active_user->id == $id;
- $can_edit = $is_current_active && !$active_user->guest;
- $display_all = $active_user->admin || $can_edit;
+ $display_all = $active_user->admin || ($is_current_active && !$active_user->guest);
$v = new Theme_View("page.html", "other", "profile");
$v->page_title = t("%name Profile", array("name" => $user->display_name()));
@@ -33,7 +32,7 @@ public function show($id) {
// @todo modify user_home to supply a link to their album,
$v->content->user = $user;
$v->content->not_current = !$is_current_active;
- $v->content->editable = identity::is_writable() && $can_edit;
+ $v->content->editable = identity::is_writable() && $display_all;
$event_data = (object)array("user" => $user, "display_all" => $display_all, "content" => array());
module::event("show_user_profile", $event_data);
@@ -423,9 +423,6 @@ static function show_user_profile($data) {
if ($field == "locale") {
$value = locales::display_name($value);
}
- if ($field == "full_name") {
- $value = t($value);
- }
$v->user_profile_data[(string) $label] = $value;
}
}
@@ -5,7 +5,7 @@
<tr>
<th> </th>
<? foreach ($groups as $group): ?>
- <th> <?= html::clean(t($group->name)) ?> </th>
+ <th> <?= html::clean($group->name) ?> </th>
<? endforeach ?>
</tr>
@@ -98,25 +98,25 @@ static function initialize() {
DEFAULT CHARSET=utf8;");
$everybody = ORM::factory("group");
- $everybody->name = t("Everybody", array("locale" => "root"));
+ $everybody->name = "Everybody";
$everybody->special = true;
$everybody->save();
$registered = ORM::factory("group");
- $registered->name = t("Registered Users", array("locale" => "root"));
+ $registered->name = "Registered Users";
$registered->special = true;
$registered->save();
$guest = ORM::factory("user");
$guest->name = "guest";
- $guest->full_name = t("Guest User", array("locale" => "root"));
+ $guest->full_name = "Guest User";
$guest->password = "";
$guest->guest = true;
$guest->save();
$admin = ORM::factory("user");
$admin->name = "admin";
- $admin->full_name = t("Gallery Administrator", array("locale" => "root"));
+ $admin->full_name = "Gallery Administrator";
$admin->password = "admin";
$admin->email = "unknown@unknown.com";
$admin->admin = true;
@@ -113,7 +113,7 @@ public function save() {
* @return string
*/
public function display_name() {
- return empty($this->full_name) ? $this->name : t($this->full_name);
+ return empty($this->full_name) ? $this->name : $this->full_name;
}
/**
@@ -78,7 +78,7 @@ class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-al
<?= html::clean($user->name) ?>
</td>
<td>
- <?= t(html::clean($user->full_name)) ?>
+ <?= html::clean($user->full_name) ?>
</td>
<td>
<?= html::clean($user->email) ?>
@@ -1,9 +1,9 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<h4>
- <?= t(html::clean($group->name)) ?>
+ <?= html::clean($group->name) ?>
<? if (!$group->special): ?>
<a href="<?= url::site("admin/users/delete_group_form/$group->id") ?>"
- title="<?= t("Delete the %name group", array("name" => t(html::clean($group->name))))->for_html_attr() ?>"
+ title="<?= t("Delete the %name group", array("name" => $group->name))->for_html_attr() ?>"
class="g-dialog-link g-button g-right">
<span class="ui-icon ui-icon-trash"><?= t("Delete") ?></span></a>
<? else: ?>
@@ -22,7 +22,7 @@ class="g-button g-right ui-state-disabled ui-icon-left">
<a href="javascript:remove_user(<?= $user->id ?>, <?= $group->id ?>)"
class="g-button g-right ui-state-default ui-corner-all ui-icon-left"
title="<?= t("Remove %user from %group group",
- array("user" => $user->name, "group" => t(html::clean($group->name))))->for_html_attr() ?>">
+ array("user" => $user->name, "group" => $group->name))->for_html_attr() ?>">
<span class="ui-icon ui-icon-closethick"><?= t("Remove") ?></span>
</a>
<? endif ?>

0 comments on commit 7d98d4b

Please sign in to comment.