We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4b4894b1 authored by Siebrand Mazeland's avatar Siebrand Mazeland

Many i18n/L10n updates and lots of descriptions for translators added.

parent d358c88f
......@@ -42,7 +42,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 EditApplicationAction extends OwnerDesignAction
{
var $msg = null;
......@@ -51,18 +50,19 @@ class EditApplicationAction extends OwnerDesignAction
function title()
{
return _('Edit Application');
// TRANS: Title for "Edit application" form.
return _('Edit application');
}
/**
* Prepare to run
*/
function prepare($args)
{
parent::prepare($args);
if (!common_logged_in()) {
// TRANS: Client error displayed trying to edit an application while not logged in.
$this->clientError(_('You must be logged in to edit an application.'));
return false;
}
......@@ -74,10 +74,12 @@ class EditApplicationAction extends OwnerDesignAction
$cur = common_current_user();
if ($cur->id != $this->owner->id) {
// TRANS: Client error displayed trying to edit an application while not being its owner.
$this->clientError(_('You are not the owner of this application.'), 401);
}
if (!$this->app) {
// TRANS: Client error displayed trying to edit an application that does not exist.
$this->clientError(_('No such application.'));
return false;
}
......@@ -94,7 +96,6 @@ class EditApplicationAction extends OwnerDesignAction
*
* @return void
*/
function handle($args)
{
parent::handle($args);
......@@ -115,6 +116,7 @@ class EditApplicationAction extends OwnerDesignAction
&& empty($_POST)
&& ($_SERVER['CONTENT_LENGTH'] > 0)
) {
// TRANS: Client exception. %s is CONTENT_LENGTH (in bytes).
$msg = _('The server was unable to handle that much POST ' .
'data (%s bytes) due to its current configuration.');
$this->clientException(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
......@@ -136,6 +138,7 @@ class EditApplicationAction extends OwnerDesignAction
} elseif ($this->arg('save')) {
$this->trySave();
} else {
// TRANS: Client error displayed submitting invalid form data for edit application.
$this->clientError(_('Unexpected form submission.'));
}
}
......@@ -158,6 +161,7 @@ class EditApplicationAction extends OwnerDesignAction
$this->element('p', 'error', $this->msg);
} else {
$this->element('p', 'instructions',
// TRANS: Instructions for "Edit application" form.
_('Use this form to edit your application.'));
}
}
......@@ -174,36 +178,47 @@ class EditApplicationAction extends OwnerDesignAction
$access_type = $this->arg('default_access_type');
if (empty($name)) {
// TRANS: Validation error shown when not providing a name in the "Edit application" form.
$this->showForm(_('Name is required.'));
return;
} elseif (mb_strlen($name) > 255) {
$this->showForm(_('Name is too long (max 255 chars).'));
// TRANS: Validation error shown when providing too long a name in the "Edit application" form.
$this->showForm(_('Name is too long (max 255 characters).'));
return;
} else if ($this->nameExists($name)) {
// TRANS: Validation error shown when providing a name for an application that already exists in the "Edit application" form.
$this->showForm(_('Name already in use. Try another one.'));
return;
} elseif (empty($description)) {
// TRANS: Validation error shown when not providing a description in the "Edit application" form.
$this->showForm(_('Description is required.'));
return;
} elseif (Oauth_application::descriptionTooLong($description)) {
$this->showForm(sprintf(
_('Description is too long (max %d chars).'),
// TRANS: Validation error shown when providing too long a description in the "Edit application" form.
_m('Description is too long (maximum %d character).',
'Description is too long (maximum %d characters).',
Oauth_application::maxDesc()),
Oauth_application::maxDesc()));
return;
} elseif (mb_strlen($source_url) > 255) {
// TRANS: Validation error shown when providing too long a source URL in the "Edit application" form.
$this->showForm(_('Source URL is too long.'));
return;
} elseif ((mb_strlen($source_url) > 0)
&& !Validate::uri($source_url,
array('allowed_schemes' => array('http', 'https'))))
{
// TRANS: Validation error shown when providing an invalid source URL in the "Edit application" form.
$this->showForm(_('Source URL is not valid.'));
return;
} elseif (empty($organization)) {
// TRANS: Validation error shown when not providing an organisation in the "Edit application" form.
$this->showForm(_('Organization is required.'));
return;
} elseif (mb_strlen($organization) > 255) {
$this->showForm(_('Organization is too long (max 255 chars).'));
// TRANS: Validation error shown when providing too long an arganisation name in the "Edit application" form.
$this->showForm(_('Organization is too long (maximum 255 characters).'));
return;
} elseif (empty($homepage)) {
$this->showForm(_('Organization homepage is required.'));
......@@ -212,9 +227,11 @@ class EditApplicationAction extends OwnerDesignAction
&& !Validate::uri($homepage,
array('allowed_schemes' => array('http', 'https'))))
{
// TRANS: Validation error shown when providing an invalid homepage URL in the "Edit application" form.
$this->showForm(_('Homepage is not a valid URL.'));
return;
} elseif (mb_strlen($callback_url) > 255) {
// TRANS: Validation error shown when providing too long a callback URL in the "Edit application" form.
$this->showForm(_('Callback is too long.'));
return;
} elseif (mb_strlen($callback_url) > 0
......@@ -222,6 +239,7 @@ class EditApplicationAction extends OwnerDesignAction
array('allowed_schemes' => array('http', 'https'))
))
{
// TRANS: Validation error shown when providing an invalid callback URL in the "Edit application" form.
$this->showForm(_('Callback URL is not valid.'));
return;
}
......@@ -258,6 +276,7 @@ class EditApplicationAction extends OwnerDesignAction
// the next step.
if ($result === false) {
common_log_db_error($this->app, 'UPDATE', __FILE__);
// TRANS: Server error occuring when an application could not be updated from the "Edit application" form.
$this->serverError(_('Could not update application.'));
}
......@@ -276,7 +295,6 @@ class EditApplicationAction extends OwnerDesignAction
*
* @return boolean true if the name already exists
*/
function nameExists($name)
{
$newapp = Oauth_application::staticGet('name', $name);
......@@ -286,6 +304,4 @@ class EditApplicationAction extends OwnerDesignAction
return $newapp->id != $this->app->id;
}
}
}
......@@ -36,8 +36,11 @@ class InviteAction extends CurrentUserDesignAction
{
parent::handle($args);
if (!common_config('invite', 'enabled')) {
// TRANS: Client error displayed when trying to sent invites while they have been disabled.
$this->clientError(_('Invites have been disabled.'));
} else if (!common_logged_in()) {
// TRANS: Client error displayed when trying to sent invites while not logged in.
// TRANS: %s is the StatusNet site name.
$this->clientError(sprintf(_('You must be logged in to invite other users to use %s.'),
common_config('site', 'name')));
return;
......@@ -69,7 +72,9 @@ class InviteAction extends CurrentUserDesignAction
foreach ($addresses as $email) {
$email = trim($email);
if (!Validate::email($email, common_config('email', 'check_domain'))) {
$this->showForm(sprintf(_('Invalid email address: %s'), $email));
// TRANS: Form validation message when providing an e-mail address that does not validate.
// TRANS: %s is an invalid e-mail address.
$this->showForm(sprintf(_('Invalid email address: %s.'), $email));
return;
}
}
......@@ -107,8 +112,10 @@ class InviteAction extends CurrentUserDesignAction
function title()
{
if ($this->mode == 'sent') {
return _('Invitation(s) sent');
// TRANS: Page title when invitations have been sent.
return _('Invitations sent');
} else {
// TRANS: Page title when inviting potential users.
return _('Invite new users');
}
}
......@@ -125,28 +132,48 @@ class InviteAction extends CurrentUserDesignAction
function showInvitationSuccess()
{
if ($this->already) {
$this->element('p', null, _('You are already subscribed to these users:'));
// TRANS: Message displayed inviting users to use a StatusNet site while the inviting user
// TRANS: is already subscribed to one or more users with the given e-mail address(es).
// TRANS: Plural form is based on the number of reported already subscribed e-mail addresses.
// TRANS: Followed by a bullet list.
$this->element('p', null, _m('You are already subscribed to this user:',
'You are already subscribed to these users:',
count($this->already)));
$this->elementStart('ul');
foreach ($this->already as $other) {
// TRANS: Used as list item for already subscribed users (%1$s is nickname, %2$s is e-mail address).
$this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
}
$this->elementEnd('ul');
}
if ($this->subbed) {
$this->element('p', null, _('These people are already users and you were automatically subscribed to them:'));
// TRANS: Message displayed inviting users to use a StatusNet site while the invited user
// TRANS: already uses a this StatusNet site. Plural form is based on the number of
// TRANS: reported already present people. Followed by a bullet list.
$this->element('p', null, _m('This person is already a user and you were automatically subscribed:',
'These people are already users and you were automatically subscribed to them:',
count($this->subbed)));
$this->elementStart('ul');
foreach ($this->subbed as $other) {
// TRANS: Used as list item for already registered people (%1$s is nickname, %2$s is e-mail address).
$this->element('li', null, sprintf(_('%1$s (%2$s)'), $other->nickname, $other->email));
}
$this->elementEnd('ul');
}
if ($this->sent) {
$this->element('p', null, _('Invitation(s) sent to the following people:'));
// TRANS: Message displayed inviting users to use a StatusNet site. Plural form is
// TRANS: based on the number of invitations sent. Followed by a bullet list of
// TRANS: e-mail addresses to which invitations were sent.
$this->element('p', null, _m('Invitation sent to the following person:',
'Invitations sent to the following people:',
count($this->sent)));
$this->elementStart('ul');
foreach ($this->sent as $other) {
$this->element('li', null, $other);
}
$this->elementEnd('ul');
// TRANS: Generic message displayed after sending out one or more invitations to
// TRANS: people to join a StatusNet site.
$this->element('p', null, _('You will be notified when your invitees accept the invitation and register on the site. Thanks for growing the community!'));
}
}
......@@ -159,6 +186,7 @@ class InviteAction extends CurrentUserDesignAction
} else {
$this->elementStart('div', 'instructions');
$this->element('p', null,
// TRANS: Form instructions.
_('Use this form to invite your friends and colleagues to use this service.'));
$this->elementEnd('div');
}
......@@ -179,18 +207,23 @@ class InviteAction extends CurrentUserDesignAction
'class' => 'form_settings',
'action' => common_local_url('invite')));
$this->elementStart('fieldset');
// TRANS: Form legend.
$this->element('legend', null, 'Send an invitation');
$this->hidden('token', common_session_token());
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
// TRANS: Field label for a list of e-mail addresses.
$this->textarea('addresses', _('Email addresses'),
$this->trimmed('addresses'),
// TRANS: Tooltip for field label for a list of e-mail addresses.
_('Addresses of friends to invite (one per line)'));
$this->elementEnd('li');
$this->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
$this->textarea('personal', _('Personal message'),
$this->trimmed('personal'),
// TRANS: Tooltip for field label for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.'));
$this->elementEnd('li');
$this->elementEnd('ul');
......@@ -224,10 +257,16 @@ class InviteAction extends CurrentUserDesignAction
$headers['From'] = mail_notify_from();
$headers['To'] = trim($email);
// TRANS: Subject for invitation email. Note that 'them' is correct as a gender-neutral singular 3rd-person pronoun in English.
// TRANS: Subject for invitation email. Note that 'them' is correct as a gender-neutral
// TRANS: singular 3rd-person pronoun in English. %1$s is the inviting user, $2$s is
// TRANS: the StatusNet sitename.
$headers['Subject'] = sprintf(_('%1$s has invited you to join them on %2$s'), $bestname, $sitename);
// TRANS: Body text for invitation email. Note that 'them' is correct as a gender-neutral singular 3rd-person pronoun in English.
// TRANS: Body text for invitation email. Note that 'them' is correct as a gender-neutral
// TRANS: singular 3rd-person pronoun in English. %1$s is the inviting user, %2$s is the
// TRANS: StatusNet sitename, %3$s is the site URL, %4$s is the personal message from the
// TRANS: inviting user, %s%5 a link to the timeline for the inviting user, %s$6 is a link
// TRANS: to register with the StatusNet site.
$body = sprintf(_("%1\$s has invited you to join them on %2\$s (%3\$s).\n\n".
"%2\$s is a micro-blogging service that lets you keep up-to-date with people you know and people who interest you.\n\n".
"You can also share news about yourself, your thoughts, or your life online with people who know about you. ".
......
......@@ -57,6 +57,7 @@ class ProfilesettingsAction extends AccountSettingsAction
function title()
{
// TRANS: Page title for profile settings.
return _('Profile settings');
}
......@@ -68,6 +69,7 @@ class ProfilesettingsAction extends AccountSettingsAction
function getInstructions()
{
// TRANS: Usage instructions for profile settings.
return _('You can update your personal profile info here '.
'so people know more about you.');
}
......@@ -96,6 +98,7 @@ class ProfilesettingsAction extends AccountSettingsAction
'class' => 'form_settings',
'action' => common_local_url('profilesettings')));
$this->elementStart('fieldset');
// TRANS: Profile settings form legend.
$this->element('legend', null, _('Profile information'));
$this->hidden('token', common_session_token());
......@@ -103,38 +106,54 @@ class ProfilesettingsAction extends AccountSettingsAction
$this->elementStart('ul', 'form_data');
if (Event::handle('StartProfileFormData', array($this))) {
$this->elementStart('li');
// TRANS: Field label in form for profile settings.
$this->input('nickname', _('Nickname'),
($this->arg('nickname')) ? $this->arg('nickname') : $profile->nickname,
_('1-64 lowercase letters or numbers, no punctuation or spaces'));
// TRANS: Tooltip for field label in form for profile settings.
_('1-64 lowercase letters or numbers, no punctuation or spaces.'));
$this->elementEnd('li');
$this->elementStart('li');
// TRANS: Field label in form for profile settings.
$this->input('fullname', _('Full name'),
($this->arg('fullname')) ? $this->arg('fullname') : $profile->fullname);
$this->elementEnd('li');
$this->elementStart('li');
// TRANS: Field label in form for profile settings.
$this->input('homepage', _('Homepage'),
($this->arg('homepage')) ? $this->arg('homepage') : $profile->homepage,
_('URL of your homepage, blog, or profile on another site'));
// TRANS: Tooltip for field label in form for profile settings.
_('URL of your homepage, blog, or profile on another site.'));
$this->elementEnd('li');
$this->elementStart('li');
$maxBio = Profile::maxBio();
if ($maxBio > 0) {
$bioInstr = sprintf(_('Describe yourself and your interests in %d chars'),
// TRANS: Tooltip for field label in form for profile settings. Plural
// TRANS: is decided by the number of characters available for the
// TRANS: biography (%d).
$bioInstr = sprintf(_m('Describe yourself and your interests in %d character',
'Describe yourself and your interests in %d characters',
$maxBio),
$maxBio);
} else {
// TRANS: Tooltip for field label in form for profile settings.
$bioInstr = _('Describe yourself and your interests');
}
// TRANS: Text area label in form for profile settings where users can provide.
// TRANS: their biography.
$this->textarea('bio', _('Bio'),
($this->arg('bio')) ? $this->arg('bio') : $profile->bio,
$bioInstr);
$this->elementEnd('li');
$this->elementStart('li');
// TRANS: Field label in form for profile settings.
$this->input('location', _('Location'),
($this->arg('location')) ? $this->arg('location') : $profile->location,
// TRANS: Tooltip for field label in form for profile settings.
_('Where you are, like "City, State (or Region), Country"'));
$this->elementEnd('li');
if (common_config('location', 'share') == 'user') {
$this->elementStart('li');
// TRANS: Checkbox label in form for profile settings.
$this->checkbox('sharelocation', _('Share my current location when posting notices'),
($this->arg('sharelocation')) ?
$this->arg('sharelocation') : $user->shareLocation());
......@@ -142,13 +161,17 @@ class ProfilesettingsAction extends AccountSettingsAction
}
Event::handle('EndProfileFormData', array($this));
$this->elementStart('li');
// TRANS: Field label in form for profile settings.
$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'));
$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'),
false, $language);
$this->elementEnd('li');
......@@ -158,12 +181,15 @@ class ProfilesettingsAction extends AccountSettingsAction
$timezones[$v] = $v;
}
$this->elementStart('li');
// TRANS: Dropdownlist label in form for profile settings.
$this->dropdown('timezone', _('Timezone'),
// TRANS: Tooltip for dropdown list label in form for profile settings.
$timezones, _('What timezone are you normally in?'),
true, $timezone);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('autosubscribe',
// TRANS: Checkbox label in form for profile settings.
_('Automatically subscribe to whoever '.
'subscribes to me (best for non-humans)'),
($this->arg('autosubscribe')) ?
......@@ -171,7 +197,8 @@ class ProfilesettingsAction extends AccountSettingsAction
$this->elementEnd('li');
}
$this->elementEnd('ul');
$this->submit('save', _('Save'));
// TRANS: Button to save input in profile settings.
$this->submit('save', _m('BUTTON','Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form');
......@@ -212,33 +239,46 @@ class ProfilesettingsAction extends AccountSettingsAction
if (!Validate::string($nickname, array('min_length' => 1,
'max_length' => 64,
'format' => NICKNAME_FMT))) {
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Nickname must have only lowercase letters and numbers and no spaces.'));
return;
} else if (!User::allowed_nickname($nickname)) {
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Not a valid nickname.'));
return;
} else if (!is_null($homepage) && (strlen($homepage) > 0) &&
!Validate::uri($homepage, array('allowed_schemes' => array('http', 'https')))) {
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Homepage is not a valid URL.'));
return;
} else if (!is_null($fullname) && mb_strlen($fullname) > 255) {
$this->showForm(_('Full name is too long (max 255 chars).'));
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Full name is too long (max 255 characters).'));
return;
} else if (Profile::bioTooLong($bio)) {
$this->showForm(sprintf(_('Bio is too long (max %d chars).'),
// TRANS: Validation error in form for profile settings.
// TRANS: Plural form is used based on the maximum number of allowed
// TRANS: characters for the biography (%d).
$this->showForm(sprintf(_m('Bio is too long (max %d character).',
'Bio is too long (max %d characters).',
Profile::maxBio()),
Profile::maxBio()));
return;
} else if (!is_null($location) && mb_strlen($location) > 255) {
$this->showForm(_('Location is too long (max 255 chars).'));
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Location is too long (max 255 characters).'));
return;
} else if (is_null($timezone) || !in_array($timezone, DateTimeZone::listIdentifiers())) {
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Timezone not selected.'));
return;
} else if ($this->nicknameExists($nickname)) {
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Nickname already in use. Try another one.'));
return;
} else if (!is_null($language) && strlen($language) > 50) {
$this->showForm(_('Language is too long (max 50 chars).'));
// TRANS: Validation error in form for profile settings.
$this->showForm(_('Language is too long (max 50 characters).'));
return;
}
......@@ -250,6 +290,8 @@ class ProfilesettingsAction extends AccountSettingsAction
foreach ($tags as $tag) {
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));
return;
}
......@@ -280,6 +322,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be updated.
$this->serverError(_('Couldn\'t update user.'));
return;
} else {
......@@ -303,6 +346,8 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($user, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be updated to
// TRANS: automatically subscribe to any subscriber.
$this->serverError(_('Couldn\'t update user for autosubscribe.'));
return;
}
......@@ -360,6 +405,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($prefs, ($exists) ? 'UPDATE' : 'INSERT', __FILE__);
// TRANS: Server error thrown when user profile location preference settings could not be updated.
$this->serverError(_('Couldn\'t save location prefs.'));
return;
}
......@@ -372,6 +418,7 @@ class ProfilesettingsAction extends AccountSettingsAction
if ($result === false) {
common_log_db_error($profile, 'UPDATE', __FILE__);
// TRANS: Server error thrown when user profile settings could not be saved.
$this->serverError(_('Couldn\'t save profile.'));
return;
}
......@@ -380,6 +427,7 @@ class ProfilesettingsAction extends AccountSettingsAction
$result = $user->setSelfTags($tags);
if (!$result) {
// TRANS: Server error thrown when user profile settings tags could not be saved.
$this->serverError(_('Couldn\'t save tags.'));
return;
}
......@@ -388,6 +436,7 @@ class ProfilesettingsAction extends AccountSettingsAction
Event::handle('EndProfileSaveForm', array($this));
common_broadcast_profile($profile);
// TRANS: Confirmation shown when user profile settings are saved.
$this->showForm(_('Settings saved.'), true);
}
......
......@@ -44,7 +44,6 @@ define('TAGS_PER_PAGE', 100);
* @copyright 2008-2009 StatusNet, Inc.
* @link http://status.net/
*/
class PublictagcloudAction extends Action
{
function isReadOnly($args)
......@@ -54,24 +53,37 @@ class PublictagcloudAction extends Action
function title()
{
// TRANS: Title for public tag cloud.
return _('Public tag cloud');
}
function showPageNotice()
{
$this->element('p', 'instructions',
sprintf(_('These are most popular recent tags on %s '),
// TRANS: Instructions (more used like an explanation/header).
// TRANS: %s is the StatusNet sitename.
sprintf(_('These are most popular recent tags on %s'),
common_config('site', 'name')));
}
function showEmptyList()
{
// TRANS: This message contains a Markdown URL. The link description is between
// TRANS: square brackets, and the link between parentheses. Do not separate "]("
// TRANS: and do not change the URL part.
$message = _('No one has posted a notice with a [hashtag](%%doc.tags%%) yet.') . ' ';
if (common_logged_in()) {
// TRANS: Message shown to a logged in user for the public tag cloud
// TRANS: while no tags exist yet. "One" refers to the non-existing hashtag.
$message .= _('Be the first to post one!');
}
else {
// TRANS: Message shown to a anonymous user for the public tag cloud
// TRANS: while no tags exist yet. "One" refers to the non-existing hashtag.
// TRANS: This message contains a Markdown URL. The link description is between
// TRANS: square brackets, and the link between parentheses. Do not separate "]("
// TRANS: and do not change the URL part.
$message .= _('Why not [register an account](%%action.register%%) and be the first to post one!');
}
......
......@@ -54,7 +54,6 @@ require_once INSTALLDIR.'/lib/feedlist.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
class ShowstreamAction extends ProfileAction
{
function isReadOnly($args)
......@@ -84,7 +83,6 @@ class ShowstreamAction extends ProfileAction
function handle($args)
{
// Looks like we're good; start output
// For YADIS discovery, we also have a <meta> tag
......@@ -186,7 +184,6 @@ class ShowstreamAction extends ProfileAction
$this->element('link', array('rel' => 'EditURI',
'type' => 'application/rsd+xml',
'href' => $rsd));
}
function showProfile()
......
......@@ -41,14 +41,17 @@ 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 SubscribersAction extends GalleryAction
{
function title()
{
if ($this->page == 1) {
// TRANS: Header for list of subscribers for a user (first page).
// TRANS: %s is the user's nickname.
return sprintf(_('%s subscribers'), $this->user->nickname);
} else {
// TRANS: Header for list of subscribers for a user (not first page).
// TRANS: %1$s is the user's nickname, $2$d is the page number.
return sprintf(_('%1$s subscribers, page %2$d'),
$this->user->nickname,
$this->page);
......@@ -60,10 +63,14 @@ class SubscribersAction extends GalleryAction
$user = common_current_user();
if ($user && ($user->id == $this->profile->id)) {
$this->element('p', null,
// TRANS: Page notice for page with an overview of all subscribers
// TRANS: of the logged in user's own profile.
_('These are the people who listen to '.
'your notices.'));
} else {
$this->element('p', null,
// TRANS: Page notice for page with an overview of all subscribers of a user other
// TRANS: than the logged in user. %s is the user nickname.
sprintf(_('These are the people who '.
'listen to %s\'s notices.'),
$this->profile->nickname));
......@@ -105,12 +112,20 @@ class SubscribersAction extends GalleryAction
if (common_logged_in()) {
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
$message = _('You have no subscribers. Try subscribing to people you know and they might return the favor');
// TRANS: Subscriber list text when the logged in user has no subscribers.
$message = _('You have no subscribers. Try subscribing to people you know and they might return the favor.');
} else {
// TRANS: Subscriber list text when looking at the subscribers for a of a user other
// TRANS: than the logged in user that has no subscribers. %s is the user nickname.
$message = sprintf(_('%s has no subscribers. Want to be the first?'), $this->user->nickname);
}
}
else {
// TRANS: Subscriber list text when looking at the subscribers for a of a user that has none
// TRANS: as an anonymous user. %s is the user nickname.
// TRANS: This message contains a Markdown URL. The link description is between
// TRANS: square brackets, and the link between parentheses. Do not separate "]("
// TRANS: and do not change the URL part.