X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fuserauthorization.php;h=0cb55715f9ec940f737fb4fe63ff634f32f93074;hb=01996b1a460693227ef263d44477bc12d297a70a;hp=b7192ccdb281be856f61a2bf9e009f316b892022;hpb=880b1b666eeaedee2c9570142b2d0cd56f1d96f1;p=quix0rs-gnu-social.git diff --git a/actions/userauthorization.php b/actions/userauthorization.php index b7192ccdb2..0cb55715f9 100644 --- a/actions/userauthorization.php +++ b/actions/userauthorization.php @@ -50,6 +50,7 @@ class UserauthorizationAction extends Action $token = $this->trimmed('token'); if (!$token || $token != common_session_token()) { $srv = $this->getStoredParams(); + // TRANS: Client error displayed when the session token does not match or is not given. $this->showForm($srv->getRemoteUser(), _('There was a problem ' . 'with your session token. Try again, ' . 'please.')); @@ -70,9 +71,8 @@ class UserauthorizationAction extends Action $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.')); + // TRANS: Error message displayed when referring to a user without a profile. + $this->serverError(_('User has no profile.')); return; } @@ -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 ' . 'user’s notices. If you didn’t just ask ' . @@ -133,85 +133,57 @@ class UserauthorizationAction extends Action $avatar = $params->getAvatarURL(); $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->element('img', array('src' => $avatar, - 'class' => 'photo avatar', + 'class' => 'photo avatar entity_depiction', 'width' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE, 'alt' => $nickname)); } - $this->elementEnd('dd'); - $this->elementEnd('dl'); - $this->elementStart('dl', 'entity_nickname'); - // TRANS: DT element on Authorise Subscription page. - $this->element('dt', null, _('Nickname')); - $this->elementStart('dd'); + // TRANS: Label for nickname on user authorisation page. + $this->element('div', 'entity_nickname', _('Nickname')); + $hasFN = ($fullname !== '') ? 'nickname' : 'fn nickname'; + + // XXX: why are these raw() instead of escaped...? + $this->elementStart('a', array('href' => $profile, 'class' => 'url '.$hasFN)); $this->raw($nickname); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); if (!is_null($fullname)) { - $this->elementStart('dl', 'entity_fn'); - $this->elementStart('dd'); - $this->elementStart('span', 'fn'); + $this->elementStart('div', 'fn entity_fn'); $this->raw($fullname); - $this->elementEnd('span'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); + $this->elementEnd('div'); } + 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->elementStart('div', 'label entity_location'); $this->raw($location); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } 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, - 'class' => 'url')); + 'class' => 'url entity_url')); $this->raw($homepage); $this->elementEnd('a'); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } 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->elementStart('div', 'note entity_note'); $this->raw($bio); $this->elementEnd('dd'); - $this->elementEnd('dl'); } 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, - 'class' => 'license'), + 'class' => 'license entity_license'), $license); - $this->elementEnd('dd'); - $this->elementEnd('dl'); } + $this->elementEnd('div'); $this->elementStart('div', 'entity_actions'); @@ -225,12 +197,14 @@ class UserauthorizationAction extends Action 'userauthorization'))); $this->hidden('token', common_session_token()); - // TRANS: Button text on Authorise Subscription page. - $this->submit('accept', _m('BUTTON','Accept'), 'submit accept', null, + $this->submit('accept', + // TRANS: Button text on Authorise Subscription page. + _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, + $this->submit('reject', + // TRANS: Button text on Authorise Subscription page. + _m('BUTTON','Reject'), 'submit reject', null, // TRANS: Title for button on Authorise Subscription page. _('Reject this subscription.')); $this->elementEnd('form'); @@ -269,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 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); @@ -283,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 site’s ' . + 'callback URL was passed. Check with the site\'s ' . 'instructions for details on how to fully reject ' . 'the subscription.')); common_show_footer();