summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-21 01:53:42 +0200
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2010-10-21 01:53:42 +0200
commit1603b7afc976cf1c19227f50163b9b48cc839a8b (patch)
tree4aade84df4f6b3f2863276f880572c8af1ea0eb3
parent8fd44a13bfb765f98086de8897a09e729c3ddf75 (diff)
i18n/L10n updates, translator comments added/fixed, superfluous whitespace removed.
-rw-r--r--actions/all.php17
-rw-r--r--actions/apiaccountupdatedeliverydevice.php16
-rw-r--r--actions/apiaccountupdateprofile.php8
-rw-r--r--actions/apiaccountupdateprofilebackgroundimage.php18
-rw-r--r--actions/apiblockcreate.php8
-rw-r--r--actions/apiblockdestroy.php7
-rw-r--r--actions/apidirectmessagenew.php4
-rw-r--r--actions/apifavoritecreate.php7
8 files changed, 38 insertions, 47 deletions
diff --git a/actions/all.php b/actions/all.php
index 6c14d2f13..b65335abc 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -89,7 +89,7 @@ class AllAction extends ProfileAction
// TRANS: Page title. %1$s is user nickname, %2$d is page number
return sprintf(_('%1$s and friends, page %2$d'), $this->user->nickname, $this->page);
} else {
- // TRANS: Page title. %1$s is user nickname
+ // TRANS: Page title. %s is user nickname
return sprintf(_("%s and friends"), $this->user->nickname);
}
}
@@ -103,7 +103,7 @@ class AllAction extends ProfileAction
'nickname' =>
$this->user->nickname)
),
- // TRANS: %1$s is user nickname
+ // TRANS: %s is user nickname
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
new Feed(Feed::RSS2,
common_local_url(
@@ -112,7 +112,7 @@ class AllAction extends ProfileAction
'id' => $this->user->nickname
)
),
- // TRANS: %1$s is user nickname
+ // TRANS: %s is user nickname
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
new Feed(Feed::ATOM,
common_local_url(
@@ -121,7 +121,7 @@ class AllAction extends ProfileAction
'id' => $this->user->nickname
)
),
- // TRANS: %1$s is user nickname
+ // TRANS: %s is user nickname
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
);
}
@@ -134,18 +134,23 @@ class AllAction extends ProfileAction
function showEmptyListMessage()
{
- // TRANS: %1$s is user nickname
+ // TRANS: %s is user nickname
$message = sprintf(_('This is the timeline for %s and friends but no one has posted anything yet.'), $this->user->nickname) . ' ';
if (common_logged_in()) {
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
+ // TRANS: Encouragement displayed on logged in user's empty timeline.
+ // TRANS: This message contains Markdown links. Keep "](" together.
$message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
} else {
// TRANS: %1$s is user nickname, %2$s is user nickname, %2$s is user nickname prefixed with "@"
+ // TRANS: This message contains Markdown links. Keep "](" together.
$message .= sprintf(_('You can try to [nudge %1$s](../%2$s) from their profile or [post something to them](%%%%action.newnotice%%%%?status_textarea=%3$s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
}
} else {
+ // TRANS: Encoutagement displayed on empty timeline user pages for anonymous users.
+ // TRANS: %s is a user nickname. This message contains Markdown links. Keep "](" together.
$message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to them.'), $this->user->nickname);
}
@@ -181,7 +186,7 @@ class AllAction extends ProfileAction
// TRANS: H1 text
$this->element('h1', null, _("You and friends"));
} else {
- // TRANS: H1 text. %1$s is user nickname
+ // TRANS: H1 text. %s is a user nickname
$this->element('h1', null, sprintf(_('%s and friends'), $this->user->nickname));
}
}
diff --git a/actions/apiaccountupdatedeliverydevice.php b/actions/apiaccountupdatedeliverydevice.php
index 2d903cb46..a7342a94f 100644
--- a/actions/apiaccountupdatedeliverydevice.php
+++ b/actions/apiaccountupdatedeliverydevice.php
@@ -45,7 +45,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
{
/**
@@ -56,7 +55,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -76,7 +74,6 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -92,6 +89,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed handling a non-existing API method.
_('API method not found.'),
404,
$this->format
@@ -102,16 +100,14 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
// Note: Twitter no longer supports IM
if (!in_array(strtolower($this->device), array('sms', 'im', 'none'))) {
- $this->clientError(
- _(
- 'You must specify a parameter named ' .
- '\'device\' with a value of one of: sms, im, none.'
- )
- );
+ // TRANS: Client error displayed when no valid device parameter is provided for a user's delivery device setting.
+ $this->clientError(_( 'You must specify a parameter named ' .
+ '\'device\' with a value of one of: sms, im, none.' ));
return;
}
if (empty($this->user)) {
+ // TRANS: Client error displayed when no existing user is provided for a user's delivery device setting.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
@@ -131,6 +127,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
if ($result === false) {
common_log_db_error($this->user, 'UPDATE', __FILE__);
+ // TRANS: Server error displayed when a user's delivery device cannot be updated.
$this->serverError(_('Could not update user.'));
return;
}
@@ -155,5 +152,4 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
$this->endDocument('json');
}
}
-
}
diff --git a/actions/apiaccountupdateprofile.php b/actions/apiaccountupdateprofile.php
index 92d0f6b77..aea10e33e 100644
--- a/actions/apiaccountupdateprofile.php
+++ b/actions/apiaccountupdateprofile.php
@@ -43,10 +43,8 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateProfileAction extends ApiAuthAction
{
-
/**
* Take arguments for running
*
@@ -55,7 +53,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -79,7 +76,6 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -103,6 +99,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
}
if (empty($this->user)) {
+ // TRANS: Client error displayed if a user could not be found.
$this->clientError(_('No such user.'), 404, $this->format);
return;
}
@@ -110,6 +107,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed if a user profile could not be found.
$this->clientError(_('User has no profile.'));
return;
}
@@ -145,6 +143,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
if (!$result) {
common_log_db_error($profile, 'UPDATE', __FILE__);
+ // TRANS: Server error displayed if a user profile could not be saved.
$this->serverError(_('Could not save profile.'));
return;
}
@@ -163,5 +162,4 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
$this->endDocument('json');
}
}
-
}
diff --git a/actions/apiaccountupdateprofilebackgroundimage.php b/actions/apiaccountupdateprofilebackgroundimage.php
index 923fb1d11..87af962d2 100644
--- a/actions/apiaccountupdateprofilebackgroundimage.php
+++ b/actions/apiaccountupdateprofilebackgroundimage.php
@@ -42,10 +42,8 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
{
-
var $tile = false;
/**
@@ -56,7 +54,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -76,7 +73,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -92,6 +88,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if (!in_array($this->format, array('xml', 'json'))) {
$this->clientError(
+ // TRANS: Client error displayed when trying to handle an unknown API method.
_('API method not found.'),
404,
$this->format
@@ -106,8 +103,11 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
&& empty($_POST)
&& ($_SERVER['CONTENT_LENGTH'] > 0)
) {
- $msg = _('The server was unable to handle that much POST ' .
- 'data (%s bytes) due to its current configuration.');
+ // TRANS: Client error displayed when the number of bytes in a POST request exceeds a limit.
+ // TRANS: %s is the number of bytes of the CONTENT_LENGTH.
+ $msg = _m('The server was unable to handle that much POST data (%s byte) due to its current configuration.',
+ 'The server was unable to handle that much POST data (%s bytes) due to its current configuration.',
+ intval($_SERVER['CONTENT_LENGTH']));
$this->clientError(sprintf($msg, $_SERVER['CONTENT_LENGTH']));
return;
@@ -125,7 +125,6 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
// is part of the img filename.
if (empty($design)) {
-
$this->user->query('BEGIN');
// save new design
@@ -134,6 +133,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if (empty($id)) {
common_log_db_error($id, 'INSERT', __FILE__);
+ // TRANS: Client error displayed when saving design settings fails because of an empty id.
$this->clientError(_('Unable to save your design settings.'));
return;
}
@@ -144,6 +144,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if (empty($result)) {
common_log_db_error($original, 'UPDATE', __FILE__);
+ // TRANS: Client error displayed when saving design settings fails because of an empty result.
$this->clientError(_('Unable to save your design settings.'));
$this->user->query('ROLLBACK');
return;
@@ -185,6 +186,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if ($result === false) {
common_log_db_error($design, 'UPDATE', __FILE__);
+ // TRANS: Error displayed when updating design settings fails.
$this->showForm(_('Could not update your design.'));
return;
}
@@ -192,6 +194,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
$profile = $this->user->getProfile();
if (empty($profile)) {
+ // TRANS: Client error displayed when a user has no profile.
$this->clientError(_('User has no profile.'));
return;
}
@@ -208,5 +211,4 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
$this->endDocument('json');
}
}
-
}
diff --git a/actions/apiblockcreate.php b/actions/apiblockcreate.php
index 53844cd2f..a9f31e791 100644
--- a/actions/apiblockcreate.php
+++ b/actions/apiblockcreate.php
@@ -46,7 +46,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiBlockCreateAction extends ApiAuthAction
{
var $other = null;
@@ -59,7 +58,6 @@ class ApiBlockCreateAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -79,7 +77,6 @@ class ApiBlockCreateAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -103,6 +100,7 @@ class ApiBlockCreateAction extends ApiAuthAction
if ($this->user->id == $this->other->id) {
$this->clientError(
+ // TRANS: Client error displayed when users try to block themselves.
_("You cannot block yourself!"),
403,
$this->format
@@ -124,10 +122,8 @@ class ApiBlockCreateAction extends ApiAuthAction
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
} else {
+ // TRANS: Server error displayed when blocking a user has failed.
$this->serverError(_('Block user failed.'), 500, $this->format);
}
-
}
-
}
-
diff --git a/actions/apiblockdestroy.php b/actions/apiblockdestroy.php
index 871ce66c7..b69907784 100644
--- a/actions/apiblockdestroy.php
+++ b/actions/apiblockdestroy.php
@@ -45,7 +45,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiBlockDestroyAction extends ApiAuthAction
{
var $other = null;
@@ -58,7 +57,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -78,7 +76,6 @@ class ApiBlockDestroyAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -112,10 +109,8 @@ class ApiBlockDestroyAction extends ApiAuthAction
$this->showProfile($this->other, $this->format);
$this->endDocument($this->format);
} else {
+ // TRANS: Server error displayed when unblocking a user has failed.
$this->serverError(_('Unblock user failed.'));
}
-
}
-
}
-
diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php
index c126cd312..ccef57b3f 100644
--- a/actions/apidirectmessagenew.php
+++ b/actions/apidirectmessagenew.php
@@ -121,9 +121,9 @@ class ApiDirectMessageNewAction extends ApiAuthAction
} else {
$content_shortened = common_shorten_links($this->content);
if (Message::contentTooLong($content_shortened)) {
- // TRANS: Client error displayed when message content is too long.
- // TRANS: %d is the maximum number of characters for a message.
$this->clientError(
+ // TRANS: Client error displayed when message content is too long.
+ // TRANS: %d is the maximum number of characters for a message.
sprintf(_m('That\'s too long. Maximum message size is %d character.', 'That\'s too long. Maximum message size is %d characters.', Message::maxContent()),
Message::maxContent()
),
diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php
index 15da01013..90a29d228 100644
--- a/actions/apifavoritecreate.php
+++ b/actions/apifavoritecreate.php
@@ -48,7 +48,6 @@ require_once INSTALLDIR . '/lib/apiauth.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 ApiFavoriteCreateAction extends ApiAuthAction
{
var $notice = null;
@@ -61,7 +60,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
* @return boolean success flag
*
*/
-
function prepare($args)
{
parent::prepare($args);
@@ -81,7 +79,6 @@ class ApiFavoriteCreateAction extends ApiAuthAction
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
@@ -107,6 +104,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
if (empty($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed when requesting a status with a non-existing ID.
_('No status found with that ID.'),
404,
$this->format
@@ -118,6 +116,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
if ($this->user->hasFave($this->notice)) {
$this->clientError(
+ // TRANS: Client error displayed when trying to mark a notice favourite that already is a favourite.
_('This status is already a favorite.'),
403,
$this->format
@@ -129,6 +128,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
if (empty($fave)) {
$this->clientError(
+ // TRANS: Client error displayed when marking a notice as favourite fails.
_('Could not create favorite.'),
403,
$this->format
@@ -166,5 +166,4 @@ class ApiFavoriteCreateAction extends ApiAuthAction
// XXX: notify by SMS
}
}
-
}