Superfluous whitespace removed.
L10n consistency updates.
*/
class UnsubscribeAction extends Action
{
-
function handle($args)
{
parent::handle($args);
if (!common_logged_in()) {
+ // TRANS: Client error displayed when trying to unsubscribe while not logged in.
$this->clientError(_('Not logged in.'));
return;
}
$other_id = $this->arg('unsubscribeto');
if (!$other_id) {
+ // TRANS: Client error displayed when trying to unsubscribe without providing a profile ID.
$this->clientError(_('No profile ID in request.'));
return;
}
$other = Profile::staticGet('id', $other_id);
if (!$other) {
+ // TRANS: Client error displayed when trying to unsubscribe while providing a non-existing profile ID.
$this->clientError(_('No profile with that ID.'));
return;
}
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
+ // TRANS: Page title for page to unsubscribe.
$this->element('title', null, _('Unsubscribed'));
$this->elementEnd('head');
$this->elementStart('body');
*/
class UpdateprofileAction extends Action
{
-
/**
* For initializing members of the class.
*
$license = $_POST['omb_listenee_license'];
$site_license = common_config('license', 'url');
if (!common_compatible_license($license, $site_license)) {
- $this->clientError(sprintf(_('Listenee stream license ‘%1$s’ is not '.
- 'compatible with site license ‘%2$s’.'),
+ // TRANS: Client error displayed when trying to update profile with an incompatible license.
+ // TRANS: %1$s is the license incompatible with site license %2$s.
+ $this->clientError(sprintf(_('Listenee stream license "%1$s" is not '.
+ 'compatible with site license "%2$s".'),
$license, $site_license));
return false;
}
exit(1);
}
-
-
/**
* Miscellaneous settings actions
*
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class UrlsettingsAction extends SettingsAction
{
/**
*
* @return string Title of the page
*/
-
function title()
{
+ // TRANS: Title of URL settings tab in profile settings.
return _('URL settings');
}
*
* @return instructions for use
*/
-
function getInstructions()
{
// TRANS: Instructions for tab "Other" in user profile settings.
*
* @return void
*/
-
function showContent()
{
$user = common_current_user();
// Include default values
+ // TRANS: Default value for URL shortening settings.
$services['none'] = _('[none]');
+ // TRANS: Default value for URL shortening settings.
$services['internal'] = _('[internal]');
if ($services) {
-
asort($services);
$this->elementStart('li');
}
$this->elementStart('li');
$this->input('maxurllength',
+ // TRANS: Field label in URL settings in profile.
_('URL longer than'),
(!is_null($this->arg('maxurllength'))) ?
$this->arg('maxurllength') : User_urlshortener_prefs::maxUrlLength($user),
+ // TRANS: Field title in URL settings in profile.
_('URLs longer than this will be shortened, 0 means always shorten.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('maxnoticelength',
+ // TRANS: Field label in URL settings in profile.
_('Text longer than'),
(!is_null($this->arg('maxnoticelength'))) ?
$this->arg('maxnoticelength') : User_urlshortener_prefs::maxNoticeLength($user),
+ // TRANS: Field title in URL settings in profile.
_('URLs in notices longer than this will be shortened, 0 means always shorten.'));
$this->elementEnd('li');
$this->elementEnd('ul');
*
* @return void
*/
-
function handlePost()
{
// CSRF protection
$maxurllength = $this->trimmed('maxurllength');
if (!Validate::number($maxurllength, array('min' => 0))) {
- throw new ClientException(_('Invalid number for max url length.'));
+ // TRANS: Client exception thrown when the maximum URL settings value is invalid in profile URL settings.
+ throw new ClientException(_('Invalid number for maximum URL length.'));
}
$maxnoticelength = $this->trimmed('maxnoticelength');
if (!Validate::number($maxnoticelength, array('min' => 0))) {
- throw new ClientException(_('Invalid number for max notice length.'));
+ // TRANS: Client exception thrown when the maximum notice length settings value is invalid in profile URL settings.
+ throw new ClientException(_('Invalid number for maximum notice length.'));
}
$user = common_current_user();
}
if (!$result) {
+ // TRANS: Server exception thrown in profile URL settings when preferences could not be saved.
throw new ServerException(_('Error saving user URL shortening preferences.'));
}
function showPageNotice()
{
- // TRANS: Page notice on "Auhtorize subscription" page.
+ // TRANS: Page notice on "Authorize subscription" page.
$this->element('p', null, _('Please check these details to make sure '.
'that you want to subscribe to this ' .
'user’s notices. If you didn’t just ask ' .
{
// TRANS: Accept message header from Authorise subscription page.
common_show_header(_('Subscription authorized'));
- // TRANS: Accept message text from Authorise subscription page.
$this->element('p', null,
+ // TRANS: Accept message text from Authorise subscription page.
_('The subscription has been authorized, but no '.
- 'callback URL was passed. Check with the site’s ' .
+ 'callback URL was passed. Check with the site\'s ' .
'instructions for details on how to authorize the ' .
'subscription. Your subscription token is:'));
$this->element('blockquote', 'token', $tok);
{
// TRANS: Reject message header from Authorise subscription page.
common_show_header(_('Subscription rejected'));
- // TRANS: Reject message from Authorise subscription page.
$this->element('p', null,
+ // TRANS: Reject message from Authorise subscription page.
_('The subscription has been rejected, but no '.
- 'callback URL was passed. Check with the site’s ' .
+ 'callback URL was passed. Check with the site\'s ' .
'instructions for details on how to fully reject ' .
'the subscription.'));
common_show_footer();