summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/apiaccountupdatedeliverydevice.php1
-rw-r--r--actions/apiaccountupdateprofile.php1
-rw-r--r--actions/apiaccountupdateprofilebackgroundimage.php1
-rw-r--r--actions/apiaccountupdateprofilecolors.php1
-rw-r--r--actions/apiaccountupdateprofileimage.php1
-rw-r--r--actions/apiblockcreate.php1
-rw-r--r--actions/apiblockdestroy.php1
-rw-r--r--actions/apidirectmessagenew.php1
-rw-r--r--actions/apifavoritecreate.php1
-rw-r--r--actions/apifavoritedestroy.php1
-rw-r--r--actions/apifriendshipscreate.php1
-rw-r--r--actions/apifriendshipsdestroy.php1
-rw-r--r--actions/apigroupcreate.php1
-rw-r--r--actions/apigroupjoin.php1
-rw-r--r--actions/apigroupleave.php1
-rw-r--r--actions/apimediaupload.php1
-rw-r--r--actions/apistatusesretweet.php1
-rw-r--r--actions/apistatusesupdate.php1
-rw-r--r--actions/emailsettings.php6
-rw-r--r--actions/groupmembers.php22
-rw-r--r--actions/imsettings.php3
-rw-r--r--lib/blockform.php2
-rw-r--r--lib/groupnav.php42
-rw-r--r--lib/htmloutputter.php1
-rw-r--r--lib/mediafile.php32
-rw-r--r--lib/oauthstore.php11
-rw-r--r--lib/plugin.php2
-rw-r--r--lib/searchaction.php11
-rw-r--r--lib/unblockform.php2
-rw-r--r--plugins/OStatus/lib/salmonaction.php1
30 files changed, 126 insertions, 27 deletions
diff --git a/actions/apiaccountupdatedeliverydevice.php b/actions/apiaccountupdatedeliverydevice.php
index 295378aa6..2d903cb46 100644
--- a/actions/apiaccountupdatedeliverydevice.php
+++ b/actions/apiaccountupdatedeliverydevice.php
@@ -83,6 +83,7 @@ class ApiAccountUpdateDeliveryDeviceAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error message. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apiaccountupdateprofile.php b/actions/apiaccountupdateprofile.php
index 9b371ea95..92d0f6b77 100644
--- a/actions/apiaccountupdateprofile.php
+++ b/actions/apiaccountupdateprofile.php
@@ -86,6 +86,7 @@ class ApiAccountUpdateProfileAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apiaccountupdateprofilebackgroundimage.php b/actions/apiaccountupdateprofilebackgroundimage.php
index 3537b9f97..923fb1d11 100644
--- a/actions/apiaccountupdateprofilebackgroundimage.php
+++ b/actions/apiaccountupdateprofilebackgroundimage.php
@@ -83,6 +83,7 @@ class ApiAccountUpdateProfileBackgroundImageAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apiaccountupdateprofilecolors.php b/actions/apiaccountupdateprofilecolors.php
index c666f9d75..9e07d80de 100644
--- a/actions/apiaccountupdateprofilecolors.php
+++ b/actions/apiaccountupdateprofilecolors.php
@@ -107,6 +107,7 @@ class ApiAccountUpdateProfileColorsAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apiaccountupdateprofileimage.php b/actions/apiaccountupdateprofileimage.php
index 153ef7818..7f868a6eb 100644
--- a/actions/apiaccountupdateprofileimage.php
+++ b/actions/apiaccountupdateprofileimage.php
@@ -81,6 +81,7 @@ class ApiAccountUpdateProfileImageAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apiblockcreate.php b/actions/apiblockcreate.php
index b355cd1c7..53844cd2f 100644
--- a/actions/apiblockcreate.php
+++ b/actions/apiblockcreate.php
@@ -86,6 +86,7 @@ class ApiBlockCreateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apiblockdestroy.php b/actions/apiblockdestroy.php
index 7ea201677..871ce66c7 100644
--- a/actions/apiblockdestroy.php
+++ b/actions/apiblockdestroy.php
@@ -85,6 +85,7 @@ class ApiBlockDestroyAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apidirectmessagenew.php b/actions/apidirectmessagenew.php
index 65d065648..44e205ebb 100644
--- a/actions/apidirectmessagenew.php
+++ b/actions/apidirectmessagenew.php
@@ -106,6 +106,7 @@ class ApiDirectMessageNewAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apifavoritecreate.php b/actions/apifavoritecreate.php
index 0447a92ba..15da01013 100644
--- a/actions/apifavoritecreate.php
+++ b/actions/apifavoritecreate.php
@@ -88,6 +88,7 @@ class ApiFavoriteCreateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apifavoritedestroy.php b/actions/apifavoritedestroy.php
index 9f2efdd00..c2e1ebafc 100644
--- a/actions/apifavoritedestroy.php
+++ b/actions/apifavoritedestroy.php
@@ -89,6 +89,7 @@ class ApiFavoriteDestroyAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apifriendshipscreate.php b/actions/apifriendshipscreate.php
index a7ec5b28a..64c857c70 100644
--- a/actions/apifriendshipscreate.php
+++ b/actions/apifriendshipscreate.php
@@ -88,6 +88,7 @@ class ApiFriendshipsCreateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apifriendshipsdestroy.php b/actions/apifriendshipsdestroy.php
index 551d01682..21da23ef7 100644
--- a/actions/apifriendshipsdestroy.php
+++ b/actions/apifriendshipsdestroy.php
@@ -88,6 +88,7 @@ class ApiFriendshipsDestroyAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apigroupcreate.php b/actions/apigroupcreate.php
index d216c15cd..fa443573d 100644
--- a/actions/apigroupcreate.php
+++ b/actions/apigroupcreate.php
@@ -102,6 +102,7 @@ class ApiGroupCreateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apigroupjoin.php b/actions/apigroupjoin.php
index 5265ec629..a0c069974 100644
--- a/actions/apigroupjoin.php
+++ b/actions/apigroupjoin.php
@@ -89,6 +89,7 @@ class ApiGroupJoinAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apigroupleave.php b/actions/apigroupleave.php
index 8c100d58a..c838f6c87 100644
--- a/actions/apigroupleave.php
+++ b/actions/apigroupleave.php
@@ -89,6 +89,7 @@ class ApiGroupLeaveAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/apimediaupload.php b/actions/apimediaupload.php
index 7aa88c186..54d7fda68 100644
--- a/actions/apimediaupload.php
+++ b/actions/apimediaupload.php
@@ -64,6 +64,7 @@ class ApiMediaUploadAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400, $this->format
);
diff --git a/actions/apistatusesretweet.php b/actions/apistatusesretweet.php
index 9aa337485..aae98f637 100644
--- a/actions/apistatusesretweet.php
+++ b/actions/apistatusesretweet.php
@@ -62,6 +62,7 @@ class ApiStatusesRetweetAction extends ApiAuthAction
parent::prepare($args);
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
$this->clientError(_('This method requires a POST.'),
400, $this->format);
return false;
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index fa3f611c0..4715f7002 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -195,6 +195,7 @@ class ApiStatusesUpdateAction extends ApiAuthAction
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
$this->clientError(
+ // TRANS: Client error. POST is a HTTP command. It should not be translated.
_('This method requires a POST.'),
400,
$this->format
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 6138a88f9..9c250fc8a 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -131,7 +131,11 @@ class EmailsettingsAction extends AccountSettingsAction
// TRANS: Field label for e-mail address input in e-mail settings form.
$this->input('email', _('Email address'),
($this->arg('email')) ? $this->arg('email') : null,
- // TRANS: Instructions for e-mail address input form.
+ // TRANS: Instructions for e-mail address input form. Do not translate
+ // TRANS: "example.org". It is one of the domain names reserved for
+ // TRANS: use in examples by http://www.rfc-editor.org/rfc/rfc2606.txt.
+ // TRANS: Any other domain may be owned by a legitimate person or
+ // TRANS: organization.
_('Email address, like "UserName@example.org"'));
$this->elementEnd('li');
$this->elementEnd('ul');
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index 54f1d8dcd..038d1db68 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -97,9 +97,13 @@ class GroupmembersAction extends GroupDesignAction
function title()
{
if ($this->page == 1) {
+ // TRANS: Title of the page showing group members.
+ // TRANS: %s is the name of the group.
return sprintf(_('%s group members'),
$this->group->nickname);
} else {
+ // TRANS: Title of the page showing group members.
+ // TRANS: %1$s is the name of the group, %2$d is the page number of the members list.
return sprintf(_('%1$s group members, page %2$d'),
$this->group->nickname,
$this->page);
@@ -389,7 +393,14 @@ class GroupBlockForm extends Form
function formActions()
{
- $this->out->submit('submit', _('Block'), 'submit', null, _('Block this user'));
+ $this->out->submit(
+ 'submit',
+ // TRANS: Button text for the form that will block a user from a group.
+ _m('BUTTON','Block'),
+ 'submit',
+ null,
+ // TRANS: Submit button title.
+ _m('TOOLTIP',_('Block this user'));
}
}
@@ -516,6 +527,13 @@ class MakeAdminForm extends Form
function formActions()
{
- $this->out->submit('submit', _('Make Admin'), 'submit', null, _('Make this user an admin'));
+ $this->out->submit(
+ 'submit',
+ // TRANS: Button text for the form that will make a user administrator.
+ _m('BUTTON','Make Admin'),
+ 'submit',
+ null,
+ // TRANS: Submit button title.
+ _m('TOOLTIP','Make this user an admin'));
}
}
diff --git a/actions/imsettings.php b/actions/imsettings.php
index 6691c8dad..29cbeb82e 100644
--- a/actions/imsettings.php
+++ b/actions/imsettings.php
@@ -137,6 +137,9 @@ class ImsettingsAction extends ConnectSettingsAction
($this->arg('jabber')) ? $this->arg('jabber') : null,
// TRANS: IM address input field instructions in IM settings form.
// TRANS: %s is the IM address set for the site.
+ // TRANS: Do not translate "example.org". It is one of the domain names reserved for use in examples by
+ // TRANS: http://www.rfc-editor.org/rfc/rfc2606.txt. Any other domain may be owned by a legitimate
+ // TRANS: person or organization.
sprintf(_('Jabber or GTalk address, '.
'like "UserName@example.org". '.
'First, make sure to add %s to your '.
diff --git a/lib/blockform.php b/lib/blockform.php
index b6652b1f6..54552b3e5 100644
--- a/lib/blockform.php
+++ b/lib/blockform.php
@@ -66,6 +66,7 @@ class BlockForm extends ProfileActionForm
function title()
{
+ // TRANS: Title for the form to block a user.
return _('Block');
}
@@ -77,6 +78,7 @@ class BlockForm extends ProfileActionForm
function description()
{
+ // TRANS: Description of the form to block a user.
return _('Block this user');
}
}
diff --git a/lib/groupnav.php b/lib/groupnav.php
index 131b38fa2..ee988d0a9 100644
--- a/lib/groupnav.php
+++ b/lib/groupnav.php
@@ -82,14 +82,20 @@ class GroupNav extends Widget
if (Event::handle('StartGroupGroupNav', array($this))) {
$this->out->menuItem(common_local_url('showgroup', array('nickname' =>
$nickname)),
- _('Group'),
- sprintf(_('%s group'), $nickname),
+ // TRANS: Menu item in the group navigation page.
+ _m('MENU','Group'),
+ // TRANS: Tooltip for menu item in the group navigation page.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','%s group'), $nickname),
$action_name == 'showgroup',
'nav_group_group');
$this->out->menuItem(common_local_url('groupmembers', array('nickname' =>
$nickname)),
- _('Members'),
- sprintf(_('%s group members'), $nickname),
+ // TRANS: Menu item in the group navigation page.
+ _m('MENU','Members'),
+ // TRANS: Tooltip for menu item in the group navigation page.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','%s group members'), $nickname),
$action_name == 'groupmembers',
'nav_group_members');
@@ -98,26 +104,38 @@ class GroupNav extends Widget
if ($cur && $cur->isAdmin($this->group)) {
$this->out->menuItem(common_local_url('blockedfromgroup', array('nickname' =>
$nickname)),
- _('Blocked'),
- sprintf(_('%s blocked users'), $nickname),
+ // TRANS: Menu item in the group navigation page. Only shown for group administrators.
+ _m('MENU','Blocked'),
+ // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','%s blocked users'), $nickname),
$action_name == 'blockedfromgroup',
'nav_group_blocked');
$this->out->menuItem(common_local_url('editgroup', array('nickname' =>
$nickname)),
- _('Admin'),
- sprintf(_('Edit %s group properties'), $nickname),
+ // TRANS: Menu item in the group navigation page. Only shown for group administrators.
+ _m('MENU','Admin'),
+ // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname),
$action_name == 'editgroup',
'nav_group_admin');
$this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
$nickname)),
- _('Logo'),
- sprintf(_('Add or edit %s logo'), $nickname),
+ // TRANS: Menu item in the group navigation page. Only shown for group administrators.
+ _m('MENU','Logo'),
+ // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','Add or edit %s logo'), $nickname),
$action_name == 'grouplogo',
'nav_group_logo');
$this->out->menuItem(common_local_url('groupdesignsettings', array('nickname' =>
$nickname)),
- _('Design'),
- sprintf(_('Add or edit %s design'), $nickname),
+ // TRANS: Menu item in the group navigation page. Only shown for group administrators.
+ _m('MENU','Design'),
+ // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
+ // TRANS: %s is the nickname of the group.
+ sprintf(_m('TOOLTIP','Add or edit %s design'), $nickname),
$action_name == 'groupdesignsettings',
'nav_group_design');
}
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index 5dc2b38da..44b029604 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -325,6 +325,7 @@ class HTMLOutputter extends XMLOutputter
* @param string $label text of the button
* @param string $cls class of the button, default 'submit'
* @param string $name name, if different than ID
+ * @param string $title title text for the submit button
*
* @return void
*
diff --git a/lib/mediafile.php b/lib/mediafile.php
index c96c78ab5..23338cc0e 100644
--- a/lib/mediafile.php
+++ b/lib/mediafile.php
@@ -95,6 +95,7 @@ class MediaFile
if (!$file_id) {
common_log_db_error($file, "INSERT", __FILE__);
+ // TRANS: Client exception thrown when a database error was thrown during a file upload operation.
throw new ClientException(_('There was a database error while saving your file. Please try again.'));
}
@@ -120,6 +121,7 @@ class MediaFile
if (!$result) {
common_log_db_error($file_redir, "INSERT", __FILE__);
+ // TRANS: Client exception thrown when a database error was thrown during a file upload operation.
throw new ClientException(_('There was a database error while saving your file. Please try again.'));
}
}
@@ -139,16 +141,19 @@ class MediaFile
case UPLOAD_ERR_OK: // success, jump out
break;
case UPLOAD_ERR_INI_SIZE:
+ // TRANS: Client exception thrown when an uploaded file is larger than set in php.ini.
throw new ClientException(_('The uploaded file exceeds the ' .
'upload_max_filesize directive in php.ini.'));
return;
case UPLOAD_ERR_FORM_SIZE:
throw new ClientException(
+ // TRANS: Client exception.
_('The uploaded file exceeds the MAX_FILE_SIZE directive' .
' that was specified in the HTML form.'));
return;
case UPLOAD_ERR_PARTIAL:
@unlink($_FILES[$param]['tmp_name']);
+ // TRANS: Client exception.
throw new ClientException(_('The uploaded file was only' .
' partially uploaded.'));
return;
@@ -156,17 +161,21 @@ class MediaFile
// No file; probably just a non-AJAX submission.
return;
case UPLOAD_ERR_NO_TMP_DIR:
+ // TRANS: Client exception thrown when a temporary folder is not present to store a file upload.
throw new ClientException(_('Missing a temporary folder.'));
return;
case UPLOAD_ERR_CANT_WRITE:
+ // TRANS: Client exception thrown when writing to disk is not possible during a file upload operation.
throw new ClientException(_('Failed to write file to disk.'));
return;
case UPLOAD_ERR_EXTENSION:
+ // TRANS: Client exception thrown when a file upload operation has been stopped by an extension.
throw new ClientException(_('File upload stopped by extension.'));
return;
default:
common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
$_FILES[$param]['error']);
+ // TRANS: Client exception thrown when a file upload operation has failed with an unknown reason.
throw new ClientException(_('System error uploading file.'));
return;
}
@@ -176,6 +185,7 @@ class MediaFile
// Should never actually get here
@unlink($_FILES[$param]['tmp_name']);
+ // TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota.
throw new ClientException(_('File exceeds user\'s quota.'));
return;
}
@@ -194,11 +204,15 @@ class MediaFile
$result = move_uploaded_file($_FILES[$param]['tmp_name'], $filepath);
if (!$result) {
+ // TRANS: Client exception thrown when a file upload operation fails because the file could
+ // TRANS: not be moved from the temporary folder to the permanent file location.
throw new ClientException(_('File could not be moved to destination directory.'));
return;
}
} else {
+ // TRANS: Client exception thrown when a file upload operation has been stopped because the MIME
+ // TRANS: type of the uploaded file could not be determined.
throw new ClientException(_('Could not determine file\'s MIME type.'));
return;
}
@@ -214,6 +228,7 @@ class MediaFile
// Should never actually get here
+ // TRANS: Client exception thrown when a file upload operation would cause a user to exceed a set quota.
throw new ClientException(_('File exceeds user\'s quota.'));
return;
}
@@ -231,10 +246,14 @@ class MediaFile
$result = copy($stream['uri'], $filepath) && chmod($filepath, 0664);
if (!$result) {
+ // TRANS: Client exception thrown when a file upload operation fails because the file could
+ // TRANS: not be moved from the temporary folder to the permanent file location.
throw new ClientException(_('File could not be moved to destination directory.' .
$stream['uri'] . ' ' . $filepath));
}
} else {
+ // TRANS: Client exception thrown when a file upload operation has been stopped because the MIME
+ // TRANS: type of the uploaded file could not be determined.
throw new ClientException(_('Could not determine file\'s MIME type.'));
return;
}
@@ -315,12 +334,17 @@ class MediaFile
}
$media = MIME_Type::getMedia($filetype);
if ('application' !== $media) {
- $hint = sprintf(_(' Try using another %s format.'), $media);
+ // TRANS: Client exception thrown trying to upload a forbidden MIME type.
+ // TRANS: %1$s is the file type that was denied, %2$s is the application part of
+ // TRANS: the MIME type that was denied.
+ $hint = sprintf(_('"%1$s" is not a supported file type on this server. ' .
+ 'Try using another %2$s format.'), $filetype, $media);
} else {
- $hint = '';
+ // TRANS: Client exception thrown trying to upload a forbidden MIME type.
+ // TRANS: %s is the file type that was denied.
+ $hint = sprintf(_('"%s" is not a supported file type on this server.'), $filetype);
}
- throw new ClientException(sprintf(
- _('%s is not a supported file type on this server.'), $filetype) . $hint);
+ throw new ClientException($hint);
}
static function respectsQuota($user, $filesize)
diff --git a/lib/oauthstore.php b/lib/oauthstore.php
index a6a6de750..f3ee629fd 100644
--- a/lib/oauthstore.php
+++ b/lib/oauthstore.php
@@ -280,7 +280,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$profile->created = DB_DataObject_Cast::dateTime(); # current time
$id = $profile->insert();
if (!$id) {
- throw new Exception(_('Error inserting new profile'));
+ throw new Exception(_('Error inserting new profile.'));
}
$remote->id = $id;
}
@@ -288,7 +288,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore
$avatar_url = $omb_profile->getAvatarURL();
if ($avatar_url) {
if (!$this->add_avatar($profile, $avatar_url)) {
- throw new Exception(_('Error inserting avatar'));
+ throw new Exception(_('Error inserting avatar.'));
}
} else {
$avatar = $profile->getOriginalAvatar();
@@ -303,12 +303,12 @@ class StatusNetOAuthDataStore extends OAuthDataStore
if ($exists) {
if (!$remote->update($orig_remote)) {
- throw new Exception(_('Error updating remote profile'));
+ throw new Exception(_('Error updating remote profile.'));
}
} else {
$remote->created = DB_DataObject_Cast::dateTime(); # current time
if (!$remote->insert()) {
- throw new Exception(_('Error inserting remote profile'));
+ throw new Exception(_('Error inserting remote profile.'));
}
}
}
@@ -342,7 +342,8 @@ class StatusNetOAuthDataStore extends OAuthDataStore
**/
public function saveNotice(&$omb_notice) {
if (Notice::staticGet('uri', $omb_notice->getIdentifierURI())) {
- throw new Exception(_('Duplicate notice'));
+ // TRANS: Exception thrown when a notice is denied because it has been sent before.
+ throw new Exception(_('Duplicate notice.'));
}
$author_uri = $omb_notice->getAuthor()->getIdentifierURI();
common_log(LOG_DEBUG, $author_uri, __FILE__);
diff --git a/lib/plugin.php b/lib/plugin.php
index f63bdf309..ee57f5904 100644
--- a/lib/plugin.php
+++ b/lib/plugin.php
@@ -112,9 +112,9 @@ class Plugin
$name = mb_substr($cls, 0, -6);
$versions[] = array('name' => $name,
+ // TRANS: Displayed as version information for a plugin if no version information was found.
'version' => _('Unknown'));
return true;
}
}
-
diff --git a/lib/searchaction.php b/lib/searchaction.php
index bb71a2ba1..14c3ed016 100644
--- a/lib/searchaction.php
+++ b/lib/searchaction.php
@@ -117,14 +117,17 @@ class SearchAction extends Action
'class' => 'form_settings',
'action' => common_local_url($this->trimmed('action'))));
$this->elementStart('fieldset');
+ // TRANS: Fieldset legend for the search form.
$this->element('legend', null, _('Search site'));
$this->elementStart('ul', 'form_data');
$this->elementStart('li');
if (!common_config('site', 'fancy')) {
$this->hidden('action', $this->trimmed('action'));
}
+ // TRANS: Used as a field label for the field where one or more keywords
+ // TRANS: for searching can be entered.
$this->input('q', _('Keyword(s)'), $q);
- $this->submit('search', _('Search'));
+ $this->submit('search', _m('BUTTON','Search'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->elementEnd('fieldset');
@@ -135,6 +138,8 @@ class SearchAction extends Action
}
function searchSuggestions($q) {
+ // @todo FIXME: This formatting does not make this string get picked up by gettext.
+ // TRANS: Standard search suggestions shown when a search does not give any results.
$message = _(<<<E_O_T
* Make sure all words are spelled correctly.
* Try different keywords.
@@ -145,6 +150,8 @@ E_O_T
);
if (!common_config('site', 'private')) {
$qe = urlencode($q);
+ // @todo FIXME: This formatting does not make this string get picked up by gettext.
+ // TRANS: Standard search suggestions shown when a search does not give any results.
$message .= sprintf(_(<<<E_O_T
You can also try your search on other engines:
@@ -159,6 +166,7 @@ E_O_T
), $qe, $qe, $qe, $qe, $qe);
}
$this->elementStart('dl', array('id' => 'help_search', 'class' => 'help'));
+ // TRANS: Definition list item with instructions on how to get (better) search results.
$this->element('dt', null, _('Search help'));
$this->elementStart('dd', 'instructions');
$this->raw(common_markup_to_html($message));
@@ -166,4 +174,3 @@ E_O_T
$this->elementEnd('div');
}
}
-
diff --git a/lib/unblockform.php b/lib/unblockform.php
index 2a444f7cd..b89d7ff78 100644
--- a/lib/unblockform.php
+++ b/lib/unblockform.php
@@ -66,6 +66,7 @@ class UnblockForm extends ProfileActionForm
function title()
{
+ // TRANS: Title for the form to unblock a user.
return _('Unblock');
}
@@ -77,6 +78,7 @@ class UnblockForm extends ProfileActionForm
function description()
{
+ // TRANS: Description of the form to unblock a user.
return _('Unblock this user');
}
}
diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php
index 5fdb11abe..f97c67edd 100644
--- a/plugins/OStatus/lib/salmonaction.php
+++ b/plugins/OStatus/lib/salmonaction.php
@@ -38,6 +38,7 @@ class SalmonAction extends Action
parent::prepare($args);
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
+ // TRANS: POST is a HTTP command. It should not be translated.
$this->clientError(_m('This method requires a POST.'));
}