Use profile->getBestName() instead of more complex i18n unfriendly construction.
Update translator documentation. Number parameters where more than one is used. L10n updates. Update README file to break lines at or just before 80 characters. Remove PHP4-ism "?>" Update indentation. Update whitespace.
This commit is contained in:
parent
a2e4a1803c
commit
3bcff2fa86
@ -164,7 +164,7 @@ class MapstractionPlugin extends Plugin
|
|||||||
' var user = null; '.
|
' var user = null; '.
|
||||||
(($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
|
(($actionName == 'showstream') ? ' user = scrapeUser(); ' : '') .
|
||||||
' var notices = scrapeNotices(user); ' .
|
' var notices = scrapeNotices(user); ' .
|
||||||
' var canvas = $("#map_canvas")[0]; ' .
|
' var canvas = $("#map_canvas")[0]; ' .
|
||||||
' if (typeof(canvas) != "undefined") { showMapstraction(canvas, notices); } '.
|
' if (typeof(canvas) != "undefined") { showMapstraction(canvas, notices); } '.
|
||||||
'});');
|
'});');
|
||||||
}
|
}
|
||||||
@ -184,6 +184,7 @@ class MapstractionPlugin extends Plugin
|
|||||||
$action->elementStart('div', array('id' => 'entity_map',
|
$action->elementStart('div', array('id' => 'entity_map',
|
||||||
'class' => 'section'));
|
'class' => 'section'));
|
||||||
|
|
||||||
|
// TRANS: Header for Map widget that displays a map with geodata for notices.
|
||||||
$action->element('h2', null, _m('Map'));
|
$action->element('h2', null, _m('Map'));
|
||||||
|
|
||||||
$action->element('div', array('id' => 'map_canvas',
|
$action->element('div', array('id' => 'map_canvas',
|
||||||
@ -196,7 +197,7 @@ class MapstractionPlugin extends Plugin
|
|||||||
|
|
||||||
$action->element('a', array('href' => $mapUrl),
|
$action->element('a', array('href' => $mapUrl),
|
||||||
// TRANS: Clickable item to allow opening the map in full size.
|
// TRANS: Clickable item to allow opening the map in full size.
|
||||||
_m("Full size"));
|
_m('Full size'));
|
||||||
|
|
||||||
$action->elementEnd('div');
|
$action->elementEnd('div');
|
||||||
}
|
}
|
||||||
@ -208,6 +209,7 @@ class MapstractionPlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou',
|
'author' => 'Evan Prodromou',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Mapstraction',
|
'homepage' => 'http://status.net/wiki/Plugin:Mapstraction',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Show maps of users\' and friends\' notices '.
|
_m('Show maps of users\' and friends\' notices '.
|
||||||
'with <a href="http://www.mapstraction.com/">Mapstraction</a>.'));
|
'with <a href="http://www.mapstraction.com/">Mapstraction</a>.'));
|
||||||
return true;
|
return true;
|
||||||
|
@ -61,11 +61,14 @@ class UsermapAction extends MapAction
|
|||||||
$base = $this->profile->getFancyName();
|
$base = $this->profile->getFancyName();
|
||||||
|
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
// @todo CHECKME: inconsisten with paged variant below. " map" missing.
|
// TRANS: Title for map widget.
|
||||||
return $base;
|
// TRANS: %s is a user name.
|
||||||
|
return sprintf(_m('%s map'),$base);
|
||||||
} else {
|
} else {
|
||||||
// @todo CHECKME: Is the part ", page %2$d" relevant here?
|
// @todo CHECKME: Is the part ", page %2$d" relevant here?
|
||||||
return sprintf(_m("%s map, page %d"),
|
// TRANS: Title for map widget.
|
||||||
|
// TRANS: %1$s is a user name, %2$d is a page nember.
|
||||||
|
return sprintf(_m("%1$s map, page %2$d"),
|
||||||
$base,
|
$base,
|
||||||
$this->page);
|
$this->page);
|
||||||
}
|
}
|
||||||
|
@ -243,6 +243,7 @@ class MemcachePlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou, Craig Andrews',
|
'author' => 'Evan Prodromou, Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Memcache',
|
'homepage' => 'http://status.net/wiki/Plugin:Memcache',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ if (!defined('STATUSNET')) {
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MemcachedPlugin extends Plugin
|
class MemcachedPlugin extends Plugin
|
||||||
{
|
{
|
||||||
static $cacheInitialized = false;
|
static $cacheInitialized = false;
|
||||||
@ -215,6 +214,7 @@ class MemcachedPlugin extends Plugin
|
|||||||
'author' => 'Evan Prodromou, Craig Andrews',
|
'author' => 'Evan Prodromou, Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Memcached',
|
'homepage' => 'http://status.net/wiki/Plugin:Memcached',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
$this->_socket = stream_socket_client("tcp://{$controlserver}:{$this->controlport}", $errno, $errstr, $timeout, $flags);
|
$this->_socket = stream_socket_client("tcp://{$controlserver}:{$this->controlport}", $errno, $errstr, $timeout, $flags);
|
||||||
if (!$this->_socket) {
|
if (!$this->_socket) {
|
||||||
// TRANS: Exception. %1$s is the control server, %2$s is the control port.
|
// TRANS: Exception. %1$s is the control server, %2$s is the control port.
|
||||||
throw new Exception(sprintf(_m('Couldn\'t connect to %1$s on %2$s.'),$controlserver,$this->controlport));
|
throw new Exception(sprintf(_m('Could not connect to %1$s on %2$s.'),$controlserver,$this->controlport));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
$result = fgets($this->_socket);
|
$result = fgets($this->_socket);
|
||||||
if (preg_match('/^ERR (.*)$/', $result, $matches)) {
|
if (preg_match('/^ERR (.*)$/', $result, $matches)) {
|
||||||
// TRANS: Exception. %s is the Meteor message that could not be added.
|
// TRANS: Exception. %s is the Meteor message that could not be added.
|
||||||
throw new Exception(sprintf(_m('Error adding meteor message "%s"'),$matches[1]));
|
throw new Exception(sprintf(_m('Error adding meteor message "%s".'),$matches[1]));
|
||||||
}
|
}
|
||||||
// TODO: parse and deal with result
|
// TODO: parse and deal with result
|
||||||
}
|
}
|
||||||
@ -155,6 +155,7 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
'author' => 'Evan Prodromou',
|
'author' => 'Evan Prodromou',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Meteor',
|
'homepage' => 'http://status.net/wiki/Plugin:Meteor',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Plugin to do "real time" updates using Comet/Bayeux.'));
|
_m('Plugin to do "real time" updates using Comet/Bayeux.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,27 +1,24 @@
|
|||||||
This is a plugin to automatically load notices in the browser no
|
This is a plugin to automatically load notices in the browser no matter who
|
||||||
matter who creates them -- the kind of thing we see with
|
creates them -- the kind of thing we see with search.twitter.com, rejaw.com, or
|
||||||
search.twitter.com, rejaw.com, or FriendFeed's "real time" news.
|
FriendFeed's "real time" news.
|
||||||
|
|
||||||
It requires a meteor server.
|
It requires a meteor server.
|
||||||
|
|
||||||
http://meteorserver.org/
|
http://meteorserver.org/
|
||||||
|
|
||||||
Note that the controller interface needs to be accessible by the Web
|
Note that the controller interface needs to be accessible by the Web server, and
|
||||||
server, and the subscriber interface needs to be accessible by your
|
the subscriber interface needs to be accessible by your Web users. You MUST
|
||||||
Web users. You MUST firewall the controller interface from users;
|
firewall the controller interface from users; otherwise anyone will be able to
|
||||||
otherwise anyone will be able to push any message to your subscribers.
|
push any message to your subscribers. Not good!
|
||||||
Not good!
|
|
||||||
|
|
||||||
You can enable the plugin with this line in config.php:
|
You can enable the plugin with this line in config.php:
|
||||||
|
|
||||||
addPlugin('Meteor', array('webserver' => 'meteor server address'));
|
addPlugin('Meteor', array('webserver' => 'meteor server address'));
|
||||||
|
|
||||||
Available parameters:
|
Available parameters:
|
||||||
|
|
||||||
* webserver: Web server address. Defaults to site server.
|
* webserver: Web server address. Defaults to site server.
|
||||||
* webport: port to connect to for Web access. Defaults to 4670.
|
* webport: port to connect to for Web access. Defaults to 4670.
|
||||||
* controlserver: Control server address. Defaults to webserver.
|
* controlserver: Control server address. Defaults to webserver.
|
||||||
* controlport: port to connect to for control. Defaults to 4671.
|
* controlport: port to connect to for control. Defaults to 4671.
|
||||||
* channelbase: a base string to use for channels. Good if you have
|
* channelbase: a base string to use for channels. Good if you have
|
||||||
multiple sites using the same meteor server.
|
multiple sites using the same meteor server.
|
||||||
|
|
||||||
|
@ -176,6 +176,7 @@ class MinifyPlugin extends Plugin
|
|||||||
'author' => 'Craig Andrews',
|
'author' => 'Craig Andrews',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:Minify',
|
'homepage' => 'http://status.net/wiki/Plugin:Minify',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('The Minify plugin minifies StatusNet\'s CSS and JavaScript, removing whitespace and comments.'));
|
_m('The Minify plugin minifies StatusNet\'s CSS and JavaScript, removing whitespace and comments.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
The Minify plugin minifies your CSS and Javascript, removing whitespace and comments.
|
The Minify plugin minifies your CSS and Javascript, removing whitespace and
|
||||||
|
comments.
|
||||||
|
|
||||||
Note that if enabled this plugin and use a theme server,
|
Note that if enabled this plugin and use a theme server,
|
||||||
(if any of $config['theme']['server'], $config['theme']['path'],
|
(if any of $config['theme']['server'], $config['theme']['path'],
|
||||||
@ -31,4 +32,3 @@ Example
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
addPlugin('minify', array());
|
addPlugin('minify', array());
|
||||||
|
|
||||||
|
@ -46,16 +46,18 @@ class MinifyAction extends Action
|
|||||||
if(file_exists($this->file)) {
|
if(file_exists($this->file)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Client error displayed when not providing a valid path in parameter "f".
|
||||||
$this->clientError(_m('The parameter "f" is not a valid path.'),404);
|
$this->clientError(_m('The parameter "f" is not a valid path.'),404);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
// TRANS: Client error displayed when not providing parameter "f".
|
||||||
$this->clientError(_m('The parameter "f" is required but missing.'),500);
|
$this->clientError(_m('The parameter "f" is required but missing.'),500);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function etag()
|
function etag()
|
||||||
{
|
{
|
||||||
if(isset($this->v)) {
|
if(isset($this->v)) {
|
||||||
return "\"" . crc32($this->file . $this->v) . "\"";
|
return "\"" . crc32($this->file . $this->v) . "\"";
|
||||||
@ -73,7 +75,7 @@ class MinifyAction extends Action
|
|||||||
function handle($args)
|
function handle($args)
|
||||||
{
|
{
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
|
||||||
$c = Cache::instance();
|
$c = Cache::instance();
|
||||||
if (!empty($c)) {
|
if (!empty($c)) {
|
||||||
$cacheKey = Cache::key(MinifyPlugin::cacheKey . ':' . $this->file . '?v=' . empty($this->v)?'':$this->v);
|
$cacheKey = Cache::key(MinifyPlugin::cacheKey . ':' . $this->file . '?v=' . empty($this->v)?'':$this->v);
|
||||||
@ -108,6 +110,7 @@ class MinifyAction extends Action
|
|||||||
header('Content-Type: ' . self::TYPE_CSS);
|
header('Content-Type: ' . self::TYPE_CSS);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
// TRANS: Client error displayed when trying to minify an unsupported file type.
|
||||||
$this->clientError(_m('File type not supported.'),500);
|
$this->clientError(_m('File type not supported.'),500);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Superclass for plugin to output XHTML Mobile Profile
|
* Superclass for plugin to output XHTML Mobile Profile
|
||||||
*
|
*
|
||||||
@ -44,13 +43,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
|||||||
|
|
||||||
class WAP20Plugin extends Plugin
|
class WAP20Plugin extends Plugin
|
||||||
{
|
{
|
||||||
|
|
||||||
function onStartShowHTML($action)
|
function onStartShowHTML($action)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
@ -193,6 +193,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
|||||||
$type = common_negotiate_type($cp, $sp);
|
$type = common_negotiate_type($cp, $sp);
|
||||||
|
|
||||||
if (!$type) {
|
if (!$type) {
|
||||||
|
// TRANS: Client exception thrown when requesting a not supported media type.
|
||||||
throw new ClientException(_m('This page is not available in a '.
|
throw new ClientException(_m('This page is not available in a '.
|
||||||
'media type you accept.'), 406);
|
'media type you accept.'), 406);
|
||||||
}
|
}
|
||||||
@ -310,31 +311,41 @@ class MobileProfilePlugin extends WAP20Plugin
|
|||||||
$action->elementStart('ul', array('id' => 'site_nav_global_primary'));
|
$action->elementStart('ul', array('id' => 'site_nav_global_primary'));
|
||||||
if ($user) {
|
if ($user) {
|
||||||
$action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
|
$action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
|
||||||
|
// TRANS: Menu item in mobile profile to go to start page of site.
|
||||||
_m('Home'));
|
_m('Home'));
|
||||||
$action->menuItem(common_local_url('profilesettings'),
|
$action->menuItem(common_local_url('profilesettings'),
|
||||||
|
// TRANS: Menu item in mobile profile to go to user account settings.
|
||||||
_m('Account'));
|
_m('Account'));
|
||||||
$action->menuItem(common_local_url('oauthconnectionssettings'),
|
$action->menuItem(common_local_url('oauthconnectionssettings'),
|
||||||
_m('Connect'));
|
// TRANS: Menu item in mobile profile to connect to other services.
|
||||||
|
_m('Connect'));
|
||||||
if ($user->hasRight(Right::CONFIGURESITE)) {
|
if ($user->hasRight(Right::CONFIGURESITE)) {
|
||||||
$action->menuItem(common_local_url('siteadminpanel'),
|
$action->menuItem(common_local_url('siteadminpanel'),
|
||||||
_m('Admin'), _m('Change site configuration'), false, 'nav_admin');
|
// TRANS: Menu item in mobile profile to manage site settings.
|
||||||
|
_m('Admin'),
|
||||||
|
_m('Change site configuration'), false, 'nav_admin');
|
||||||
}
|
}
|
||||||
if (common_config('invite', 'enabled')) {
|
if (common_config('invite', 'enabled')) {
|
||||||
$action->menuItem(common_local_url('invite'),
|
$action->menuItem(common_local_url('invite'),
|
||||||
|
// TRANS: Menu item in mobile profile to invite other people.
|
||||||
_m('Invite'));
|
_m('Invite'));
|
||||||
}
|
}
|
||||||
$action->menuItem(common_local_url('logout'),
|
$action->menuItem(common_local_url('logout'),
|
||||||
|
// TRANS: Menu item in mobile profile log the current user off.
|
||||||
_m('Logout'));
|
_m('Logout'));
|
||||||
} else {
|
} else {
|
||||||
if (!common_config('site', 'closed')) {
|
if (!common_config('site', 'closed')) {
|
||||||
$action->menuItem(common_local_url('register'),
|
$action->menuItem(common_local_url('register'),
|
||||||
|
// TRANS: Menu item in mobile profile to register with the site.
|
||||||
_m('Register'));
|
_m('Register'));
|
||||||
}
|
}
|
||||||
$action->menuItem(common_local_url('login'),
|
$action->menuItem(common_local_url('login'),
|
||||||
|
// TRANS: Menu item in mobile profile to log in.
|
||||||
_m('Login'));
|
_m('Login'));
|
||||||
}
|
}
|
||||||
if ($user || !common_config('site', 'private')) {
|
if ($user || !common_config('site', 'private')) {
|
||||||
$action->menuItem(common_local_url('peoplesearch'),
|
$action->menuItem(common_local_url('peoplesearch'),
|
||||||
|
// TRANS: Menu item in mobile profile to search the site.
|
||||||
_m('Search'));
|
_m('Search'));
|
||||||
}
|
}
|
||||||
$action->elementEnd('ul');
|
$action->elementEnd('ul');
|
||||||
@ -362,11 +373,13 @@ class MobileProfilePlugin extends WAP20Plugin
|
|||||||
if (common_config('attachments', 'uploads')) {
|
if (common_config('attachments', 'uploads')) {
|
||||||
if ($this->mobileFeatures['inputfiletype']) {
|
if ($this->mobileFeatures['inputfiletype']) {
|
||||||
$form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
|
$form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
|
||||||
|
// TRANS: Field label in mobile profile to attach a file to a status.
|
||||||
$form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
|
$form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
|
||||||
$form->out->element('input', array('id' => 'notice_data-attach',
|
$form->out->element('input', array('id' => 'notice_data-attach',
|
||||||
'type' => 'file',
|
'type' => 'file',
|
||||||
'name' => 'attach',
|
'name' => 'attach',
|
||||||
'title' => _m('Attach a file')));
|
// TRANS: Field title in mobile profile to attach a file to a status.
|
||||||
|
'title' => _m('Attach a file.')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($form->action) {
|
if ($form->action) {
|
||||||
@ -448,6 +461,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
|||||||
'author' => 'Sarven Capadisli',
|
'author' => 'Sarven Capadisli',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:MobileProfile',
|
'homepage' => 'http://status.net/wiki/Plugin:MobileProfile',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('XHTML MobileProfile output for supporting user agents.'));
|
_m('XHTML MobileProfile output for supporting user agents.'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ class ModHelperPlugin extends Plugin
|
|||||||
'author' => 'Brion Vibber',
|
'author' => 'Brion Vibber',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:ModHelper',
|
'homepage' => 'http://status.net/wiki/Plugin:ModHelper',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
|
// TRANS: Plugin description.
|
||||||
_m('Lets users who have been manually marked as "modhelper"s silence accounts.'));
|
_m('Lets users who have been manually marked as "modhelper"s silence accounts.'));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -36,7 +36,8 @@ class ModPlusPlugin extends Plugin
|
|||||||
'author' => 'Brion Vibber',
|
'author' => 'Brion Vibber',
|
||||||
'homepage' => 'http://status.net/wiki/Plugin:ModPlus',
|
'homepage' => 'http://status.net/wiki/Plugin:ModPlus',
|
||||||
'rawdescription' =>
|
'rawdescription' =>
|
||||||
_m('UI extensions for profile moderation actions.'));
|
// TRANS: Plugin description.
|
||||||
|
_m('UI extension for profile moderation actions.'));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -136,6 +137,7 @@ class ModPlusPlugin extends Plugin
|
|||||||
$isRemote = !(User::staticGet('id', $profile->id));
|
$isRemote = !(User::staticGet('id', $profile->id));
|
||||||
if ($isRemote) {
|
if ($isRemote) {
|
||||||
$target = common_local_url('remoteprofile', array('id' => $profile->id));
|
$target = common_local_url('remoteprofile', array('id' => $profile->id));
|
||||||
|
// TRANS: Label for access to remote profile options.
|
||||||
$label = _m('Remote profile options...');
|
$label = _m('Remote profile options...');
|
||||||
$out->elementStart('div', 'remote-profile-options');
|
$out->elementStart('div', 'remote-profile-options');
|
||||||
$out->element('a', array('href' => $target), $label);
|
$out->element('a', array('href' => $target), $label);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* To change this template, choose Tools | Templates
|
* To change this template, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
@ -42,14 +42,11 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
// maybe fixed in 0.9.x
|
$base = $this->profile->getBestName();
|
||||||
if (!empty($this->profile->fullname)) {
|
|
||||||
$base = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
|
|
||||||
} else {
|
|
||||||
$base = $this->profile->nickname;
|
|
||||||
}
|
|
||||||
$host = parse_url($this->profile->profileurl, PHP_URL_HOST);
|
$host = parse_url($this->profile->profileurl, PHP_URL_HOST);
|
||||||
return sprintf(_m('%s on %s'), $base, $host);
|
// TRANS: Remote profile action page title.
|
||||||
|
// TRANS: %1$s is a username, %2$s is a hostname.
|
||||||
|
return sprintf(_m('%1$s on %2$s'), $base, $host);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,7 +57,10 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
$url = $this->profile->profileurl;
|
$url = $this->profile->profileurl;
|
||||||
$host = parse_url($url, PHP_URL_HOST);
|
$host = parse_url($url, PHP_URL_HOST);
|
||||||
$markdown = sprintf(
|
$markdown = sprintf(
|
||||||
_m('This remote profile is registered on another site; see [%s\'s original profile page on %s](%s).'),
|
// TRANS: Message on remote profile page.
|
||||||
|
// TRANS: This message contains Markdown links in the form [description](link).
|
||||||
|
// TRANS: %1$s is a profile nickname, %2$s is a hostname, %3$s is a URL.
|
||||||
|
_m('This remote profile is registered on another site; see [%1$s\'s original profile page on %2$s](%3$s).'),
|
||||||
$this->profile->nickname,
|
$this->profile->nickname,
|
||||||
$host,
|
$host,
|
||||||
$url);
|
$url);
|
||||||
@ -68,6 +68,7 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
$this->raw($html);
|
$this->raw($html);
|
||||||
|
|
||||||
if ($this->profile->hasRole(Profile_role::SILENCED)) {
|
if ($this->profile->hasRole(Profile_role::SILENCED)) {
|
||||||
|
// TRANS: Message on blocked remote profile page.
|
||||||
$markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
|
$markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
|
||||||
$this->raw(common_markup_to_html($markdown));
|
$this->raw(common_markup_to_html($markdown));
|
||||||
}
|
}
|
||||||
@ -103,5 +104,4 @@ class RemoteProfileAction extends ShowstreamAction
|
|||||||
{
|
{
|
||||||
// skip
|
// skip
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user