Update translator documentation.

Superfluous whitespace removed.
L10n consistency updates.
This commit is contained in:
Siebrand Mazeland 2011-03-29 21:30:12 +02:00
parent f2d7c33ad3
commit a8af04feea
4 changed files with 25 additions and 19 deletions

View File

@ -44,11 +44,11 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
*/
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;
}
@ -74,6 +74,7 @@ class UnsubscribeAction extends Action
$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;
}
@ -81,6 +82,7 @@ class UnsubscribeAction extends Action
$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;
}
@ -95,6 +97,7 @@ class UnsubscribeAction extends Action
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');

View File

@ -45,7 +45,6 @@ require_once INSTALLDIR.'/extlib/libomb/service_provider.php';
*/
class UpdateprofileAction extends Action
{
/**
* For initializing members of the class.
*
@ -61,8 +60,10 @@ class UpdateprofileAction extends Action
$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;
}

View File

@ -32,8 +32,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
/**
* Miscellaneous settings actions
*
@ -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
* @link http://status.net/
*/
class UrlsettingsAction extends SettingsAction
{
/**
@ -54,9 +51,9 @@ class UrlsettingsAction extends SettingsAction
*
* @return string Title of the page
*/
function title()
{
// TRANS: Title of URL settings tab in profile settings.
return _('URL settings');
}
@ -65,7 +62,6 @@ class UrlsettingsAction extends SettingsAction
*
* @return instructions for use
*/
function getInstructions()
{
// TRANS: Instructions for tab "Other" in user profile settings.
@ -85,7 +81,6 @@ class UrlsettingsAction extends SettingsAction
*
* @return void
*/
function showContent()
{
$user = common_current_user();
@ -118,11 +113,12 @@ class UrlsettingsAction extends SettingsAction
// 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');
@ -135,16 +131,20 @@ class UrlsettingsAction extends SettingsAction
}
$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');
@ -162,7 +162,6 @@ class UrlsettingsAction extends SettingsAction
*
* @return void
*/
function handlePost()
{
// CSRF protection
@ -184,13 +183,15 @@ class UrlsettingsAction extends SettingsAction
$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();
@ -235,6 +236,7 @@ class UrlsettingsAction extends SettingsAction
}
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.'));
}

View File

@ -111,7 +111,7 @@ class UserauthorizationAction extends Action
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 ' .
'users notices. If you didnt just ask ' .
@ -243,10 +243,10 @@ class UserauthorizationAction extends Action
{
// 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 sites ' .
'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);
@ -257,10 +257,10 @@ class UserauthorizationAction extends Action
{
// 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 sites ' .
'callback URL was passed. Check with the site\'s ' .
'instructions for details on how to fully reject ' .
'the subscription.'));
common_show_footer();