* fix some i18n bugs (in-message variables).
* update/add translator documentation.
* remove superfluous whitespace.
} else if (!$this->user->mutuallySubscribed($this->other)) {
$this->clientError(
// TRANS: Client error displayed trying to direct message another user who's not a friend (403).
- _('Can\'t send direct messages to users who aren\'t your friend.'),
+ _('Cannot send direct messages to users who aren\'t your friend.'),
403,
$this->format
);
common_log(LOG_WARNING, $msg);
// TRANS: Client error given from the OAuth API when the request token or verifier is invalid.
- $this->clientError(_("Invalid request token or verifier."), 400, 'text');
+ $this->clientError(_('Invalid request token or verifier.'), 400, 'text');
} else {
common_log(
LOG_INFO,
default:
// TRANS: Exception thrown requesting an unsupported notice output format.
// TRANS: %s is the requested output format.
- throw new Exception(sprintf(_("Unsupported format: %s"), $this->format));
+ throw new Exception(sprintf(_("Unsupported format: %s."), $this->format));
}
} else {
// XXX: Twitter just sets a 404 header and doens't bother
{
if ($this->format != 'atom') {
// TRANS: Client error displayed when trying to delete a notice not using the Atom format.
- $this->clientError(_("Can only delete using the Atom format."));
+ $this->clientError(_('Can only delete using the Atom format.'));
return;
}
$saved = null;
if (Event::handle('StartAtomPubNewActivity', array(&$activity, $this->user, &$saved))) {
-
if ($activity->verb != ActivityVerb::POST) {
// TRANS: Client error displayed when not using the POST verb. Do not translate POST.
$this->clientError(_('Can only handle POST activities.'));
if (!empty($notice)) {
// TRANS: Client error displayed when using another format than AtomPub.
+ // TRANS: %s is the notice URI.
$this->clientError(sprintf(_('Notice with URI "%s" already exists.'),
$note->id));
return;
*
* @return void
*/
-
function deleteMembership()
{
if (empty($this->auth_user) ||
array('id' => 'avatar_original',
'class' => 'avatar_view'));
// TRANS: Header on avatar upload crop form for thumbnail of originally uploaded avatar (h2).
- $this->element('h2', null, _("Original"));
+ $this->element('h2', null, _('Original'));
$this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
'width' => $this->filedata['width'],
array('id' => 'avatar_preview',
'class' => 'avatar_view'));
// TRANS: Header on avatar upload crop form for thumbnail of to be used rendition of uploaded avatar (h2).
- $this->element('h2', null, _("Preview"));
+ $this->element('h2', null, _('Preview'));
$this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
'width' => AVATAR_PROFILE_SIZE,
$this->mode = 'crop';
- // TRANS: Avatar upload form unstruction after uploading a file.
- $this->showForm(_('Pick a square area of the image to be your avatar'),
+ // TRANS: Avatar upload form instruction after uploading a file.
+ $this->showForm(_('Pick a square area of the image to be your avatar.'),
true);
}
function title()
{
// TRANS: Title for backup account page.
- return _("Backup account");
+ return _('Backup account');
}
/**
'submit',
null,
// TRANS: Title for submit button to backup an account on the backup account page.
- _('Backup your account'));
+ _('Backup your account.'));
}
}
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when blocking a user.
- _('Do not block this user'));
+ _('Do not block this user.'));
$this->submit('form_action-yes',
// TRANS: Button label on the user block form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when blocking a user.
- _('Block this user'));
+ _('Block this user.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when deleting an application.
- _('Do not delete this application'));
+ _('Do not delete this application.'));
$this->submit('form_action-yes',
// TRANS: Button label on the delete application form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
// TRANS: Submit button title for 'Yes' when deleting an application.
- 'yes', _('Delete this application'));
+ 'yes', _('Delete this application.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when deleting a group.
- _('Do not delete this group'));
+ _('Do not delete this group.'));
$this->submit('form_action-yes',
// TRANS: Button label on the delete group form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when deleting a group.
- _('Delete this group'));
+ _('Delete this group.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when deleting a notice.
- _("Do not delete this notice"));
+ _('Do not delete this notice.'));
$this->submit('form_action-yes',
// TRANS: Button label on the delete notice form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when deleting a notice.
- _('Delete this notice'));
+ _('Delete this notice.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when deleting a user.
- _('Do not delete this user'));
+ _('Do not delete this user.'));
$this->submit('form_action-yes',
// TRANS: Button label on the delete user form.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when deleting a user.
- _('Delete this user'));
+ _('Delete this user.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
if (!in_array($values['theme'], Theme::listAvailable())) {
// TRANS: Client error displayed when a theme is submitted through the form that is not in the theme list.
// TRANS: %s is the chosen unavailable theme.
- $this->clientError(sprintf(_("Theme not available: %s."), $values['theme']));
+ $this->clientError(sprintf(_('Theme not available: %s.'), $values['theme']));
}
}
// TRANS: Field label for StatusNet site logo.
_('Site logo'),
// TRANS: Title for field label for StatusNet site logo.
- 'Logo for the site (full URL)');
+ 'Logo for the site (full URL).');
$this->unli();
$this->li();
// TRANS: Field label for SSL StatusNet site logo.
_('SSL logo'),
// TRANS: Title for field label for SSL StatusNet site logo.
- 'Logo to show on SSL pages');
+ 'Logo to show on SSL pages.');
$this->unli();
$this->out->elementEnd('ul');
// TRANS: Button text for resetting theme settings.
$this->out->submit('defaults', _m('BUTTON','Use defaults'), 'submit form_action-default',
// TRANS: Title for button for resetting theme settings.
- 'defaults', _('Restore default designs'));
+ 'defaults', _('Restore default designs.'));
$this->out->element('input', array('id' => 'settings_design_reset',
'type' => 'reset',
'value' => 'Reset',
'class' => 'submit form_action-primary',
// TRANS: Title for button for resetting theme settings.
- 'title' => _('Reset back to default')));
+ 'title' => _('Reset back to default.')));
$this->out->submit('save',
// TRANS: Button text for saving theme settings.
'submit form_action-secondary',
'save',
// TRANS: Title for button for saving theme settings.
- _('Save design'));
+ _('Save design.'));
}
}
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error removing incoming e-mail address.
- $this->serverError(_("Could not update user record."));
+ $this->serverError(_('Could not update user record.'));
}
// TRANS: Message given after successfully removing an incoming e-mail address.
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown on database error adding incoming e-mail address.
- $this->serverError(_("Could not update user record."));
+ $this->serverError(_('Could not update user record.'));
}
// TRANS: Message given after successfully adding an incoming e-mail address.
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Page title for page on which favorite notices can be unfavourited.
- $this->element('title', null, _('Disfavor favorite'));
+ $this->element('title', null, _('Disfavor favorite.'));
$this->elementEnd('head');
$this->elementStart('body');
$disfavor = new DisFavorForm($this, $notice);
'submit form_action-primary',
'no',
// TRANS: Submit button title for 'No' when blocking a user from a group.
- _('Do not block this user from this group'));
+ _('Do not block this user from this group.'));
$this->submit('form_action-yes',
// TRANS: Button label on the form to block a user from a group.
_m('BUTTON','Yes'),
'submit form_action-secondary',
'yes',
// TRANS: Submit button title for 'Yes' when blocking a user from a group.
- _('Block this user from this group'));
+ _('Block this user from this group.'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
}
$this->elementStart('li', array('id' => 'avatar_original',
'class' => 'avatar_view'));
// TRANS: Uploaded original file in group logo form.
- $this->element('h2', null, _("Original"));
+ $this->element('h2', null, _('Original'));
$this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => $this->group->original_logo,
'alt' => $this->group->nickname));
$this->elementStart('li', array('id' => 'avatar_preview',
'class' => 'avatar_view'));
// TRANS: Header for preview of to be displayed group logo.
- $this->element('h2', null, _("Preview"));
+ $this->element('h2', null, _('Preview'));
$this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => $this->group->homepage_logo,
'width' => AVATAR_PROFILE_SIZE,
array('id' => 'avatar_original',
'class' => 'avatar_view'));
// TRANS: Header for originally uploaded file before a crop on the group logo page.
- $this->element('h2', null, _("Original"));
+ $this->element('h2', null, _('Original'));
$this->elementStart('div', array('id'=>'avatar_original_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
'width' => $this->filedata['width'],
array('id' => 'avatar_preview',
'class' => 'avatar_view'));
// TRANS: Header for the cropped group logo on the group logo page.
- $this->element('h2', null, _("Preview"));
+ $this->element('h2', null, _('Preview'));
$this->elementStart('div', array('id'=>'avatar_preview_view'));
$this->element('img', array('src' => Avatar::url($this->filedata['filename']),
'width' => AVATAR_PROFILE_SIZE,
{
return $this->message->getFrom();
}
-}
\ No newline at end of file
+}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class LoginAction extends Action
{
/**
* Has there been an error?
*/
-
var $error = null;
/**
*
* @return boolean false
*/
-
function isReadOnly($args)
{
return false;
* @param $args
* @return string title
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function checkLogin($user_id=null, $token=null)
{
// XXX: login throttle
*
* @return void
*/
-
function showForm($error=null)
{
$this->error = $error;
*
* @return string title of the page
*/
-
function title()
{
return _('Login');
*
* @return void
*/
-
function showPageNotice()
{
if ($this->error) {
*
* @return void
*/
-
function showContent()
{
$this->elementStart('form', array('method' => 'post',
*
* @return void
*/
-
function getInstructions()
{
if (common_logged_in() && !common_is_real_login() &&
*
* @return void
*/
-
function showLocalNav()
{
$nav = new LoginGroupNav($this);
'Try again, please.'));
return;
}
-
}
}
*
* @return string Title of the page
*/
-
function title()
{
// TRANS: Title for OAuth connection settings.
*
* @return instructions for use
*/
-
function getInstructions()
{
// TRANS: Instructions for OAuth connection settings.
$proxy_args = $r->map($path);
if (!$proxy_args) {
- $this->serverError(_("$path not found."), 404);
+ $this->serverError(sprintf(_('"%s" not found.'),$path), 404);
}
$oembed=array();
$oembed['version']='1.0';
$id = $proxy_args['notice'];
$notice = Notice::staticGet($id);
if(empty($notice)){
- $this->serverError(_("Notice $id not found."), 404);
+ $this->serverError(sprintf(_("Notice %s not found."),$id), 404);
}
$profile = $notice->getProfile();
if (empty($profile)) {
$id = $proxy_args['attachment'];
$attachment = File::staticGet($id);
if(empty($attachment)){
- $this->serverError(_("Attachment $id not found."), 404);
+ $this->serverError(sprintf(_('Attachment %s not found.'),$id), 404);
}
if(empty($attachment->filename) && $file_oembed = File_oembed::staticGet('file_id', $attachment->id)){
// Proxy the existing oembed information
if($attachment->title) $oembed['title']=$attachment->title;
break;
default:
- $this->serverError(_("$path not supported for oembed requests."), 501);
+ $this->serverError(sprintf(_('"%s" not supported for oembed requests.'),$path), 501);
}
switch($args['format']){
case 'xml':
$user->query('COMMIT');
+ // TRANS: Confirmation message after saving preferences.
$this->showForm(_('Preferences saved.'), true);
}
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
* @link http://status.net/
* @see MailboxAction
*/
-
class OutboxAction extends MailboxAction
{
/**
*
* @return string page title
*/
-
function title()
{
if ($this->page > 1) {
+ // TRANS: Title for outbox for any but the fist page.
+ // TRANS: %1$s is the user nickname, %2$d is the page number.
return sprintf(_('Outbox for %1$s - page %2$d'),
$this->user->nickname, $page);
} else {
+ // TRANS: Title for first page of outbox.
return sprintf(_('Outbox for %s'), $this->user->nickname);
}
}
*
* @see MailboxAction::getMessages()
*/
-
function getMessages()
{
$message = new Message();
*
* @return string localised instructions for using the page
*/
-
function getInstructions()
{
+ // TRANS: Instructions for outbox.
return _('This is your outbox, which lists private messages you have sent.');
}
}
{
return $this->message->getTo();
}
-}
\ No newline at end of file
+}
}
$this->elementStart('li');
$this->password('newpassword', _('New password'),
- _('6 or more characters'));
+ _('6 or more characters.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->password('confirm', _('Confirm'),
- _('Same as password above'));
+ _('Same as password above.'));
$this->elementEnd('li');
$this->elementEnd('ul');
*
* @return void
*/
-
function handlePost()
{
// CSRF protection
}
if (!$user->update($original)) {
- $this->serverError(_('Can\'t save new password.'));
+ $this->serverError(_('Cannot save new password.'));
return;
}
Event::handle('EndChangePassword', array($user));
$this->input('tags', _('Tags'),
($this->arg('tags')) ? $this->arg('tags') : implode(' ', $user->getSelfTags()),
// TRANS: Tooltip for field label in form for profile settings.
- _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated'));
+ _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated.'));
$this->elementEnd('li');
$this->elementStart('li');
$language = common_language();
// TRANS: Dropdownlist label in form for profile settings.
$this->dropdown('language', _('Language'),
// TRANS: Tooltip for dropdown list label in form for profile settings.
- get_nice_language_list(), _('Preferred language'),
+ get_nice_language_list(), _('Preferred language.'),
false, $language);
$this->elementEnd('li');
$timezone = common_timezone();
$this->checkbox('autosubscribe',
// TRANS: Checkbox label in form for profile settings.
_('Automatically subscribe to whoever '.
- 'subscribes to me (best for non-humans)'),
+ 'subscribes to me (best for non-humans).'),
($this->arg('autosubscribe')) ?
$this->boolean('autosubscribe') : $user->autosubscribe);
$this->elementEnd('li');
if (!common_valid_profile_tag($tag)) {
// TRANS: Validation error in form for profile settings.
// TRANS: %s is an invalid tag.
- $this->showForm(sprintf(_('Invalid tag: "%s"'), $tag));
+ $this->showForm(sprintf(_('Invalid tag: "%s".'), $tag));
return;
}
}
// TRANS: Title for password recovery page in email sent mode.
case 'sent': return _('Password recovery requested');
// TRANS: Title for password recovery page in password saved mode.
- case 'saved': return _('Password saved.');
+ case 'saved': return _('Password saved');
default:
// TRANS: Title for password recovery page when an unknown action has been specified.
return _('Unknown action');
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class RegisterAction extends Action
{
/**
* Has there been an error?
*/
-
var $error = null;
/**
* Have we registered?
*/
-
var $registered = false;
/**
* Are we processing an invite?
*/
-
var $invite = null;
/**
* @param $args
* @return string title
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return string title
*/
-
function title()
{
if ($this->registered) {
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function tryRegister()
{
if (Event::handle('StartRegistrationTry', array($this))) {
$email = common_canonical_email($email);
if (!$this->boolean('license')) {
- $this->showForm(_('You can\'t register if you don\'t '.
+ $this->showForm(_('You cannot register if you don\'t '.
'agree to the license.'));
} else if ($email && !Validate::email($email, common_config('email', 'check_domain'))) {
$this->showForm(_('Not a valid email address.'));
*
* @return boolean true if the nickname already exists
*/
-
function nicknameExists($nickname)
{
$user = User::staticGet('nickname', $nickname);
*
* @return boolean true if the address already exists
*/
-
function emailExists($email)
{
$email = common_canonical_email($email);
*
* @return void
*/
-
function showPageNotice()
{
if ($this->registered) {
common_markup_to_html(_('With this form you can create '.
'a new account. ' .
'You can then post notices and '.
- 'link up to friends and colleagues. '));
+ 'link up to friends and colleagues.'));
$this->elementStart('div', 'instructions');
$this->raw($instr);
*
* @return void
*/
-
function showForm($error=null)
{
$this->error = $error;
*
* @return void
*/
-
function showContent()
{
if ($this->registered) {
*
* @return void
*/
-
function showFormContent()
{
$code = $this->trimmed('code');
if ($this->invite && $this->invite->address_type == 'email') {
$this->input('email', _('Email'), $this->invite->address,
_('Used only for updates, announcements, '.
- 'and password recovery'));
+ 'and password recovery.'));
} else {
$this->input('email', _('Email'), $this->trimmed('email'),
_('Used only for updates, announcements, '.
- 'and password recovery'));
+ 'and password recovery.'));
}
$this->elementEnd('li');
$this->elementStart('li');
$this->input('fullname', _('Full name'),
$this->trimmed('fullname'),
- _('Longer name, preferably your "real" name'));
+ _('Longer name, preferably your "real" name.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('homepage', _('Homepage'),
$this->trimmed('homepage'),
_('URL of your homepage, blog, '.
- 'or profile on another site'));
+ 'or profile on another site.'));
$this->elementEnd('li');
$this->elementStart('li');
$maxBio = Profile::maxBio();
$this->input('location', _('Location'),
$this->trimmed('location'),
_('Where you are, like "City, '.
- 'State (or Region), Country"'));
+ 'State (or Region), Country".'));
$this->elementEnd('li');
Event::handle('EndRegistrationFormData', array($this));
$this->elementStart('li', array('id' => 'settings_rememberme'));
switch (common_config('license', 'type')) {
case 'private':
// TRANS: Copyright checkbox label in registration dialog, for private sites.
+ // TRANS: %1$s is the StatusNet sitename.
$out .= htmlspecialchars(sprintf(
_('I understand that content and data of %1$s are private and confidential.'),
common_config('site', 'name')));
*
* @return void
*/
-
function showSuccess()
{
$this->registered = true;
*
* @return void
*/
-
function showSuccessContent()
{
$nickname = $this->arg('nickname');
*
* @return void
*/
-
function showLocalNav()
{
$nav = new LoginGroupNav($this);
$nav->show();
}
}
-
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
$this->input('nickname', _('User nickname'), $this->nickname,
- _('Nickname of the user you want to follow'));
+ _('Nickname of the user you want to follow.'));
$this->elementEnd('li');
$this->elementStart('li');
$this->input('profile_url', _('Profile URL'), $this->profile_url,
- _('URL of your profile on another compatible microblogging service'));
+ _('URL of your profile on another compatible microblogging service.'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', _('Subscribe'));
}
if (!common_valid_http_url($this->profile_url)) {
- $this->showForm(_('Invalid profile URL (bad format)'));
+ $this->showForm(_('Invalid profile URL (bad format).'));
return;
}
function title()
{
// TRANS: Page title for page where a user account can be restored from backup.
- return _("Restore account");
+ return _('Restore account');
}
/**
* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class RsdAction extends Action
{
/**
* Optional attribute for the personal rsd.xml file.
*/
-
var $user = null;
/**
*
* @return boolean success flag
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return nothing
*/
-
function handle($args)
{
header('Content-Type: application/rsd+xml');
*
* @return string date of last change of this page
*/
-
function lastModified()
{
if (!empty($this->user)) {
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string API root URI for this site
*/
-
private function _apiRoot()
{
if (common_config('site', 'fancy')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ShowApplicationAction extends OwnerDesignAction
{
/**
* Application to show
*/
-
var $application = null;
/**
* User who owns the app
*/
-
var $owner = null;
var $msg = null;
*
* @return success flag
*/
-
function prepare($args)
{
parent::prepare($args);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return string title of the page
*/
-
function title()
{
if (!empty($this->application->name)) {
*
* @return void
*/
-
function showScripts()
{
parent::showScripts();
* XXX: Should this be moved to its own page with a confirm?
*
*/
-
function resetKey()
{
$this->application->query('BEGIN');
$this->msg = ('Consumer key and secret reset.');
$this->showPage();
}
-
}
* show the avatar of the notice's author
*
* We use the larger size for single notice page.
- *
+ *
* @return void
*/
return sprintf(_('%1$s tagged %2$s'), $base, $this->tag);
} else {
// TRANS: Page title showing tagged notices in one user's stream.
- // TRANS: %1$s is the username, %2$s is the hash tag, %1$d is the page number.
+ // TRANS: %1$s is the username, %2$s is the hash tag, %3$d is the page number.
return sprintf(_('%1$s tagged %2$s, page %3$d'), $base, $this->tag, $this->page);
}
} else {
if (!$result) {
// TRANS: Server error displayed when saving a site-wide notice was impossible.
- $this->ServerError(_("Unable to save site notice."));
+ $this->ServerError(_('Unable to save site notice.'));
}
}
'submit',
null,
// TRANS: Title for button to save site notice in admin panel.
- _('Save site notice')
+ _('Save site notice.')
);
}
}
($this->arg('sms')) ? $this->arg('sms') : null,
// TRANS: SMS phone number input field instructions in SMS settings form.
_('Phone number, no punctuation or spaces, '.
- 'with area code'));
+ 'with area code.'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->carrierSelect();
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
- $this->serverError(_("Could not update user record."));
+ // TRANS: Server error displayed when the user could not be updated in SMS settings.
+ $this->serverError(_('Could not update user record.'));
}
+ // TRANS: Confirmation text after updating SMS settings.
$this->showForm(_('Incoming email address removed.'), true);
}
if (!$user->updateKeys($orig)) {
common_log_db_error($user, 'UPDATE', __FILE__);
- $this->serverError(_("Could not update user record."));
+ // TRANS: Server error displayed when the user could not be updated in SMS settings.
+ $this->serverError(_('Could not update user record.'));
}
+ // TRANS: Confirmation text after updating SMS settings.
$this->showForm(_('New incoming email address added.'), true);
}
}
sprintf(
// TRANS: Client error displayed when trying to set a non-existing user as default subscription for new
// TRANS: users in user admin panel. %1$s is the invalid nickname.
- _('Invalid default subscripton: \'%1$s\' is not a user.'),
+ _('Invalid default subscripton: "%1$s" is not a user.'),
$values['newuser']['default']
)
);
'submit',
null,
// TRANS: Title for button to save user settings in user admin panel.
- _('Save user settings'));
+ _('Save user settings.'));
}
}
require_once INSTALLDIR.'/extlib/libomb/profile.php';
define('TIMESTAMP_THRESHOLD', 300);
+// @todo FIXME: Missing documentation.
class UserauthorizationAction extends Action
{
var $error;
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
+ // TRANS: Server error displayed when trying to authorise a remote subscription request
+ // TRANS: while the user has no profile.
$this->serverError(_('User without matching profile.'));
return;
}
function title()
{
+ // TRANS: Page title.
return _('Authorize subscription');
}
function showPageNotice()
{
+ // TRANS: Page notice on "Auhtorize 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 ' .
'to subscribe to someone’s notices, '.
- 'click “Reject”.'));
+ 'click "Reject".'));
}
function showContent()
$this->elementStart('div', 'entity_profile vcard');
$this->elementStart('dl', 'entity_depiction');
+ // TRANS: DT element on Authorise Subscription page.
$this->element('dt', null, _('Photo'));
$this->elementStart('dd');
if ($avatar) {
$this->elementEnd('dl');
$this->elementStart('dl', 'entity_nickname');
+ // TRANS: DT element on Authorise Subscription page.
$this->element('dt', null, _('Nickname'));
$this->elementStart('dd');
$hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname';
}
if (!is_null($location)) {
$this->elementStart('dl', 'entity_location');
+ // TRANS: DT element on Authorise Subscription page.
$this->element('dt', null, _('Location'));
$this->elementStart('dd', 'label');
$this->raw($location);
if (!is_null($homepage)) {
$this->elementStart('dl', 'entity_url');
+ // TRANS: DT element on Authorise Subscription page.
$this->element('dt', null, _('URL'));
$this->elementStart('dd');
$this->elementStart('a', array('href' => $homepage,
if (!is_null($bio)) {
$this->elementStart('dl', 'entity_note');
+ // TRANS: DT element on Authorise Subscription page where bio is displayed.
$this->element('dt', null, _('Note'));
$this->elementStart('dd', 'note');
$this->raw($bio);
if (!is_null($license)) {
$this->elementStart('dl', 'entity_license');
+ // TRANS: DT element on Authorise Subscription page where license is displayed.
$this->element('dt', null, _('License'));
$this->elementStart('dd', 'license');
$this->element('a', array('href' => $license,
'userauthorization')));
$this->hidden('token', common_session_token());
- $this->submit('accept', _('Accept'), 'submit accept', null,
- _('Subscribe to this user'));
- $this->submit('reject', _('Reject'), 'submit reject', null,
- _('Reject this subscription'));
+ // TRANS: Button text on Authorise Subscription page.
+ $this->submit('accept', _m('BUTTON','Accept'), 'submit accept', null,
+ // TRANS: Title for button on Authorise Subscription page.
+ _('Subscribe to this user.'));
+ // TRANS: Button text on Authorise Subscription page.
+ $this->submit('reject', _m('BUTTON','Reject'), 'submit reject', null,
+ // TRANS: Title for button on Authorise Subscription page.
+ _('Reject this subscription.'));
$this->elementEnd('form');
$this->elementEnd('li');
$this->elementEnd('ul');
$srv = $this->getStoredParams();
if (is_null($srv)) {
+ // TRANS: Client error displayed for an empty authorisation request.
$this->clientError(_('No authorization request!'));
return;
}
function showAcceptMessage($tok)
{
+ // 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,
_('The subscription has been authorized, but no '.
'callback URL was passed. Check with the site’s ' .
function showRejectMessage()
{
+ // TRANS: Reject message header from Authorise subscription page.
common_show_header(_('Subscription rejected'));
+ // TRANS: Reject message from Authorise subscription page.
$this->element('p', null,
_('The subscription has been rejected, but no '.
'callback URL was passed. Check with the site’s ' .
$user = User::staticGet('uri', $listener);
if (!$user) {
- throw new Exception(sprintf(_('Listener URI ‘%s’ not found here.'),
+ // TRANS: Exception thrown when no valid user is found for an authorisation request.
+ // TRANS: %s is a listener URI.
+ throw new Exception(sprintf(_('Listener URI "%s" not found here.'),
$listener));
}
if (strlen($listenee) > 255) {
- throw new Exception(sprintf(_('Listenee URI ‘%s’ is too long.'),
+ // TRANS: Exception thrown when listenee URI is too long for an authorisation request.
+ // TRANS: %s is a listenee URI.
+ throw new Exception(sprintf(_('Listenee URI "%s" is too long.'),
$listenee));
}
$other = User::staticGet('uri', $listenee);
if ($other) {
- throw new Exception(sprintf(_('Listenee URI ‘%s’ is a local user.'),
+ // TRANS: Exception thrown when listenee URI is a local user for an authorisation request.
+ // TRANS: %s is a listenee URI.
+ throw new Exception(sprintf(_('Listenee URI "%s" is a local user.'),
$listenee));
}
$sub->subscriber = $user->id;
$sub->subscribed = $remote->id;
if ($sub->find(true)) {
+ // TRANS: Exception thrown when already subscribed.
throw new Exception('You are already subscribed to this user.');
}
}
if ($profile == common_profile_url($nickname)) {
- throw new Exception(sprintf(_('Profile URL ‘%s’ is for a local user.'),
+ // TRANS: Exception thrown when profile URL is a local user for an authorisation request.
+ // TRANS: %s is a profile URL.
+ throw new Exception(sprintf(_('Profile URL "%s" is for a local user.'),
$profile));
}
$license = $_GET['omb_listenee_license'];
$site_license = common_config('license', 'url');
if (!common_compatible_license($license, $site_license)) {
- throw new Exception(sprintf(_('Listenee stream license ‘%1$s’ is not ' .
- 'compatible with site license ‘%2$s’.'),
+ // TRANS: Exception thrown when licenses are not compatible for an authorisation request.
+ // TRANS: %1$s is the license for the listenee, %2$s is the license for "this" StatusNet site.
+ throw new Exception(sprintf(_('Listenee stream license "%1$s" is not ' .
+ 'compatible with site license "%2$s".'),
$license, $site_license));
}
$avatar = $_GET['omb_listenee_avatar'];
if ($avatar) {
if (!common_valid_http_url($avatar) || strlen($avatar) > 255) {
- throw new Exception(sprintf(_('Avatar URL ‘%s’ is not valid.'),
+ // TRANS: Exception thrown when avatar URL is invalid for an authorisation request.
+ // TRANS: %s is an avatar URL.
+ throw new Exception(sprintf(_('Avatar URL "%s" is not valid.'),
$avatar));
}
$size = @getimagesize($avatar);
if (!$size) {
- throw new Exception(sprintf(_('Can’t read avatar URL ‘%s’.'),
+ // TRANS: Exception thrown when avatar URL could not be read for an authorisation request.
+ // TRANS: %s is an avatar URL.
+ throw new Exception(sprintf(_('Cannot read avatar URL "%s".'),
$avatar));
}
if (!in_array($size[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG,
IMAGETYPE_PNG))) {
+ // TRANS: Exception thrown when avatar URL return an invalid image type for an authorisation request.
+ // TRANS: %s is an avatar URL.
throw new Exception(sprintf(_('Wrong image type for avatar URL '.
- '‘%s’.'), $avatar));
+ '"%s".'), $avatar));
}
}
}
}
if (!$this->user) {
- $this->clientError(_m('No such user.'), 404);
+ $this->clientError(_('No such user.'), 404);
return false;
}