diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Profile.php | 2 | ||||
-rw-r--r-- | classes/User_group.php | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index 545950a9e..b56e508c6 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -161,7 +161,7 @@ class Profile extends Memcached_DataObject { if ($this->fullname) { // TRANS: Full name of a profile or group followed by nickname in parens - return sprintf(_('%1$s (%2$s)'), $this->fullname, $this->nickname); + return sprintf(_m('FANCYNAME','%1$s (%2$s)'), $this->fullname, $this->nickname); } else { return $this->nickname; } diff --git a/classes/User_group.php b/classes/User_group.php index 7d6e21914..60217e960 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -234,6 +234,22 @@ class User_group extends Memcached_DataObject return ($this->fullname) ? $this->fullname : $this->nickname; } + /** + * Gets the full name (if filled) with nickname as a parenthetical, or the nickname alone + * if no fullname is provided. + * + * @return string + */ + function getFancyName() + { + if ($this->fullname) { + // TRANS: Full name of a profile or group followed by nickname in parens + return sprintf(_m('FANCYNAME','%1$s (%2$s)'), $this->fullname, $this->nickname); + } else { + return $this->nickname; + } + } + function getAliases() { $aliases = array(); |