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
@ -184,6 +184,7 @@ class MapstractionPlugin extends Plugin
|
||||
$action->elementStart('div', array('id' => 'entity_map',
|
||||
'class' => 'section'));
|
||||
|
||||
// TRANS: Header for Map widget that displays a map with geodata for notices.
|
||||
$action->element('h2', null, _m('Map'));
|
||||
|
||||
$action->element('div', array('id' => 'map_canvas',
|
||||
@ -196,7 +197,7 @@ class MapstractionPlugin extends Plugin
|
||||
|
||||
$action->element('a', array('href' => $mapUrl),
|
||||
// TRANS: Clickable item to allow opening the map in full size.
|
||||
_m("Full size"));
|
||||
_m('Full size'));
|
||||
|
||||
$action->elementEnd('div');
|
||||
}
|
||||
@ -208,6 +209,7 @@ class MapstractionPlugin extends Plugin
|
||||
'author' => 'Evan Prodromou',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Mapstraction',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('Show maps of users\' and friends\' notices '.
|
||||
'with <a href="http://www.mapstraction.com/">Mapstraction</a>.'));
|
||||
return true;
|
||||
|
@ -61,11 +61,14 @@ class UsermapAction extends MapAction
|
||||
$base = $this->profile->getFancyName();
|
||||
|
||||
if ($this->page == 1) {
|
||||
// @todo CHECKME: inconsisten with paged variant below. " map" missing.
|
||||
return $base;
|
||||
// TRANS: Title for map widget.
|
||||
// TRANS: %s is a user name.
|
||||
return sprintf(_m('%s map'),$base);
|
||||
} else {
|
||||
// @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,
|
||||
$this->page);
|
||||
}
|
||||
|
@ -243,6 +243,7 @@ class MemcachePlugin extends Plugin
|
||||
'author' => 'Evan Prodromou, Craig Andrews',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Memcache',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
||||
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
|
||||
* @link http://status.net/
|
||||
*/
|
||||
|
||||
class MemcachedPlugin extends Plugin
|
||||
{
|
||||
static $cacheInitialized = false;
|
||||
@ -215,6 +214,7 @@ class MemcachedPlugin extends Plugin
|
||||
'author' => 'Evan Prodromou, Craig Andrews',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Memcached',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('Use <a href="http://memcached.org/">Memcached</a> to cache query results.'));
|
||||
return true;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ class MeteorPlugin extends RealtimePlugin
|
||||
$this->_socket = stream_socket_client("tcp://{$controlserver}:{$this->controlport}", $errno, $errstr, $timeout, $flags);
|
||||
if (!$this->_socket) {
|
||||
// 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);
|
||||
if (preg_match('/^ERR (.*)$/', $result, $matches)) {
|
||||
// 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
|
||||
}
|
||||
@ -155,6 +155,7 @@ class MeteorPlugin extends RealtimePlugin
|
||||
'author' => 'Evan Prodromou',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Meteor',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('Plugin to do "real time" updates using Comet/Bayeux.'));
|
||||
return true;
|
||||
}
|
||||
|
@ -1,27 +1,24 @@
|
||||
This is a plugin to automatically load notices in the browser no
|
||||
matter who creates them -- the kind of thing we see with
|
||||
search.twitter.com, rejaw.com, or FriendFeed's "real time" news.
|
||||
This is a plugin to automatically load notices in the browser no matter who
|
||||
creates them -- the kind of thing we see with search.twitter.com, rejaw.com, or
|
||||
FriendFeed's "real time" news.
|
||||
|
||||
It requires a meteor server.
|
||||
|
||||
http://meteorserver.org/
|
||||
|
||||
Note that the controller interface needs to be accessible by the Web
|
||||
server, and the subscriber interface needs to be accessible by your
|
||||
Web users. You MUST firewall the controller interface from users;
|
||||
otherwise anyone will be able to push any message to your subscribers.
|
||||
Not good!
|
||||
Note that the controller interface needs to be accessible by the Web server, and
|
||||
the subscriber interface needs to be accessible by your Web users. You MUST
|
||||
firewall the controller interface from users; otherwise anyone will be able to
|
||||
push any message to your subscribers. Not good!
|
||||
|
||||
You can enable the plugin with this line in config.php:
|
||||
|
||||
addPlugin('Meteor', array('webserver' => 'meteor server address'));
|
||||
|
||||
Available parameters:
|
||||
|
||||
* webserver: Web server address. Defaults to site server.
|
||||
* webport: port to connect to for Web access. Defaults to 4670.
|
||||
* controlserver: Control server address. Defaults to webserver.
|
||||
* controlport: port to connect to for control. Defaults to 4671.
|
||||
* channelbase: a base string to use for channels. Good if you have
|
||||
multiple sites using the same meteor server.
|
||||
|
||||
|
@ -176,6 +176,7 @@ class MinifyPlugin extends Plugin
|
||||
'author' => 'Craig Andrews',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:Minify',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('The Minify plugin minifies StatusNet\'s CSS and JavaScript, removing whitespace and comments.'));
|
||||
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,
|
||||
(if any of $config['theme']['server'], $config['theme']['path'],
|
||||
@ -31,4 +32,3 @@ Example
|
||||
=======
|
||||
|
||||
addPlugin('minify', array());
|
||||
|
||||
|
@ -46,10 +46,12 @@ class MinifyAction extends Action
|
||||
if(file_exists($this->file)) {
|
||||
return true;
|
||||
} 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);
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
// TRANS: Client error displayed when not providing parameter "f".
|
||||
$this->clientError(_m('The parameter "f" is required but missing.'),500);
|
||||
return false;
|
||||
}
|
||||
@ -108,6 +110,7 @@ class MinifyAction extends Action
|
||||
header('Content-Type: ' . self::TYPE_CSS);
|
||||
break;
|
||||
default:
|
||||
// TRANS: Client error displayed when trying to minify an unsupported file type.
|
||||
$this->clientError(_m('File type not supported.'),500);
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Superclass for plugin to output XHTML Mobile Profile
|
||||
*
|
||||
@ -44,13 +43,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
|
||||
class WAP20Plugin extends Plugin
|
||||
{
|
||||
|
||||
function onStartShowHTML($action)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -193,6 +193,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
$type = common_negotiate_type($cp, $sp);
|
||||
|
||||
if (!$type) {
|
||||
// TRANS: Client exception thrown when requesting a not supported media type.
|
||||
throw new ClientException(_m('This page is not available in a '.
|
||||
'media type you accept.'), 406);
|
||||
}
|
||||
@ -310,31 +311,41 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
$action->elementStart('ul', array('id' => 'site_nav_global_primary'));
|
||||
if ($user) {
|
||||
$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'));
|
||||
$action->menuItem(common_local_url('profilesettings'),
|
||||
// TRANS: Menu item in mobile profile to go to user account settings.
|
||||
_m('Account'));
|
||||
$action->menuItem(common_local_url('oauthconnectionssettings'),
|
||||
// TRANS: Menu item in mobile profile to connect to other services.
|
||||
_m('Connect'));
|
||||
if ($user->hasRight(Right::CONFIGURESITE)) {
|
||||
$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')) {
|
||||
$action->menuItem(common_local_url('invite'),
|
||||
// TRANS: Menu item in mobile profile to invite other people.
|
||||
_m('Invite'));
|
||||
}
|
||||
$action->menuItem(common_local_url('logout'),
|
||||
// TRANS: Menu item in mobile profile log the current user off.
|
||||
_m('Logout'));
|
||||
} else {
|
||||
if (!common_config('site', 'closed')) {
|
||||
$action->menuItem(common_local_url('register'),
|
||||
// TRANS: Menu item in mobile profile to register with the site.
|
||||
_m('Register'));
|
||||
}
|
||||
$action->menuItem(common_local_url('login'),
|
||||
// TRANS: Menu item in mobile profile to log in.
|
||||
_m('Login'));
|
||||
}
|
||||
if ($user || !common_config('site', 'private')) {
|
||||
$action->menuItem(common_local_url('peoplesearch'),
|
||||
// TRANS: Menu item in mobile profile to search the site.
|
||||
_m('Search'));
|
||||
}
|
||||
$action->elementEnd('ul');
|
||||
@ -362,11 +373,13 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
if (common_config('attachments', 'uploads')) {
|
||||
if ($this->mobileFeatures['inputfiletype']) {
|
||||
$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('input', array('id' => 'notice_data-attach',
|
||||
'type' => 'file',
|
||||
'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) {
|
||||
@ -448,6 +461,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
'author' => 'Sarven Capadisli',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:MobileProfile',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('XHTML MobileProfile output for supporting user agents.'));
|
||||
return true;
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ class ModHelperPlugin extends Plugin
|
||||
'author' => 'Brion Vibber',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:ModHelper',
|
||||
'rawdescription' =>
|
||||
// TRANS: Plugin description.
|
||||
_m('Lets users who have been manually marked as "modhelper"s silence accounts.'));
|
||||
|
||||
return true;
|
||||
|
@ -36,7 +36,8 @@ class ModPlusPlugin extends Plugin
|
||||
'author' => 'Brion Vibber',
|
||||
'homepage' => 'http://status.net/wiki/Plugin:ModPlus',
|
||||
'rawdescription' =>
|
||||
_m('UI extensions for profile moderation actions.'));
|
||||
// TRANS: Plugin description.
|
||||
_m('UI extension for profile moderation actions.'));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -136,6 +137,7 @@ class ModPlusPlugin extends Plugin
|
||||
$isRemote = !(User::staticGet('id', $profile->id));
|
||||
if ($isRemote) {
|
||||
$target = common_local_url('remoteprofile', array('id' => $profile->id));
|
||||
// TRANS: Label for access to remote profile options.
|
||||
$label = _m('Remote profile options...');
|
||||
$out->elementStart('div', 'remote-profile-options');
|
||||
$out->element('a', array('href' => $target), $label);
|
||||
|
@ -42,14 +42,11 @@ class RemoteProfileAction extends ShowstreamAction
|
||||
|
||||
function title()
|
||||
{
|
||||
// maybe fixed in 0.9.x
|
||||
if (!empty($this->profile->fullname)) {
|
||||
$base = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
|
||||
} else {
|
||||
$base = $this->profile->nickname;
|
||||
}
|
||||
$base = $this->profile->getBestName();
|
||||
$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;
|
||||
$host = parse_url($url, PHP_URL_HOST);
|
||||
$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,
|
||||
$host,
|
||||
$url);
|
||||
@ -68,6 +68,7 @@ class RemoteProfileAction extends ShowstreamAction
|
||||
$this->raw($html);
|
||||
|
||||
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.');
|
||||
$this->raw(common_markup_to_html($markdown));
|
||||
}
|
||||
@ -103,5 +104,4 @@ class RemoteProfileAction extends ShowstreamAction
|
||||
{
|
||||
// skip
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user