X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ftagprofile.php;h=4305f4bc885f45643b13941d4fb79b1463601a2c;hb=c2db2483a0e315f0050710bf6f224b2be3290039;hp=8c0e039dd6029dd1499fb53501c1f4a806b27744;hpb=bf121a695a13c2b30abf57ea86afbe1e6c2420a7;p=quix0rs-gnu-social.git diff --git a/actions/tagprofile.php b/actions/tagprofile.php index 8c0e039dd6..4305f4bc88 100644 --- a/actions/tagprofile.php +++ b/actions/tagprofile.php @@ -44,6 +44,7 @@ class TagprofileAction extends Action $this->profile = Profile::staticGet('id', $id); if (!$this->profile) { + // TRANS: Client error displayed when referring to non-existing profile ID. $this->clientError(_('No profile with that ID.')); return false; } @@ -51,6 +52,7 @@ class TagprofileAction extends Action $current = common_current_user()->getProfile(); if ($this->profile && !$current->canTag($this->profile)) { + // TRANS: Client error displayed when trying to tag a user that cannot be tagged. $this->clientError(_('You cannot tag this user.')); } return true; @@ -72,9 +74,12 @@ class TagprofileAction extends Action function title() { if (!$this->profile) { - return _('Tag a profile'); + // TRANS: Title for list form when not on a profile page. + return _('List a profile'); } - return sprintf(_('Tag %s'), $this->profile->nickname); + // TRANS: Title for list form when on a profile page. + // TRANS: %s is a profile nickname. + return sprintf(_m('ADDTOLIST','List %s'), $this->profile->nickname); } function showForm($error=null) @@ -83,7 +88,8 @@ class TagprofileAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Error')); + // TRANS: Title for list form when an error has occurred. + $this->element('title', null, _m('TITLE','Error')); $this->elementEnd('head'); $this->elementStart('body'); $this->element('p', 'error', $error); @@ -98,6 +104,7 @@ class TagprofileAction extends Action { if (Event::handle('StartShowTagProfileForm', array($this, $this->profile)) && $this->profile) { $this->elementStart('div', 'entity_profile vcard author'); + // TRANS: Header in list form. $this->element('h2', null, _('User profile')); $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); @@ -140,7 +147,8 @@ class TagprofileAction extends Action 'action' => common_local_url('tagprofile', array('id' => $this->profile->id)))); $this->elementStart('fieldset'); - $this->element('legend', null, _('Tag user')); + // TRANS: Fieldset legend for list form. + $this->element('legend', null, _('List user')); $this->hidden('token', common_session_token()); $this->hidden('id', $this->profile->id); @@ -150,12 +158,15 @@ class TagprofileAction extends Action $this->elementStart('li'); $tags = Profile_tag::getTagsArray($user->id, $this->profile->id, $user->id); - $this->input('tags', _('Tags'), + // TRANS: Field label on list form. + $this->input('tags', _m('LABEL','Lists'), ($this->arg('tags')) ? $this->arg('tags') : implode(' ', $tags), - _('Tags for this user (letters, numbers, -, ., and _), comma- or space- separated')); + // TRANS: Field title on list form. + _('Lists for this user (letters, numbers, -, ., and _), comma- or space- separated.')); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->submit('save', _('Save')); + // TRANS: Button text to save lists. + $this->submit('save', _m('BUTTON','Save')); $this->elementEnd('fieldset'); $this->elementEnd('form'); @@ -171,6 +182,7 @@ class TagprofileAction extends Action if (Event::handle('StartSavePeopletags', array($this, $tagstring))) { if (!$token || $token != common_session_token()) { + // TRANS: Client error displayed when the session token does not match or is not given. $this->showForm(_('There was a problem with your session token. '. 'Try again, please.')); return; @@ -188,7 +200,9 @@ class TagprofileAction extends Action $tag = common_canonical_tag($tag); if (!common_valid_profile_tag($tag)) { - $this->showForm(sprintf(_('Invalid tag: "%s"'), $tag)); + // TRANS: Form validation error displayed if a given tag is invalid. + // TRANS: %s is the invalid tag. + $this->showForm(sprintf(_('Invalid tag: "%s".'), $tag)); return; } @@ -211,7 +225,7 @@ class TagprofileAction extends Action if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); $this->elementStart('head'); - $this->element('title', null, _('Tags')); + $this->element('title', null, _m('TITLE','Tags')); $this->elementEnd('head'); $this->elementStart('body'); @@ -226,7 +240,8 @@ class TagprofileAction extends Action $this->elementEnd('body'); $this->elementEnd('html'); } else { - $this->error = 'Tags saved.'; + // TRANS: Success message if lists are saved. + $this->error = _('Lists saved.'); $this->showForm(); } @@ -241,9 +256,9 @@ class TagprofileAction extends Action } else { $this->elementStart('div', 'instructions'); $this->element('p', null, - _('Use this form to add tags to your subscribers or subscriptions.')); + // TRANS: Page notice. + _('Use this form to add your subscribers or subscriptions to lists.')); $this->elementEnd('div'); } } } -