Commit a8af04fe authored by Siebrand Mazeland's avatar Siebrand Mazeland

Update translator documentation.

Superfluous whitespace removed.
L10n consistency updates.
parent f2d7c33a
...@@ -44,11 +44,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { ...@@ -44,11 +44,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/ */
class UnsubscribeAction extends Action class UnsubscribeAction extends Action
{ {
function handle($args) function handle($args)
{ {
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {
// TRANS: Client error displayed when trying to unsubscribe while not logged in.
$this->clientError(_('Not logged in.')); $this->clientError(_('Not logged in.'));
return; return;
} }
...@@ -74,6 +74,7 @@ class UnsubscribeAction extends Action ...@@ -74,6 +74,7 @@ class UnsubscribeAction extends Action
$other_id = $this->arg('unsubscribeto'); $other_id = $this->arg('unsubscribeto');
if (!$other_id) { if (!$other_id) {
// TRANS: Client error displayed when trying to unsubscribe without providing a profile ID.
$this->clientError(_('No profile ID in request.')); $this->clientError(_('No profile ID in request.'));
return; return;
} }
...@@ -81,6 +82,7 @@ class UnsubscribeAction extends Action ...@@ -81,6 +82,7 @@ class UnsubscribeAction extends Action
$other = Profile::staticGet('id', $other_id); $other = Profile::staticGet('id', $other_id);
if (!$other) { if (!$other) {
// TRANS: Client error displayed when trying to unsubscribe while providing a non-existing profile ID.
$this->clientError(_('No profile with that ID.')); $this->clientError(_('No profile with that ID.'));
return; return;
} }
...@@ -95,6 +97,7 @@ class UnsubscribeAction extends Action ...@@ -95,6 +97,7 @@ class UnsubscribeAction extends Action
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8'); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
// TRANS: Page title for page to unsubscribe.
$this->element('title', null, _('Unsubscribed')); $this->element('title', null, _('Unsubscribed'));
$this->elementEnd('head'); $this->elementEnd('head');
$this->elementStart('body'); $this->elementStart('body');
......
...@@ -45,7 +45,6 @@ require_once INSTALLDIR.'/extlib/libomb/service_provider.php'; ...@@ -45,7 +45,6 @@ require_once INSTALLDIR.'/extlib/libomb/service_provider.php';
*/ */
class UpdateprofileAction extends Action class UpdateprofileAction extends Action
{ {
/** /**
* For initializing members of the class. * For initializing members of the class.
* *
...@@ -61,8 +60,10 @@ class UpdateprofileAction extends Action ...@@ -61,8 +60,10 @@ class UpdateprofileAction extends Action
$license = $_POST['omb_listenee_license']; $license = $_POST['omb_listenee_license'];
$site_license = common_config('license', 'url'); $site_license = common_config('license', 'url');
if (!common_compatible_license($license, $site_license)) { if (!common_compatible_license($license, $site_license)) {
$this->clientError(sprintf(_('Listenee stream license ‘%1$s’ is not '. // TRANS: Client error displayed when trying to update profile with an incompatible license.
'compatible with site license ‘%2$s’.'), // 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)); $license, $site_license));
return false; return false;
} }
......
...@@ -32,8 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { ...@@ -32,8 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1); exit(1);
} }
/** /**
* Miscellaneous settings actions * Miscellaneous settings actions
* *
...@@ -46,7 +44,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { ...@@ -46,7 +44,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @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 UrlsettingsAction extends SettingsAction class UrlsettingsAction extends SettingsAction
{ {
/** /**
...@@ -54,9 +51,9 @@ class UrlsettingsAction extends SettingsAction ...@@ -54,9 +51,9 @@ class UrlsettingsAction extends SettingsAction
* *
* @return string Title of the page * @return string Title of the page
*/ */
function title() function title()
{ {
// TRANS: Title of URL settings tab in profile settings.
return _('URL settings'); return _('URL settings');
} }
...@@ -65,7 +62,6 @@ class UrlsettingsAction extends SettingsAction ...@@ -65,7 +62,6 @@ class UrlsettingsAction extends SettingsAction
* *
* @return instructions for use * @return instructions for use
*/ */
function getInstructions() function getInstructions()
{ {
// TRANS: Instructions for tab "Other" in user profile settings. // TRANS: Instructions for tab "Other" in user profile settings.
...@@ -85,7 +81,6 @@ class UrlsettingsAction extends SettingsAction ...@@ -85,7 +81,6 @@ class UrlsettingsAction extends SettingsAction
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
$user = common_current_user(); $user = common_current_user();
...@@ -118,11 +113,12 @@ class UrlsettingsAction extends SettingsAction ...@@ -118,11 +113,12 @@ class UrlsettingsAction extends SettingsAction
// Include default values // Include default values
// TRANS: Default value for URL shortening settings.
$services['none'] = _('[none]'); $services['none'] = _('[none]');
// TRANS: Default value for URL shortening settings.
$services['internal'] = _('[internal]'); $services['internal'] = _('[internal]');
if ($services) { if ($services) {
asort($services); asort($services);
$this->elementStart('li'); $this->elementStart('li');
...@@ -135,16 +131,20 @@ class UrlsettingsAction extends SettingsAction ...@@ -135,16 +131,20 @@ class UrlsettingsAction extends SettingsAction
} }
$this->elementStart('li'); $this->elementStart('li');
$this->input('maxurllength', $this->input('maxurllength',
// TRANS: Field label in URL settings in profile.
_('URL longer than'), _('URL longer than'),
(!is_null($this->arg('maxurllength'))) ? (!is_null($this->arg('maxurllength'))) ?
$this->arg('maxurllength') : User_urlshortener_prefs::maxUrlLength($user), $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.')); _('URLs longer than this will be shortened, 0 means always shorten.'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementStart('li'); $this->elementStart('li');
$this->input('maxnoticelength', $this->input('maxnoticelength',
// TRANS: Field label in URL settings in profile.
_('Text longer than'), _('Text longer than'),
(!is_null($this->arg('maxnoticelength'))) ? (!is_null($this->arg('maxnoticelength'))) ?
$this->arg('maxnoticelength') : User_urlshortener_prefs::maxNoticeLength($user), $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.')); _('URLs in notices longer than this will be shortened, 0 means always shorten.'));
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
...@@ -162,7 +162,6 @@ class UrlsettingsAction extends SettingsAction ...@@ -162,7 +162,6 @@ class UrlsettingsAction extends SettingsAction
* *
* @return void * @return void
*/ */
function handlePost() function handlePost()
{ {
// CSRF protection // CSRF protection
...@@ -184,13 +183,15 @@ class UrlsettingsAction extends SettingsAction ...@@ -184,13 +183,15 @@ class UrlsettingsAction extends SettingsAction
$maxurllength = $this->trimmed('maxurllength'); $maxurllength = $this->trimmed('maxurllength');
if (!Validate::number($maxurllength, array('min' => 0))) { 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'); $maxnoticelength = $this->trimmed('maxnoticelength');
if (!Validate::number($maxnoticelength, array('min' => 0))) { 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(); $user = common_current_user();
...@@ -235,6 +236,7 @@ class UrlsettingsAction extends SettingsAction ...@@ -235,6 +236,7 @@ class UrlsettingsAction extends SettingsAction
} }
if (!$result) { 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.')); throw new ServerException(_('Error saving user URL shortening preferences.'));
} }
......
...@@ -111,7 +111,7 @@ class UserauthorizationAction extends Action ...@@ -111,7 +111,7 @@ class UserauthorizationAction extends Action
function showPageNotice() 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 '. $this->element('p', null, _('Please check these details to make sure '.
'that you want to subscribe to this ' . 'that you want to subscribe to this ' .
'user’s notices. If you didn’t just ask ' . 'user’s notices. If you didn’t just ask ' .
...@@ -243,10 +243,10 @@ class UserauthorizationAction extends Action ...@@ -243,10 +243,10 @@ class UserauthorizationAction extends Action
{ {
// TRANS: Accept message header from Authorise subscription page. // TRANS: Accept message header from Authorise subscription page.
common_show_header(_('Subscription authorized')); common_show_header(_('Subscription authorized'));
// TRANS: Accept message text from Authorise subscription page.
$this->element('p', null, $this->element('p', null,
// TRANS: Accept message text from Authorise subscription page.
_('The subscription has been authorized, but no '. _('The subscription has been authorized, but no '.
'callback URL was passed. Check with the sites ' . 'callback URL was passed. Check with the site\'s ' .
'instructions for details on how to authorize the ' . 'instructions for details on how to authorize the ' .
'subscription. Your subscription token is:')); 'subscription. Your subscription token is:'));
$this->element('blockquote', 'token', $tok); $this->element('blockquote', 'token', $tok);
...@@ -257,10 +257,10 @@ class UserauthorizationAction extends Action ...@@ -257,10 +257,10 @@ class UserauthorizationAction extends Action
{ {
// TRANS: Reject message header from Authorise subscription page. // TRANS: Reject message header from Authorise subscription page.
common_show_header(_('Subscription rejected')); common_show_header(_('Subscription rejected'));
// TRANS: Reject message from Authorise subscription page.
$this->element('p', null, $this->element('p', null,
// TRANS: Reject message from Authorise subscription page.
_('The subscription has been rejected, but no '. _('The subscription has been rejected, but no '.
'callback URL was passed. Check with the sites ' . 'callback URL was passed. Check with the site\'s ' .
'instructions for details on how to fully reject ' . 'instructions for details on how to fully reject ' .
'the subscription.')); 'the subscription.'));
common_show_footer(); common_show_footer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment