* remove superfluous whitespace.
* minor updates to L10n/i18n.
function title()
{
- return _('Change password');
+ // TRANS: Title for page where to change password.
+ return _m('TITLE','Change password');
}
/**
function getInstructions()
{
+ // TRANS: Instructions for page where to change password.
return _('Change your password.');
}
'action' =>
common_local_url('passwordsettings')));
$this->elementStart('fieldset');
+ // TRANS: Fieldset legend on page where to change password.
$this->element('legend', null, _('Password change'));
$this->hidden('token', common_session_token());
// Users who logged in with OpenID won't have a pwd
if ($user->password) {
$this->elementStart('li');
+ // TRANS: Field label on page where to change password.
$this->password('oldpassword', _('Old password'));
$this->elementEnd('li');
}
$this->elementStart('li');
+ // TRANS: Field label on page where to change password.
$this->password('newpassword', _('New password'),
+ // TRANS: Field title on page where to change password.
_('6 or more characters.'));
$this->elementEnd('li');
$this->elementStart('li');
- $this->password('confirm', _('Confirm'),
+ // TRANS: Field label on page where to change password. In this field the new password should be typed a second time.
+ $this->password('confirm', _m('LABEL','Confirm'),
+ // TRANS: Field title on page where to change password.
_('Same as password above.'));
$this->elementEnd('li');
$this->elementEnd('ul');
- $this->submit('changepass', _('Change'));
+ // TRANS: Button text on page where to change password.
+ $this->submit('changepass', _m('BUTTON','Change'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
# Some validation
if (strlen($newpassword) < 6) {
+ // TRANS: Form validation error on page where to change password.
$this->showForm(_('Password must be 6 or more characters.'));
return;
} else if (0 != strcmp($newpassword, $confirm)) {
$oldpassword = $this->arg('oldpassword');
if (!common_check_user($user->nickname, $oldpassword)) {
- $this->showForm(_('Incorrect old password'));
+ // TRANS: Form validation error on page where to change password.
+ $this->showForm(_('Incorrect old password.'));
return;
}
}else{
$val = $user->validate();
if ($val !== true) {
+ // TRANS: Form validation error on page where to change password.
$this->showForm(_('Error saving user; invalid.'));
return;
}
if (!$user->update($original)) {
- $this->serverError(_('Cannot save new password.'));
+ // TRANS: Server error displayed on page where to change password when password change
+ // TRANS: could not be made because of a server error.
+ $this->serverError(_('Cannot save new password.'));
return;
}
Event::handle('EndChangePassword', array($user));
}
+ // TRANS: Form validation notice on page where to change password.
$this->showForm(_('Password saved.'), true);
}
}
if (!empty($values['theme']['dir']) && !is_readable($values['theme']['dir'])) {
// TRANS: Client error in Paths admin panel.
// TRANS: %s is the directory that could not be read from.
- $this->clientError(sprintf(_("Theme directory not readable: %s."), $values['theme']['dir']));
+ $this->clientError(sprintf(_('Theme directory not readable: %s.'), $values['theme']['dir']));
}
// Validate avatar dir
if (empty($values['avatar']['dir']) || !is_writable($values['avatar']['dir'])) {
// TRANS: Client error in Paths admin panel.
// TRANS: %s is the avatar directory that could not be written to.
- $this->clientError(sprintf(_("Avatar directory not writable: %s."), $values['avatar']['dir']));
+ $this->clientError(sprintf(_('Avatar directory not writable: %s.'), $values['avatar']['dir']));
}
// Validate background dir
if (empty($values['background']['dir']) || !is_writable($values['background']['dir'])) {
// TRANS: Client error in Paths admin panel.
// TRANS: %s is the background directory that could not be written to.
- $this->clientError(sprintf(_("Background directory not writable: %s."), $values['background']['dir']));
+ $this->clientError(sprintf(_('Background directory not writable: %s.'), $values['background']['dir']));
}
// Validate locales dir
if (!empty($values['site']['locale_path']) && !is_readable($values['site']['locale_path'])) {
// TRANS: Client error in Paths admin panel.
// TRANS: %s is the locales directory that could not be read from.
- $this->clientError(sprintf(_("Locales directory not readable: %s."), $values['site']['locale_path']));
+ $this->clientError(sprintf(_('Locales directory not readable: %s.'), $values['site']['locale_path']));
}
// Validate SSL setup
$this->input('server',
// TRANS: Field label in Paths admin panel.
_('Server'),
+ // TRANS: Field title in Paths admin panel.
_('Site\'s server hostname.'));
$this->unli();
$this->input('path',
// TRANS: Field label in Paths admin panel.
_('Path'),
+ // TRANS: Field title in Paths admin panel.
_('Site path.'));
$this->unli();
$this->input('locale_path',
// TRANS: Field label in Paths admin panel.
_('Locale directory'),
+ // TRANS: Field title in Paths admin panel.
_('Directory path to locales.'),
'site');
$this->unli();
// TRANS: Checkbox label in Paths admin panel.
_('Fancy URLs'),
(bool) $this->value('fancy'),
- _('Use fancy (more readable and memorable) URLs?'));
+ // TRANS: Field title in Paths admin panel.
+ _('Use fancy URLs (more readable and memorable)?'));
$this->unli();
$this->out->elementEnd('ul');
$this->out->elementEnd('fieldset');
$this->out->elementStart('fieldset', array('id' => 'settings_paths_theme'));
- $this->out->element('legend', null, _('Theme'));
+ // TRANS: Fieldset legend in Paths admin panel.
+ $this->out->element('legend', null, _m('LEGEND','Theme'));
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('fieldset', array('id' => 'settings_admin_ssl'));
// TRANS: Fieldset legend in Paths admin panel.
- $this->out->element('legend', null, _('SSL'));
+ $this->out->element('legend', null, _m('LEGEND','SSL'));
$this->out->elementStart('ul', 'form_data');
$this->li();
*
* @see Action
*/
-
class PeopletagAction extends Action
{
$this->tag = $this->trimmed('tag');
if (!common_valid_profile_tag($this->tag)) {
+ // TRANS: Client error displayed when trying to tag a profile with an invalid tag.
+ // TRANS: %s is the invalid tag.
$this->clientError(sprintf(_('Not a valid people tag: %s.'),
$this->tag));
return;
*/
function title()
{
+ // TRANS: Page title for users with a certain self-tag.
+ // TRANS: %1$s is the tag, %2$s is the page number.
return sprintf(_('Users self-tagged with %1$s - page %2$d'),
$this->tag, $this->page);
}
-
}
class PeopleTagList extends ProfileList
return $aAttrs;
}
}
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/
*/
-
class PluginDisableAction extends PluginEnableAction
{
/**
return new EnablePluginForm($this, $this->plugin);
}
}
-
-
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/
*/
-
class PluginEnableAction extends Action
{
var $user;
*
* @return boolean success flag
*/
-
function prepare($args)
{
parent::prepare($args);
// Only allow POST requests
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ // TRANS: Client error displayed when trying to use another method than POST.
+ // TRANS: Do not translate POST.
$this->clientError(_('This action only accepts POST requests.'));
return false;
}
$this->user = common_current_user();
if (empty($this->user)) {
+ // TRANS: Client error displayed when trying to enable or disable a plugin while not logged in.
$this->clientError(_('Not logged in.'));
return false;
}
if (!AdminPanelAction::canAdmin('plugins')) {
+ // TRANS: Client error displayed when trying to enable or disable a plugin without access rights.
$this->clientError(_('You cannot administer plugins.'));
return false;
}
$this->plugin = $this->arg('plugin');
$defaultPlugins = common_config('plugins', 'default');
if (!array_key_exists($this->plugin, $defaultPlugins)) {
+ // TRANS: Client error displayed when trying to enable or disable a non-existing plugin.
$this->clientError(_('No such plugin.'));
return false;
}
*
* @return void
*/
-
function handle($args)
{
$key = 'disable-' . $this->plugin;
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class PluginsadminpanelAction extends AdminPanelAction
{
-
/**
* Returns the page title
*
* @return string page title
*/
-
function title()
{
// TRANS: Tab and title for plugins admin panel.
- return _('Plugins');
+ return _m('TITLE','Plugins');
}
/**
*
* @return string instructions
*/
-
function getInstructions()
{
// TRANS: Instructions at top of plugin admin page.
- return _('Additional plugins can be enabled and configured manually. ' .
+ return _('Additional plugins can be enabled and configured manually. ' .
'See the <a href="http://status.net/wiki/Plugins">online plugin ' .
'documentation</a> for more details.');
}
*
* @return void
*/
-
function showForm()
{
$this->elementStart('fieldset', array('id' => 'settings_plugins_default'));
-
+
// TRANS: Admin form section header
$this->element('legend', null, _('Default plugins'), 'default');
$list->show();
} else {
$this->element('p', null,
+ // TRANS: Text displayed on plugin admin page when no plugin are enabled.
_('All default plugins have been disabled from the ' .
'site\'s configuration file.'));
}
{
$content = common_shorten_links($_POST['omb_notice_content']);
if (Notice::contentTooLong($content)) {
+ // TRANS: Client error displayed if the notice posted has too many characters.
$this->clientError(_('Invalid notice content.'), 400);
return false;
}
$license = $_POST['omb_notice_license'];
$site_license = common_config('license', 'url');
if ($license && !common_compatible_license($license, $site_license)) {
- throw new Exception(sprintf(_('Notice license ā%1$sā is not ' .
- 'compatible with site license ā%2$sā.'),
+ // TRANS: Exception thrown if a notice's license is not compatible with the StatusNet site license.
+ // TRANS: %1$s is the notice license, %2$s is the StatusNet site's license.
+ throw new Exception(sprintf(_('Notice license "%1$s" is not ' .
+ 'compatible with site license "%2$s".'),
$license, $site_license));
}
}
}
-?>
\ No newline at end of file
* @see PublicrssAction
* @see PublicxrdsAction
*/
-
class PublicAction extends Action
{
/**
*
* @return boolean success value
*/
-
function prepare($args)
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
if ($this->page > MAX_PUBLIC_PAGE) {
- $this->clientError(sprintf(_("Beyond the page limit (%s)."), MAX_PUBLIC_PAGE));
+ // TRANS: Client error displayed when requesting a public timeline page beyond the page limit.
+ // TRANS: %s is the page limit.
+ $this->clientError(sprintf(_('Beyond the page limit (%s).'), MAX_PUBLIC_PAGE));
}
common_set_returnto($this->selfUrl());
NOTICES_PER_PAGE + 1);
if (!$this->notice) {
+ // TRANS: Server error displayed when a public timeline cannot be retrieved.
$this->serverError(_('Could not retrieve public stream.'));
return;
}
if($this->page > 1 && $this->notice->N == 0){
- // TRANS: Server error when page not found (404)
+ // TRANS: Server error when page not found (404).
$this->serverError(_('No such page.'),$code=404);
}
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return page title, including page number if over 1
*/
-
function title()
{
if ($this->page > 1) {
+ // TRANS: Title for all public timeline pages but the first.
+ // TRANS: %d is the page number.
return sprintf(_('Public timeline, page %d'), $this->page);
} else {
+ // TRANS: Title for the first public timeline page.
return _('Public timeline');
}
}
*
* @return void
*/
-
function getFeeds()
{
return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
+ // TRANS: Link description for public timeline feed.
_('Public Stream Feed (RSS 1.0)')),
new Feed(Feed::RSS2,
common_local_url('ApiTimelinePublic',
array('format' => 'rss')),
+ // TRANS: Link description for public timeline feed.
_('Public Stream Feed (RSS 2.0)')),
new Feed(Feed::ATOM,
common_local_url('ApiTimelinePublic',
array('format' => 'atom')),
+ // TRANS: Link description for public timeline feed.
_('Public Stream Feed (Atom)')));
}
function showEmptyList()
{
+ // TRANS: Text displayed for public feed when there are no public notices.
$message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' ';
if (common_logged_in()) {
+ // TRANS: Additional text displayed for public feed when there are no public notices for a logged in user.
$message .= _('Be the first to post!');
}
else {
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
+ // TRANS: Additional text displayed for public feed when there are no public notices for a not logged in user.
$message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
}
- }
+ }
$this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message));
*
* @return void
*/
-
function showContent()
{
$nl = new ThreadedNoticeList($this->notice, $this);
function showAnonymousMessage()
{
if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
+ // TRANS: Message for not logged in users at an invite-only site trying to view the public feed of notices.
+ // TRANS: This message contains Markdown links. Please mind the formatting.
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
'based on the Free Software [StatusNet](http://status.net/) tool. ' .
'[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ' .
'([Read more](%%doc.help%%))');
} else {
+ // TRANS: Message for not logged in users at a closed site trying to view the public feed of notices.
+ // TRANS: This message contains Markdown links. Please mind the formatting.
$m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
'based on the Free Software [StatusNet](http://status.net/) tool.');
}
<?php
-
/**
* Public XRDS for OpenID
*