summaryrefslogtreecommitdiff
path: root/plugins/AnonymousFave/anonfavor.php
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-01 21:45:19 +0200
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-01 21:45:19 +0200
commit06ca06fbd16f11e3c37d22f1f9c4b64c0089193c (patch)
tree26014e9dede6b8297805911df0ce15d89f527e62 /plugins/AnonymousFave/anonfavor.php
parent54c88cba571a74a901f2d15e7d8db0d349d896d3 (diff)
* L10/i18n review.
* Translator hints added * whitespace updates
Diffstat (limited to 'plugins/AnonymousFave/anonfavor.php')
-rw-r--r--plugins/AnonymousFave/anonfavor.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/AnonymousFave/anonfavor.php b/plugins/AnonymousFave/anonfavor.php
index 58570ced9..ad13525a0 100644
--- a/plugins/AnonymousFave/anonfavor.php
+++ b/plugins/AnonymousFave/anonfavor.php
@@ -1,5 +1,4 @@
<?php
-
/**
* Anonyous favor action
*
@@ -57,8 +56,8 @@ class AnonFavorAction extends RedirectingAction
$profile = AnonymousFavePlugin::getAnonProfile();
if (empty($profile) || $_SERVER['REQUEST_METHOD'] != 'POST') {
- $this->clientError(
- _m('Could not favor notice! Please make sure your browser has cookies enabled.')
+ // TRANS: Client error.
+ $this->clientError( _m('Could not favor notice! Please make sure your browser has cookies enabled.')
);
return;
}
@@ -68,18 +67,21 @@ class AnonFavorAction extends RedirectingAction
$token = $this->trimmed('token-' . $notice->id);
if (empty($token) || $token != common_session_token()) {
+ // TRANS: Client error.
$this->clientError(_m('There was a problem with your session token. Try again, please.'));
return;
}
if ($profile->hasFave($notice)) {
+ // TRANS: Client error.
$this->clientError(_m('This notice is already a favorite!'));
return;
}
$fave = Fave::addNew($profile, $notice);
if (!$fave) {
+ // TRANS: Server error.
$this->serverError(_m('Could not create favorite.'));
return;
}
@@ -89,6 +91,7 @@ class AnonFavorAction extends RedirectingAction
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
+ // TRANS: Title.
$this->element('title', null, _m('Disfavor favorite'));
$this->elementEnd('head');
$this->elementStart('body');