$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;
}
$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;
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)
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);
{
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);
'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);
$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');
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;
$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;
}
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');
$this->elementEnd('body');
$this->elementEnd('html');
} else {
- $this->error = 'Tags saved.';
+ // TRANS: Success message if lists are saved.
+ $this->error = _('Lists saved.');
$this->showForm();
}
} 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');
}
}
}
-