$this->clientError(
_(
'You must specify a parameter named ' .
- '\'device\' with a value of one of: sms, im, none'
+ '\'device\' with a value of one of: sms, im, none.'
)
);
return;
if (!$valid) {
$this->clientError(
- sprintf(_('Invalid alias: "%s"'), $alias),
+ sprintf(_('Invalid alias: "%s".'), $alias),
403,
$this->format
);
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
}
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
parent::handle($args);
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
common_redirect(common_local_url('ApiGroupShow', $args), 301);
} else {
$this->clientError(
- _('Group not found!'),
+ _('Group not found.'),
404,
$this->format
);
$reply_to = $this->in_reply_to_status_id;
} else {
$this->clientError(
- _('Not found'),
+ _('Not found.'),
$code = 404,
$this->format
);
parent::handle($args);
if (empty($this->group)) {
- $this->clientError(_('Group not found!'), 404, $this->format);
+ $this->clientError(_('Group not found.'), 404, $this->format);
return false;
}
assert(!empty($cur)); // checked by parent
if ($cur->hasBlocked($this->profile)) {
- $this->clientError(_("You already blocked that user."));
+ $this->clientError(_('You already blocked that user.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::DELETEUSER)) {
- $this->clientError(_("You cannot delete users."));
+ $this->clientError(_('You cannot delete users.'));
return false;
}
$this->user = User::staticGet('id', $this->profile->id);
if (empty($this->user)) {
- $this->clientError(_("You can only delete local users."));
+ $this->clientError(_('You can only delete local users.'));
return false;
}
{
if (!empty($values['logo']) &&
!Validate::uri($values['logo'], array('allowed_schemes' => array('http', 'https')))) {
- $this->clientError(_("Invalid logo URL."));
+ $this->clientError(_('Invalid logo URL.'));
}
if (!in_array($values['theme'], Theme::listAvailable())) {
- $this->clientError(sprintf(_("Theme not available: %s"), $values['theme']));
+ $this->clientError(sprintf(_("Theme not available: %s."), $values['theme']));
}
}
$notice = Notice::staticGet($id);
$token = $this->trimmed('token-'.$notice->id);
if (!$token || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return;
}
$fave = new Fave();
$notice = Notice::staticGet($id);
$token = $this->trimmed('token-'.$notice->id);
if (!$token || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return;
}
if ($user->hasFave($notice)) {
$this->role = $this->arg('role');
if (!Profile_role::isValid($this->role)) {
- $this->clientError(_("Invalid role."));
+ $this->clientError(_('Invalid role.'));
return false;
}
if (!Profile_role::isSettable($this->role)) {
- $this->clientError(_("This role is reserved and cannot be set."));
+ $this->clientError(_('This role is reserved and cannot be set.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::GRANTROLE)) {
- $this->clientError(_("You cannot grant user roles on this site."));
+ $this->clientError(_('You cannot grant user roles on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->hasRole($this->role)) {
- $this->clientError(_("User already has this role."));
+ $this->clientError(_('User already has this role.'));
return false;
}
if (!common_config('invite', 'enabled')) {
$this->clientError(_('Invites have been disabled.'));
} else if (!common_logged_in()) {
- $this->clientError(sprintf(_('You must be logged in to invite other users to use %s'),
+ $this->clientError(sprintf(_('You must be logged in to invite other users to use %s.'),
common_config('site', 'name')));
return;
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$notice = $user->getCurrentNotice();
if (!$notice) {
- $this->clientError(_('No current status'), 404);
+ $this->clientError(_('No current status.'), 404);
}
header('Content-Type: text/plain');
if (!$result) {
common_log_db_error($orig, 'DELETE', __FILE__);
- $this->clientError(_('Unable to revoke access for app: ' . $app->id));
+ $this->clientError(sprintf(_('Unable to revoke access for app: %s.'), $app->id));
return false;
}
function showEmptyListMessage()
{
- $message = sprintf(_('You have not authorized any applications to use your account.'));
+ $message = _('You have not authorized any applications to use your account.');
$this->elementStart('div', 'guide');
$this->raw(common_markup_to_html($message));
// Validate theme dir
if (!empty($values['theme']['dir']) && !is_readable($values['theme']['dir'])) {
- $this->clientError(sprintf(_("Theme directory not readable: %s"), $values['theme']['dir']));
+ $this->clientError(sprintf(_("Theme directory not readable: %s."), $values['theme']['dir']));
}
// Validate avatar dir
if (empty($values['avatar']['dir']) || !is_writable($values['avatar']['dir'])) {
- $this->clientError(sprintf(_("Avatar directory not writable: %s"), $values['avatar']['dir']));
+ $this->clientError(sprintf(_("Avatar directory not writable: %s."), $values['avatar']['dir']));
}
// Validate background dir
if (empty($values['background']['dir']) || !is_writable($values['background']['dir'])) {
- $this->clientError(sprintf(_("Background directory not writable: %s"), $values['background']['dir']));
+ $this->clientError(sprintf(_("Background directory not writable: %s."), $values['background']['dir']));
}
// Validate locales dir
// XXX: What else do we need to validate for lacales path here? --Z
if (!empty($values['site']['locale_path']) && !is_readable($values['site']['locale_path'])) {
- $this->clientError(sprintf(_("Locales directory not readable: %s"), $values['site']['locale_path']));
+ $this->clientError(sprintf(_("Locales directory not readable: %s."), $values['site']['locale_path']));
}
// Validate SSL setup
if (mb_strlen($values['site']['sslserver']) > 255) {
- $this->clientError(_("Invalid SSL server. The maximum length is 255 characters."));
+ $this->clientError(_('Invalid SSL server. The maximum length is 255 characters.'));
}
}
$this->tag = $this->trimmed('tag');
if (!common_valid_profile_tag($this->tag)) {
- $this->clientError(sprintf(_('Not a valid people tag: %s'),
+ $this->clientError(sprintf(_('Not a valid people tag: %s.'),
$this->tag));
return;
}
{
$content = common_shorten_links($_POST['omb_notice_content']);
if (Notice::contentTooLong($content)) {
- $this->clientError(_('Invalid notice content'), 400);
+ $this->clientError(_('Invalid notice content.'), 400);
return false;
}
$license = $_POST['omb_notice_license'];
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
if ($this->page > MAX_PUBLIC_PAGE) {
- $this->clientError(sprintf(_("Beyond the page limit (%s)"), MAX_PUBLIC_PAGE));
+ $this->clientError(sprintf(_("Beyond the page limit (%s)."), MAX_PUBLIC_PAGE));
}
common_set_returnto($this->selfUrl());
$this->user = common_current_user();
if (empty($this->user)) {
- $this->clientError(_("Only logged-in users can repeat notices."));
+ $this->clientError(_('Only logged-in users can repeat notices.'));
return false;
}
$id = $this->trimmed('notice');
if (empty($id)) {
- $this->clientError(_("No notice specified."));
+ $this->clientError(_('No notice specified.'));
return false;
}
$this->notice = Notice::staticGet('id', $id);
if (empty($this->notice)) {
- $this->clientError(_("No notice specified."));
+ $this->clientError(_('No notice specified.'));
return false;
}
$token = $this->trimmed('token-'.$id);
if (empty($token) || $token != common_session_token()) {
- $this->clientError(_("There was a problem with your session token. Try again, please."));
+ $this->clientError(_('There was a problem with your session token. Try again, please.'));
return false;
}
$profile = $this->user->getProfile();
if ($profile->hasRepeated($id)) {
- $this->clientError(_("You already repeated that notice."));
+ $this->clientError(_('You already repeated that notice.'));
return false;
}
$this->role = $this->arg('role');
if (!Profile_role::isValid($this->role)) {
- $this->clientError(_("Invalid role."));
+ $this->clientError(_('Invalid role.'));
return false;
}
if (!Profile_role::isSettable($this->role)) {
- $this->clientError(_("This role is reserved and cannot be set."));
+ $this->clientError(_('This role is reserved and cannot be set.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::REVOKEROLE)) {
- $this->clientError(_("You cannot revoke user roles on this site."));
+ $this->clientError(_('You cannot revoke user roles on this site.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SANDBOXUSER)) {
- $this->clientError(_("You cannot sandbox users on this site."));
+ $this->clientError(_('You cannot sandbox users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSandboxed()) {
- $this->clientError(_("User is already sandboxed."));
+ $this->clientError(_('User is already sandboxed.'));
return false;
}
$this->profile = $this->notice->getProfile();
if (empty($this->profile)) {
- $this->serverError(_('Notice has no profile'), 500);
+ $this->serverError(_('Notice has no profile.'), 500);
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SILENCEUSER)) {
- $this->clientError(_("You cannot silence users on this site."));
+ $this->clientError(_('You cannot silence users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSilenced()) {
- $this->clientError(_("User is already silenced."));
+ $this->clientError(_('User is already silenced.'));
return false;
}
// Validate site name
if (empty($values['site']['name'])) {
- $this->clientError(_("Site name must have non-zero length."));
+ $this->clientError(_('Site name must have non-zero length.'));
}
// Validate email
// Validate dupe limit
if (!Validate::number($values['site']['dupelimit'], array('min' => 1))) {
- $this->clientError(_("Dupe limit must 1 or more seconds."));
+ $this->clientError(_("Dupe limit must be one or more seconds."));
}
}
if (mb_strlen($siteNotice) > 255) {
$this->clientError(
- _('Max length for the site-wide notice is 255 chars')
+ _('Max length for the site-wide notice is 255 chars.')
);
}
// Validate snapshot run value
if (!in_array($values['snapshot']['run'], array('web', 'cron', 'never'))) {
- $this->clientError(_("Invalid snapshot run value."));
+ $this->clientError(_('Invalid snapshot run value.'));
}
// Validate snapshot frequency value
if (!Validate::number($values['snapshot']['frequency'])) {
- $this->clientError(_("Snapshot frequency must be a number."));
+ $this->clientError(_('Snapshot frequency must be a number.'));
}
// Validate report URL
array('allowed_schemes' => array('http', 'https')
)
)) {
- $this->clientError(_("Invalid snapshot report URL."));
+ $this->clientError(_('Invalid snapshot report URL.'));
}
}
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SANDBOXUSER)) {
- $this->clientError(_("You cannot sandbox users on this site."));
+ $this->clientError(_('You cannot sandbox users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if (!$this->profile->isSandboxed()) {
- $this->clientError(_("User is not sandboxed."));
+ $this->clientError(_('User is not sandboxed.'));
return false;
}
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SILENCEUSER)) {
- $this->clientError(_("You cannot silence users on this site."));
+ $this->clientError(_('You cannot silence users on this site.'));
return false;
}
assert(!empty($this->profile)); // checked by parent
if (!$this->profile->isSilenced()) {
- $this->clientError(_("User is not silenced."));
+ $this->clientError(_('User is not silenced.'));
return false;
}
$other_id = $this->arg('unsubscribeto');
if (!$other_id) {
- $this->clientError(_('No profile id in request.'));
+ $this->clientError(_('No profile ID in request.'));
return;
}
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return;
}
$profile = $user->getProfile();
if (!$profile) {
common_log_db_error($user, 'SELECT', __FILE__);
- $this->serverError(_('User without matching profile'));
+ $this->serverError(_('User without matching profile.'));
return null;
}
$avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);