Fix gettext domain for messages in plugins "_()" to "_m()".
Some other i18n and L10n updates, too. i18n/L10n review not complete.
This commit is contained in:
parent
0ac0925309
commit
14456cbbb2
|
@ -233,6 +233,10 @@ class BitlyAdminPanelForm extends AdminForm
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Save'), 'submit', null, _m('Save bit.ly settings'));
|
$this->out->submit('submit',
|
||||||
|
_m('BUTTON','Save'),
|
||||||
|
'submit',
|
||||||
|
null,
|
||||||
|
_m('Save bit.ly settings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,13 +82,13 @@ class BlogspamNetPlugin extends Plugin
|
||||||
} else {
|
} else {
|
||||||
common_debug("Blogspamnet results = " . $response);
|
common_debug("Blogspamnet results = " . $response);
|
||||||
if (preg_match('/^ERROR(:(.*))?$/', $response, $match)) {
|
if (preg_match('/^ERROR(:(.*))?$/', $response, $match)) {
|
||||||
throw new ServerException(sprintf(_("Error from %s: %s"), $this->baseUrl, $match[2]), 500);
|
throw new ServerException(sprintf(_m("Error from %1$s: %2$s"), $this->baseUrl, $match[2]), 500);
|
||||||
} else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
|
} else if (preg_match('/^SPAM(:(.*))?$/', $response, $match)) {
|
||||||
throw new ClientException(sprintf(_("Spam checker results: %s"), $match[2]), 400);
|
throw new ClientException(sprintf(_m("Spam checker results: %s"), $match[2]), 400);
|
||||||
} else if (preg_match('/^OK$/', $response)) {
|
} else if (preg_match('/^OK$/', $response)) {
|
||||||
// don't do anything
|
// don't do anything
|
||||||
} else {
|
} else {
|
||||||
throw new ServerException(sprintf(_("Unexpected response from %s: %s"), $this->baseUrl, $response), 500);
|
throw new ServerException(sprintf(_m("Unexpected response from %1$s: %2$s"), $this->baseUrl, $response), 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -199,7 +199,7 @@ class Bookmark extends Memcached_DataObject
|
||||||
$nb = self::getByURL($profile, $url);
|
$nb = self::getByURL($profile, $url);
|
||||||
|
|
||||||
if (!empty($nb)) {
|
if (!empty($nb)) {
|
||||||
throw new ClientException(_('Bookmark already exists.'));
|
throw new ClientException(_m('Bookmark already exists.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($options)) {
|
if (empty($options)) {
|
||||||
|
@ -209,7 +209,7 @@ class Bookmark extends Memcached_DataObject
|
||||||
if (array_key_exists('uri', $options)) {
|
if (array_key_exists('uri', $options)) {
|
||||||
$other = Bookmark::staticGet('uri', $options['uri']);
|
$other = Bookmark::staticGet('uri', $options['uri']);
|
||||||
if (!empty($other)) {
|
if (!empty($other)) {
|
||||||
throw new ClientException(_('Bookmark already exists.'));
|
throw new ClientException(_m('Bookmark already exists.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -288,16 +288,19 @@ class Bookmark extends Memcached_DataObject
|
||||||
$shortUrl = $url;
|
$shortUrl = $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = sprintf(_('"%s" %s %s %s'),
|
// @todo FIXME: i18n documentation.
|
||||||
|
// TRANS: %1$s is a title, %2$s is a short URL, %3$s is a description,
|
||||||
|
// TRANS: %4$s is space separated list of hash tags.
|
||||||
|
$content = sprintf(_m('"%1$s" %2$s %3$s %4$s'),
|
||||||
$title,
|
$title,
|
||||||
$shortUrl,
|
$shortUrl,
|
||||||
$description,
|
$description,
|
||||||
implode(' ', $hashtags));
|
implode(' ', $hashtags));
|
||||||
|
|
||||||
$rendered = sprintf(_('<span class="xfolkentry">'.
|
$rendered = sprintf(_m('<span class="xfolkentry">'.
|
||||||
'<a class="taggedlink" href="%s">%s</a> '.
|
'<a class="taggedlink" href="%1$s">%2$s</a> '.
|
||||||
'<span class="description">%s</span> '.
|
'<span class="description">%3$s</span> '.
|
||||||
'<span class="meta">%s</span>'.
|
'<span class="meta">%4$s</span>'.
|
||||||
'</span>'),
|
'</span>'),
|
||||||
htmlspecialchars($url),
|
htmlspecialchars($url),
|
||||||
htmlspecialchars($title),
|
htmlspecialchars($title),
|
||||||
|
|
|
@ -274,7 +274,7 @@ class BookmarkPlugin extends MicroAppPlugin
|
||||||
$action->elementStart('li');
|
$action->elementStart('li');
|
||||||
$action->element('a',
|
$action->element('a',
|
||||||
array('href' => common_local_url('importdelicious')),
|
array('href' => common_local_url('importdelicious')),
|
||||||
_('Import del.icio.us bookmarks'));
|
_m('Import del.icio.us bookmarks'));
|
||||||
$action->elementEnd('li');
|
$action->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ class BookmarkPlugin extends MicroAppPlugin
|
||||||
$relLinkEls = ActivityUtils::getLinks($bookmark->element, 'related');
|
$relLinkEls = ActivityUtils::getLinks($bookmark->element, 'related');
|
||||||
|
|
||||||
if (count($relLinkEls) < 1) {
|
if (count($relLinkEls) < 1) {
|
||||||
throw new ClientException(_('Expected exactly 1 link '.
|
throw new ClientException(_m('Expected exactly 1 link '.
|
||||||
'rel=related in a Bookmark.'));
|
'rel=related in a Bookmark.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -472,7 +472,7 @@ class BookmarkPlugin extends MicroAppPlugin
|
||||||
$attachments = $notice->attachments();
|
$attachments = $notice->attachments();
|
||||||
|
|
||||||
if (count($attachments) != 1) {
|
if (count($attachments) != 1) {
|
||||||
throw new ServerException(_('Bookmark notice with the '.
|
throw new ServerException(_m('Bookmark notice with the '.
|
||||||
'wrong number of attachments.'));
|
'wrong number of attachments.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,30 +121,30 @@ class BookmarkForm extends Form
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('title',
|
$this->out->input('title',
|
||||||
_('Title'),
|
_m('LABEL','Title'),
|
||||||
$this->_title,
|
$this->_title,
|
||||||
_('Title of the bookmark'));
|
_m('Title of the bookmark'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('url',
|
$this->out->input('url',
|
||||||
_('URL'),
|
_m('LABEL','URL'),
|
||||||
$this->_url,
|
$this->_url,
|
||||||
_('URL to bookmark'));
|
_m('URL to bookmark'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('tags',
|
$this->out->input('tags',
|
||||||
_('Tags'),
|
_m('LABEL','Tags'),
|
||||||
$this->_tags,
|
$this->_tags,
|
||||||
_('Comma- or space-separated list of tags'));
|
_m('Comma- or space-separated list of tags'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('description',
|
$this->out->input('description',
|
||||||
_('Description'),
|
_m('LABEL','Description'),
|
||||||
$this->_description,
|
$this->_description,
|
||||||
_('Description of the URL'));
|
_m('Description of the URL'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
|
|
|
@ -55,7 +55,7 @@ class BookmarkpopupAction extends NewbookmarkAction
|
||||||
// TRANS: Title for mini-posting window loaded from bookmarklet.
|
// TRANS: Title for mini-posting window loaded from bookmarklet.
|
||||||
// TRANS: %s is the StatusNet site name.
|
// TRANS: %s is the StatusNet site name.
|
||||||
$this->element('title',
|
$this->element('title',
|
||||||
null, sprintf(_('Bookmark on %s'),
|
null, sprintf(_m('Bookmark on %s'),
|
||||||
common_config('site', 'name')));
|
common_config('site', 'name')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class DeliciousBackupImporter extends QueueHandler
|
||||||
$dls = $doc->getElementsByTagName('dl');
|
$dls = $doc->getElementsByTagName('dl');
|
||||||
|
|
||||||
if ($dls->length != 1) {
|
if ($dls->length != 1) {
|
||||||
throw new ClientException(_("Bad import file."));
|
throw new ClientException(_m("Bad import file."));
|
||||||
}
|
}
|
||||||
|
|
||||||
$dl = $dls->item(0);
|
$dl = $dls->item(0);
|
||||||
|
@ -165,7 +165,7 @@ class DeliciousBackupImporter extends QueueHandler
|
||||||
$as = $dt->getElementsByTagName('a');
|
$as = $dt->getElementsByTagName('a');
|
||||||
|
|
||||||
if ($as->length == 0) {
|
if ($as->length == 0) {
|
||||||
throw new ClientException(_("No <A> tag in a <DT>."));
|
throw new ClientException(_m("No <A> tag in a <DT>."));
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = $as->item(0);
|
$a = $as->item(0);
|
||||||
|
@ -173,7 +173,7 @@ class DeliciousBackupImporter extends QueueHandler
|
||||||
$private = $a->getAttribute('private');
|
$private = $a->getAttribute('private');
|
||||||
|
|
||||||
if ($private != 0) {
|
if ($private != 0) {
|
||||||
throw new ClientException(_('Skipping private bookmark.'));
|
throw new ClientException(_m('Skipping private bookmark.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($dd)) {
|
if (!empty($dd)) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ function getBookmarksFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: %s is the filename that contains a backup for a user.
|
// TRANS: %s is the filename that contains a backup for a user.
|
||||||
printfv(_("Getting backup from file '%s'.")."\n", $filename);
|
printfv(_m("Getting backup from file \"%s\".")."\n", $filename);
|
||||||
|
|
||||||
$html = file_get_contents($filename);
|
$html = file_get_contents($filename);
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class ImportdeliciousAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _("Import del.icio.us bookmarks");
|
return _m("Import del.icio.us bookmarks");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,13 +76,13 @@ class ImportdeliciousAction extends Action
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if (empty($cur)) {
|
if (empty($cur)) {
|
||||||
throw new ClientException(_('Only logged-in users can '.
|
throw new ClientException(_m('Only logged-in users can '.
|
||||||
'import del.icio.us backups.'),
|
'import del.icio.us backups.'),
|
||||||
403);
|
403);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$cur->hasRight(BookmarkPlugin::IMPORTDELICIOUS)) {
|
if (!$cur->hasRight(BookmarkPlugin::IMPORTDELICIOUS)) {
|
||||||
throw new ClientException(_('You may not restore your account.'), 403);
|
throw new ClientException(_m('You may not restore your account.'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -121,7 +121,7 @@ class ImportdeliciousAction extends Action
|
||||||
$this->checkSessionToken();
|
$this->checkSessionToken();
|
||||||
|
|
||||||
if (!isset($_FILES[ImportDeliciousForm::FILEINPUT]['error'])) {
|
if (!isset($_FILES[ImportDeliciousForm::FILEINPUT]['error'])) {
|
||||||
throw new ClientException(_('No uploaded file.'));
|
throw new ClientException(_m('No uploaded file.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($_FILES[ImportDeliciousForm::FILEINPUT]['error']) {
|
switch ($_FILES[ImportDeliciousForm::FILEINPUT]['error']) {
|
||||||
|
@ -129,42 +129,42 @@ class ImportdeliciousAction extends Action
|
||||||
break;
|
break;
|
||||||
case UPLOAD_ERR_INI_SIZE:
|
case UPLOAD_ERR_INI_SIZE:
|
||||||
// TRANS: Client exception thrown when an uploaded file is too large.
|
// TRANS: Client exception thrown when an uploaded file is too large.
|
||||||
throw new ClientException(_('The uploaded file exceeds the ' .
|
throw new ClientException(_m('The uploaded file exceeds the ' .
|
||||||
'upload_max_filesize directive in php.ini.'));
|
'upload_max_filesize directive in php.ini.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_FORM_SIZE:
|
case UPLOAD_ERR_FORM_SIZE:
|
||||||
throw new ClientException(
|
throw new ClientException(
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
_('The uploaded file exceeds the MAX_FILE_SIZE directive' .
|
_m('The uploaded file exceeds the MAX_FILE_SIZE directive' .
|
||||||
' that was specified in the HTML form.'));
|
' that was specified in the HTML form.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_PARTIAL:
|
case UPLOAD_ERR_PARTIAL:
|
||||||
@unlink($_FILES[ImportDeliciousForm::FILEINPUT]['tmp_name']);
|
@unlink($_FILES[ImportDeliciousForm::FILEINPUT]['tmp_name']);
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('The uploaded file was only' .
|
throw new ClientException(_m('The uploaded file was only' .
|
||||||
' partially uploaded.'));
|
' partially uploaded.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_NO_FILE:
|
case UPLOAD_ERR_NO_FILE:
|
||||||
// No file; probably just a non-AJAX submission.
|
// No file; probably just a non-AJAX submission.
|
||||||
throw new ClientException(_('No uploaded file.'));
|
throw new ClientException(_m('No uploaded file.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_NO_TMP_DIR:
|
case UPLOAD_ERR_NO_TMP_DIR:
|
||||||
// TRANS: Client exception thrown when a temporary folder is not present
|
// TRANS: Client exception thrown when a temporary folder is not present
|
||||||
throw new ClientException(_('Missing a temporary folder.'));
|
throw new ClientException(_m('Missing a temporary folder.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_CANT_WRITE:
|
case UPLOAD_ERR_CANT_WRITE:
|
||||||
// TRANS: Client exception thrown when writing to disk is not possible
|
// TRANS: Client exception thrown when writing to disk is not possible
|
||||||
throw new ClientException(_('Failed to write file to disk.'));
|
throw new ClientException(_m('Failed to write file to disk.'));
|
||||||
return;
|
return;
|
||||||
case UPLOAD_ERR_EXTENSION:
|
case UPLOAD_ERR_EXTENSION:
|
||||||
// TRANS: Client exception thrown when a file upload has been stopped
|
// TRANS: Client exception thrown when a file upload has been stopped
|
||||||
throw new ClientException(_('File upload stopped by extension.'));
|
throw new ClientException(_m('File upload stopped by extension.'));
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
|
common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
|
||||||
$_FILES[ImportDeliciousForm::FILEINPUT]['error']);
|
$_FILES[ImportDeliciousForm::FILEINPUT]['error']);
|
||||||
// TRANS: Client exception thrown when a file upload operation has failed
|
// TRANS: Client exception thrown when a file upload operation has failed
|
||||||
throw new ClientException(_('System error uploading file.'));
|
throw new ClientException(_m('System error uploading file.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ class ImportdeliciousAction extends Action
|
||||||
throw new ServerException("File '$filename' not readable.");
|
throw new ServerException("File '$filename' not readable.");
|
||||||
}
|
}
|
||||||
|
|
||||||
common_debug(sprintf(_("Getting backup from file '%s'."), $filename));
|
common_debug(sprintf(_m("Getting backup from file '%s'."), $filename));
|
||||||
|
|
||||||
$html = file_get_contents($filename);
|
$html = file_get_contents($filename);
|
||||||
|
|
||||||
|
@ -219,10 +219,10 @@ class ImportdeliciousAction extends Action
|
||||||
{
|
{
|
||||||
if ($this->success) {
|
if ($this->success) {
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
_('Bookmarks have been imported. Your bookmarks should now appear in search and your profile page.'));
|
_m('Bookmarks have been imported. Your bookmarks should now appear in search and your profile page.'));
|
||||||
} else if ($this->inprogress) {
|
} else if ($this->inprogress) {
|
||||||
$this->element('p', null,
|
$this->element('p', null,
|
||||||
_('Bookmarks are being imported. Please wait a few minutes for results.'));
|
_m('Bookmarks are being imported. Please wait a few minutes for results.'));
|
||||||
} else {
|
} else {
|
||||||
$form = new ImportDeliciousForm($this);
|
$form = new ImportDeliciousForm($this);
|
||||||
$form->show();
|
$form->show();
|
||||||
|
@ -310,7 +310,7 @@ class ImportDeliciousForm extends Form
|
||||||
{
|
{
|
||||||
$this->out->elementStart('p', 'instructions');
|
$this->out->elementStart('p', 'instructions');
|
||||||
|
|
||||||
$this->out->raw(_('You can upload a backed-up '.
|
$this->out->raw(_m('You can upload a backed-up '.
|
||||||
'delicious.com bookmarks file.'));
|
'delicious.com bookmarks file.'));
|
||||||
|
|
||||||
$this->out->elementEnd('p');
|
$this->out->elementEnd('p');
|
||||||
|
@ -340,6 +340,6 @@ class ImportDeliciousForm extends Form
|
||||||
_m('BUTTON', 'Upload'),
|
_m('BUTTON', 'Upload'),
|
||||||
'submit',
|
'submit',
|
||||||
null,
|
null,
|
||||||
_('Upload the file'));
|
_m('Upload the file'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ class NewbookmarkAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('New bookmark');
|
return _m('New bookmark');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -80,7 +80,7 @@ class NewbookmarkAction extends Action
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_("Must be logged in to post a bookmark."),
|
throw new ClientException(_m("Must be logged in to post a bookmark."),
|
||||||
403);
|
403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,11 +130,11 @@ class NewbookmarkAction extends Action
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (empty($this->title)) {
|
if (empty($this->title)) {
|
||||||
throw new ClientException(_('Bookmark must have a title.'));
|
throw new ClientException(_m('Bookmark must have a title.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->url)) {
|
if (empty($this->url)) {
|
||||||
throw new ClientException(_('Bookmark must have an URL.'));
|
throw new ClientException(_m('Bookmark must have an URL.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ class NewbookmarkAction extends Action
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Page title after sending a notice.
|
// TRANS: Page title after sending a notice.
|
||||||
$this->element('title', null, _('Notice posted'));
|
$this->element('title', null, _m('Notice posted'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->showNotice($saved);
|
$this->showNotice($saved);
|
||||||
|
|
|
@ -67,7 +67,7 @@ class NoticebyurlAction extends Action
|
||||||
$this->file = File::staticGet('id', $this->trimmed('id'));
|
$this->file = File::staticGet('id', $this->trimmed('id'));
|
||||||
|
|
||||||
if (empty($this->file)) {
|
if (empty($this->file)) {
|
||||||
throw new ClientException(_('Unknown URL'));
|
throw new ClientException(_m('Unknown URL'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$pageArg = $this->trimmed('page');
|
$pageArg = $this->trimmed('page');
|
||||||
|
@ -89,9 +89,9 @@ class NoticebyurlAction extends Action
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
return sprintf(_("Notices linking to %s"), $this->file->url);
|
return sprintf(_m("Notices linking to %s"), $this->file->url);
|
||||||
} else {
|
} else {
|
||||||
return sprintf(_("Notices linking to %s, page %d"),
|
return sprintf(_m("Notices linking to %1$s, page %2$d"),
|
||||||
$this->file->url,
|
$this->file->url,
|
||||||
$this->page);
|
$this->page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ class ShowbookmarkAction extends ShownoticeAction
|
||||||
{
|
{
|
||||||
// TRANS: Title for bookmark.
|
// TRANS: Title for bookmark.
|
||||||
// TRANS: %1$s is a user nickname, %2$s is a bookmark title.
|
// TRANS: %1$s is a user nickname, %2$s is a bookmark title.
|
||||||
return sprintf(_('%1$s\'s bookmark for "%2$s"'),
|
return sprintf(_m('%1$s\'s bookmark for "%2$s"'),
|
||||||
$this->user->nickname,
|
$this->user->nickname,
|
||||||
$this->bookmark->title);
|
$this->bookmark->title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,8 +165,8 @@ class DirectoryPlugin extends Plugin
|
||||||
|
|
||||||
$nav->out->menuItem(
|
$nav->out->menuItem(
|
||||||
common_local_url('userdirectory'),
|
common_local_url('userdirectory'),
|
||||||
_('Directory'),
|
_m('Directory'),
|
||||||
_('User Directory'),
|
_m('User Directory'),
|
||||||
$actionName == 'userdirectory',
|
$actionName == 'userdirectory',
|
||||||
'nav_directory'
|
'nav_directory'
|
||||||
);
|
);
|
||||||
|
|
|
@ -116,7 +116,7 @@ class UserdirectoryAction extends Action
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
// TRANS: %%site.name%% is the name of the StatusNet site.
|
// TRANS: %%site.name%% is the name of the StatusNet site.
|
||||||
return _(
|
return _m(
|
||||||
'Search for people on %%site.name%% by their name, '
|
'Search for people on %%site.name%% by their name, '
|
||||||
. 'location, or interests. Separate the terms by spaces; '
|
. 'location, or interests. Separate the terms by spaces; '
|
||||||
. ' they must be 3 characters or more.'
|
. ' they must be 3 characters or more.'
|
||||||
|
@ -256,11 +256,11 @@ class UserdirectoryAction extends Action
|
||||||
|
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
|
||||||
$this->element('legend', null, _('Search site'));
|
$this->element('legend', null, _m('Search site'));
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
|
||||||
$this->input('q', _('Keyword(s)'), $this->q);
|
$this->input('q', _m('Keyword(s)'), $this->q);
|
||||||
|
|
||||||
$this->submit('search', _m('BUTTON','Search'));
|
$this->submit('search', _m('BUTTON','Search'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
@ -372,7 +372,7 @@ class UserdirectoryAction extends Action
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->element('p', 'error', _('No results.'));
|
$this->element('p', 'error', _m('No results.'));
|
||||||
$message = _m(<<<E_O_T
|
$message = _m(<<<E_O_T
|
||||||
* Make sure all words are spelled correctly.
|
* Make sure all words are spelled correctly.
|
||||||
* Try different keywords.
|
* Try different keywords.
|
||||||
|
|
|
@ -151,7 +151,7 @@ class EmailSummaryPlugin extends Plugin
|
||||||
$action->elementStart('li');
|
$action->elementStart('li');
|
||||||
$action->checkbox('emailsummary',
|
$action->checkbox('emailsummary',
|
||||||
// TRANS: Checkbox label in e-mail preferences form.
|
// TRANS: Checkbox label in e-mail preferences form.
|
||||||
_('Send me a periodic summary of updates from my network.'),
|
_m('Send me a periodic summary of updates from my network.'),
|
||||||
Email_summary_status::getSendSummary($user->id));
|
Email_summary_status::getSendSummary($user->id));
|
||||||
$action->elementEnd('li');
|
$action->elementEnd('li');
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -128,7 +128,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
'style' => 'background-color: #ffffff; border: 4px solid #4c609a; padding: 10px;'));
|
'style' => 'background-color: #ffffff; border: 4px solid #4c609a; padding: 10px;'));
|
||||||
|
|
||||||
$out->elementStart('div', array('style' => 'color: #ffffff; background-color: #4c609a; font-weight: bold; margin-bottom: 10px; padding: 4px;'));
|
$out->elementStart('div', array('style' => 'color: #ffffff; background-color: #4c609a; font-weight: bold; margin-bottom: 10px; padding: 4px;'));
|
||||||
$out->raw(sprintf(_('Recent updates from %1s for %2s:'),
|
$out->raw(sprintf(_m('Recent updates from %1s for %2s:'),
|
||||||
common_config('site', 'name'),
|
common_config('site', 'name'),
|
||||||
$profile->getBestName()));
|
$profile->getBestName()));
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
|
@ -184,7 +184,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
$out->text(' ');
|
$out->text(' ');
|
||||||
$out->element('a',
|
$out->element('a',
|
||||||
array('href' => $convurl.'#notice-'.$notice->id),
|
array('href' => $convurl.'#notice-'.$notice->id),
|
||||||
_('in context'));
|
_m('in context'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
|
@ -194,7 +194,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
|
|
||||||
$out->elementEnd('table');
|
$out->elementEnd('table');
|
||||||
|
|
||||||
$out->raw(sprintf(_('<p><a href="%1s">change your email settings for %2s</a></p>'),
|
$out->raw(sprintf(_m('<p><a href="%1s">change your email settings for %2s</a></p>'),
|
||||||
common_local_url('emailsettings'),
|
common_local_url('emailsettings'),
|
||||||
common_config('site', 'name')));
|
common_config('site', 'name')));
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ class UserEmailSummaryHandler extends QueueHandler
|
||||||
|
|
||||||
// FIXME: do something for people who don't like HTML email
|
// FIXME: do something for people who don't like HTML email
|
||||||
|
|
||||||
mail_to_user($user, _('Updates from your network'), $body,
|
mail_to_user($user, _m('Updates from your network'), $body,
|
||||||
array('Content-Type' => 'text/html; charset=UTF-8'));
|
array('Content-Type' => 'text/html; charset=UTF-8'));
|
||||||
|
|
||||||
if (empty($ess)) {
|
if (empty($ess)) {
|
||||||
|
|
|
@ -365,7 +365,7 @@ class EventPlugin extends MicroappPlugin
|
||||||
|
|
||||||
$out->elementStart('div', 'event-times'); // VEVENT/EVENT-TIMES IN
|
$out->elementStart('div', 'event-times'); // VEVENT/EVENT-TIMES IN
|
||||||
|
|
||||||
$out->element('strong', null, _('Time:'));
|
$out->element('strong', null, _m('Time:'));
|
||||||
|
|
||||||
$out->element('abbr', array('class' => 'dtstart',
|
$out->element('abbr', array('class' => 'dtstart',
|
||||||
'title' => common_date_iso8601($event->start_time)),
|
'title' => common_date_iso8601($event->start_time)),
|
||||||
|
@ -385,14 +385,14 @@ class EventPlugin extends MicroappPlugin
|
||||||
|
|
||||||
if (!empty($event->location)) {
|
if (!empty($event->location)) {
|
||||||
$out->elementStart('div', 'event-location');
|
$out->elementStart('div', 'event-location');
|
||||||
$out->element('strong', null, _('Location: '));
|
$out->element('strong', null, _m('Location:'));
|
||||||
$out->element('span', 'location', $event->location);
|
$out->element('span', 'location', $event->location);
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($event->description)) {
|
if (!empty($event->description)) {
|
||||||
$out->elementStart('div', 'event-description');
|
$out->elementStart('div', 'event-description');
|
||||||
$out->element('strong', null, _('Description: '));
|
$out->element('strong', null, _m('Description:'));
|
||||||
$out->element('span', 'description', $event->description);
|
$out->element('span', 'description', $event->description);
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
@ -400,9 +400,11 @@ class EventPlugin extends MicroappPlugin
|
||||||
$rsvps = $event->getRSVPs();
|
$rsvps = $event->getRSVPs();
|
||||||
|
|
||||||
$out->elementStart('div', 'event-rsvps');
|
$out->elementStart('div', 'event-rsvps');
|
||||||
$out->element('strong', null, _('Attending: '));
|
$out->element('strong', null, _m('Attending:'));
|
||||||
$out->element('span', 'event-rsvps',
|
$out->element('span', 'event-rsvps',
|
||||||
sprintf(_('Yes: %d No: %d Maybe: %d'),
|
// TRANS: RSVP counts.
|
||||||
|
// TRANS: %1$d, %2$d and %3$d are numbers of RSVPs.
|
||||||
|
sprintf(_m('Yes: %1$d No: %2$d Maybe: %3$d'),
|
||||||
count($rsvps[RSVP::POSITIVE]),
|
count($rsvps[RSVP::POSITIVE]),
|
||||||
count($rsvps[RSVP::NEGATIVE]),
|
count($rsvps[RSVP::NEGATIVE]),
|
||||||
count($rsvps[RSVP::POSSIBLE])));
|
count($rsvps[RSVP::POSSIBLE])));
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Happening extends Managed_DataObject
|
||||||
if (array_key_exists('uri', $options)) {
|
if (array_key_exists('uri', $options)) {
|
||||||
$other = Happening::staticGet('uri', $options['uri']);
|
$other = Happening::staticGet('uri', $options['uri']);
|
||||||
if (!empty($other)) {
|
if (!empty($other)) {
|
||||||
throw new ClientException(_('Event already exists.'));
|
throw new ClientException(_m('Event already exists.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,19 +154,21 @@ class Happening extends Managed_DataObject
|
||||||
|
|
||||||
// XXX: does this get truncated?
|
// XXX: does this get truncated?
|
||||||
|
|
||||||
$content = sprintf(_('"%s" %s - %s (%s): %s'),
|
// TRANS: Event description. %1$s is a title, %2$s is start time, %3$s is end time,
|
||||||
|
// TRANS: %4$s is location, %5$s is a description.
|
||||||
|
$content = sprintf(_m('"%1$s" %2$s - %3$s (%4$s): %5$s'),
|
||||||
$title,
|
$title,
|
||||||
common_exact_date($ev->start_time),
|
common_exact_date($ev->start_time),
|
||||||
common_exact_date($ev->end_time),
|
common_exact_date($ev->end_time),
|
||||||
$location,
|
$location,
|
||||||
$description);
|
$description);
|
||||||
|
|
||||||
$rendered = sprintf(_('<span class="vevent">'.
|
$rendered = sprintf(_m('<span class="vevent">'.
|
||||||
'<span class="summary">%s</span> '.
|
'<span class="summary">%1$s</span> '.
|
||||||
'<abbr class="dtstart" title="%s">%s</a> - '.
|
'<abbr class="dtstart" title="%2$s">%3$s</a> - '.
|
||||||
'<abbr class="dtend" title="%s">%s</a> '.
|
'<abbr class="dtend" title="%4$s">%5$s</a> '.
|
||||||
'(<span class="location">%s</span>): '.
|
'(<span class="location">%6$s</span>): '.
|
||||||
'<span class="description">%s</span> '.
|
'<span class="description">%7$s</span> '.
|
||||||
'</span>'),
|
'</span>'),
|
||||||
htmlspecialchars($title),
|
htmlspecialchars($title),
|
||||||
htmlspecialchars(common_date_iso8601($ev->start_time)),
|
htmlspecialchars(common_date_iso8601($ev->start_time)),
|
||||||
|
|
|
@ -143,7 +143,7 @@ class RSVP extends Managed_DataObject
|
||||||
if (array_key_exists('uri', $options)) {
|
if (array_key_exists('uri', $options)) {
|
||||||
$other = RSVP::staticGet('uri', $options['uri']);
|
$other = RSVP::staticGet('uri', $options['uri']);
|
||||||
if (!empty($other)) {
|
if (!empty($other)) {
|
||||||
throw new ClientException(_('RSVP already exists.'));
|
throw new ClientException(_m('RSVP already exists.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ class RSVP extends Managed_DataObject
|
||||||
'event_id' => $event->id));
|
'event_id' => $event->id));
|
||||||
|
|
||||||
if (!empty($other)) {
|
if (!empty($other)) {
|
||||||
throw new ClientException(_('RSVP already exists.'));
|
throw new ClientException(_m('RSVP already exists.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$rsvp = new RSVP();
|
$rsvp = new RSVP();
|
||||||
|
@ -316,13 +316,13 @@ class RSVP extends Managed_DataObject
|
||||||
|
|
||||||
switch ($response) {
|
switch ($response) {
|
||||||
case 'Y':
|
case 'Y':
|
||||||
$fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is attending <a href='%3s'>%4s</a>.</span>");
|
$fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is attending <a href='%3s'>%4s</a>.</span>");
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
$fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is not attending <a href='%3s'>%4s</a>.</span>");
|
$fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> is not attending <a href='%3s'>%4s</a>.</span>");
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
$fmt = _("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> might attend <a href='%3s'>%4s</a>.</span>");
|
$fmt = _m("<span class='automatic event-rsvp'><a href='%1s'>%2s</a> might attend <a href='%3s'>%4s</a>.</span>");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unknown response code {$response}");
|
throw new Exception("Unknown response code {$response}");
|
||||||
|
@ -331,7 +331,7 @@ class RSVP extends Managed_DataObject
|
||||||
|
|
||||||
if (empty($event)) {
|
if (empty($event)) {
|
||||||
$eventUrl = '#';
|
$eventUrl = '#';
|
||||||
$eventTitle = _('an unknown event');
|
$eventTitle = _m('an unknown event');
|
||||||
} else {
|
} else {
|
||||||
$notice = $event->getNotice();
|
$notice = $event->getNotice();
|
||||||
$eventUrl = $notice->bestUrl();
|
$eventUrl = $notice->bestUrl();
|
||||||
|
@ -351,13 +351,13 @@ class RSVP extends Managed_DataObject
|
||||||
|
|
||||||
switch ($response) {
|
switch ($response) {
|
||||||
case 'Y':
|
case 'Y':
|
||||||
$fmt = _("%1s is attending %2s.");
|
$fmt = _m("%1s is attending %2s.");
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
$fmt = _("%1s is not attending %2s.");
|
$fmt = _m("%1s is not attending %2s.");
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
$fmt = _("%1s might attend %2s.>");
|
$fmt = _m("%1s might attend %2s.>");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception("Unknown response code {$response}");
|
throw new Exception("Unknown response code {$response}");
|
||||||
|
@ -365,7 +365,7 @@ class RSVP extends Managed_DataObject
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($event)) {
|
if (empty($event)) {
|
||||||
$eventTitle = _('an unknown event');
|
$eventTitle = _m('an unknown event');
|
||||||
} else {
|
} else {
|
||||||
$notice = $event->getNotice();
|
$notice = $event->getNotice();
|
||||||
$eventTitle = $event->title;
|
$eventTitle = $event->title;
|
||||||
|
|
|
@ -58,7 +58,7 @@ class CancelrsvpAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('Cancel RSVP');
|
return _m('Cancel RSVP');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -79,25 +79,25 @@ class CancelrsvpAction extends Action
|
||||||
$rsvpId = $this->trimmed('rsvp');
|
$rsvpId = $this->trimmed('rsvp');
|
||||||
|
|
||||||
if (empty($rsvpId)) {
|
if (empty($rsvpId)) {
|
||||||
throw new ClientException(_('No such rsvp.'));
|
throw new ClientException(_m('No such RSVP.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->rsvp = RSVP::staticGet('id', $rsvpId);
|
$this->rsvp = RSVP::staticGet('id', $rsvpId);
|
||||||
|
|
||||||
if (empty($this->rsvp)) {
|
if (empty($this->rsvp)) {
|
||||||
throw new ClientException(_('No such rsvp.'));
|
throw new ClientException(_m('No such RSVP.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->event = Happening::staticGet('id', $this->rsvp->event_id);
|
$this->event = Happening::staticGet('id', $this->rsvp->event_id);
|
||||||
|
|
||||||
if (empty($this->event)) {
|
if (empty($this->event)) {
|
||||||
throw new ClientException(_('No such event.'));
|
throw new ClientException(_m('No such event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_('You must be logged in to RSVP for an event.'));
|
throw new ClientException(_m('You must be logged in to RSVP for an event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -154,7 +154,7 @@ class CancelrsvpAction extends Action
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Page title after sending a notice.
|
// TRANS: Page title after sending a notice.
|
||||||
$this->element('title', null, _('Event saved'));
|
$this->element('title', null, _m('Event saved'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
|
|
|
@ -102,13 +102,13 @@ class CancelRSVPForm extends Form
|
||||||
|
|
||||||
switch (RSVP::verbFor($this->rsvp->response)) {
|
switch (RSVP::verbFor($this->rsvp->response)) {
|
||||||
case RSVP::POSITIVE:
|
case RSVP::POSITIVE:
|
||||||
$this->out->text(_('You will attend this event.'));
|
$this->out->text(_m('You will attend this event.'));
|
||||||
break;
|
break;
|
||||||
case RSVP::NEGATIVE:
|
case RSVP::NEGATIVE:
|
||||||
$this->out->text(_('You will not attend this event.'));
|
$this->out->text(_m('You will not attend this event.'));
|
||||||
break;
|
break;
|
||||||
case RSVP::POSSIBLE:
|
case RSVP::POSSIBLE:
|
||||||
$this->out->text(_('You might attend this event.'));
|
$this->out->text(_m('You might attend this event.'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,58 +93,58 @@ class EventForm extends Form
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('title',
|
$this->out->input('title',
|
||||||
_('Title'),
|
_m('LABEL','Title'),
|
||||||
null,
|
null,
|
||||||
_('Title of the event'));
|
_m('Title of the event'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('startdate',
|
$this->out->input('startdate',
|
||||||
_('Start date'),
|
_m('LABEL','Start date'),
|
||||||
null,
|
null,
|
||||||
_('Date the event starts'));
|
_m('Date the event starts'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('starttime',
|
$this->out->input('starttime',
|
||||||
_('Start time'),
|
_m('LABEL','Start time'),
|
||||||
null,
|
null,
|
||||||
_('Time the event starts'));
|
_m('Time the event starts'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('enddate',
|
$this->out->input('enddate',
|
||||||
_('End date'),
|
_m('LABEL','End date'),
|
||||||
null,
|
null,
|
||||||
_('Date the event ends'));
|
_m('Date the event ends'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('endtime',
|
$this->out->input('endtime',
|
||||||
_('End time'),
|
_m('LABEL','End time'),
|
||||||
null,
|
null,
|
||||||
_('Time the event ends'));
|
_m('Time the event ends'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('location',
|
$this->out->input('location',
|
||||||
_('Location'),
|
_m('LABEL','Location'),
|
||||||
null,
|
null,
|
||||||
_('Event location'));
|
_m('Event location'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('url',
|
$this->out->input('url',
|
||||||
_('URL'),
|
_m('LABEL','URL'),
|
||||||
null,
|
null,
|
||||||
_('URL for more information'));
|
_m('URL for more information'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->input('description',
|
$this->out->input('description',
|
||||||
_('Description'),
|
_m('LABEL','Description'),
|
||||||
null,
|
null,
|
||||||
_('Description of the event'));
|
_m('Description of the event'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
|
|
|
@ -63,7 +63,7 @@ class NeweventAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('New event');
|
return _m('New event');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ class NeweventAction extends Action
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_("Must be logged in to post a event."),
|
throw new ClientException(_m("Must be logged in to post a event."),
|
||||||
403);
|
403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ class NeweventAction extends Action
|
||||||
$this->title = $this->trimmed('title');
|
$this->title = $this->trimmed('title');
|
||||||
|
|
||||||
if (empty($this->title)) {
|
if (empty($this->title)) {
|
||||||
throw new ClientException(_('Title required.'));
|
throw new ClientException(_m('Title required.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->location = $this->trimmed('location');
|
$this->location = $this->trimmed('location');
|
||||||
|
@ -102,7 +102,7 @@ class NeweventAction extends Action
|
||||||
$startDate = $this->trimmed('startdate');
|
$startDate = $this->trimmed('startdate');
|
||||||
|
|
||||||
if (empty($startDate)) {
|
if (empty($startDate)) {
|
||||||
throw new ClientException(_('Start date required.'));
|
throw new ClientException(_m('Start date required.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$startTime = $this->trimmed('starttime');
|
$startTime = $this->trimmed('starttime');
|
||||||
|
@ -114,7 +114,7 @@ class NeweventAction extends Action
|
||||||
$endDate = $this->trimmed('enddate');
|
$endDate = $this->trimmed('enddate');
|
||||||
|
|
||||||
if (empty($endDate)) {
|
if (empty($endDate)) {
|
||||||
throw new ClientException(_('End date required.'));
|
throw new ClientException(_m('End date required.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$endTime = $this->trimmed('endtime');
|
$endTime = $this->trimmed('endtime');
|
||||||
|
@ -135,13 +135,13 @@ class NeweventAction extends Action
|
||||||
$this->endTime = strtotime($end);
|
$this->endTime = strtotime($end);
|
||||||
|
|
||||||
if ($this->startTime == 0) {
|
if ($this->startTime == 0) {
|
||||||
throw new Exception(sprintf(_('Could not parse date "%s"'),
|
throw new Exception(sprintf(_m('Could not parse date "%s"'),
|
||||||
$start));
|
$start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($this->endTime == 0) {
|
if ($this->endTime == 0) {
|
||||||
throw new Exception(sprintf(_('Could not parse date "%s"'),
|
throw new Exception(sprintf(_m('Could not parse date "%s"'),
|
||||||
$end));
|
$end));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,15 +179,15 @@ class NeweventAction extends Action
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (empty($this->title)) {
|
if (empty($this->title)) {
|
||||||
throw new ClientException(_('Event must have a title.'));
|
throw new ClientException(_m('Event must have a title.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->startTime)) {
|
if (empty($this->startTime)) {
|
||||||
throw new ClientException(_('Event must have a start time.'));
|
throw new ClientException(_m('Event must have a start time.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($this->endTime)) {
|
if (empty($this->endTime)) {
|
||||||
throw new ClientException(_('Event must have an end time.'));
|
throw new ClientException(_m('Event must have an end time.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$profile = $this->user->getProfile();
|
$profile = $this->user->getProfile();
|
||||||
|
@ -216,7 +216,7 @@ class NeweventAction extends Action
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Page title after sending a notice.
|
// TRANS: Page title after sending a notice.
|
||||||
$this->element('title', null, _('Event saved'));
|
$this->element('title', null, _m('Event saved'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->showNotice($saved);
|
$this->showNotice($saved);
|
||||||
|
|
|
@ -58,7 +58,7 @@ class NewrsvpAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('New RSVP');
|
return _m('New RSVP');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -79,19 +79,19 @@ class NewrsvpAction extends Action
|
||||||
$eventId = $this->trimmed('event');
|
$eventId = $this->trimmed('event');
|
||||||
|
|
||||||
if (empty($eventId)) {
|
if (empty($eventId)) {
|
||||||
throw new ClientException(_('No such event.'));
|
throw new ClientException(_m('No such event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->event = Happening::staticGet('id', $eventId);
|
$this->event = Happening::staticGet('id', $eventId);
|
||||||
|
|
||||||
if (empty($this->event)) {
|
if (empty($this->event)) {
|
||||||
throw new ClientException(_('No such event.'));
|
throw new ClientException(_m('No such event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_('You must be logged in to RSVP for an event.'));
|
throw new ClientException(_m('You must be logged in to RSVP for an event.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
common_debug(print_r($this->args, true));
|
common_debug(print_r($this->args, true));
|
||||||
|
@ -159,7 +159,7 @@ class NewrsvpAction extends Action
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
// TRANS: Page title after sending a notice.
|
// TRANS: Page title after sending a notice.
|
||||||
$this->element('title', null, _('Event saved'));
|
$this->element('title', null, _m('Event saved'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
|
|
|
@ -98,7 +98,7 @@ class RSVPForm extends Form
|
||||||
{
|
{
|
||||||
$this->out->elementStart('fieldset', array('id' => 'new_rsvp_data'));
|
$this->out->elementStart('fieldset', array('id' => 'new_rsvp_data'));
|
||||||
|
|
||||||
$this->out->text(_('RSVP: '));
|
$this->out->text(_m('RSVP:'));
|
||||||
|
|
||||||
$this->out->hidden('event', $this->event->id);
|
$this->out->hidden('event', $this->event->id);
|
||||||
$this->out->hidden('submitvalue', '');
|
$this->out->hidden('submitvalue', '');
|
||||||
|
|
|
@ -91,7 +91,7 @@ class ShowrsvpAction extends ShownoticeAction
|
||||||
{
|
{
|
||||||
// TRANS: Title for event.
|
// TRANS: Title for event.
|
||||||
// TRANS: %1$s is a user nickname, %2$s is an event title.
|
// TRANS: %1$s is a user nickname, %2$s is an event title.
|
||||||
return sprintf(_('%1$s\'s RSVP for "%2$s"'),
|
return sprintf(_m('%1$s\'s RSVP for "%2$s"'),
|
||||||
$this->user->nickname,
|
$this->user->nickname,
|
||||||
$this->event->title);
|
$this->event->title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -618,7 +618,7 @@ class ExtendedProfileWidget extends Form
|
||||||
_m('BUTTON','Save'),
|
_m('BUTTON','Save'),
|
||||||
'submit form_action-secondary',
|
'submit form_action-secondary',
|
||||||
'save',
|
'save',
|
||||||
_('Save details')
|
_m('Save details')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ class FacebooksettingsAction extends SettingsAction {
|
||||||
* @return instructions for use
|
* @return instructions for use
|
||||||
*/
|
*/
|
||||||
function getInstructions() {
|
function getInstructions() {
|
||||||
return _('Facebook settings');
|
return _m('Facebook settings');
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -159,7 +159,7 @@ class FollowEveryonePlugin extends Plugin
|
||||||
|
|
||||||
$action->elementStart('li');
|
$action->elementStart('li');
|
||||||
// TRANS: Checkbox label in form for profile settings.
|
// TRANS: Checkbox label in form for profile settings.
|
||||||
$action->checkbox('followeveryone', _('Follow everyone'),
|
$action->checkbox('followeveryone', _m('Follow everyone'),
|
||||||
($action->arg('followeveryone')) ?
|
($action->arg('followeveryone')) ?
|
||||||
$action->arg('followeveryone') :
|
$action->arg('followeveryone') :
|
||||||
User_followeveryone_prefs::followEveryone($user->id));
|
User_followeveryone_prefs::followEveryone($user->id));
|
||||||
|
|
|
@ -255,21 +255,21 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||||
|
|
||||||
$form->out->elementStart('li');
|
$form->out->elementStart('li');
|
||||||
$form->out->dropdown('allow_privacy',
|
$form->out->dropdown('allow_privacy',
|
||||||
_('Private messages'),
|
_m('Private messages'),
|
||||||
array(Group_privacy_settings::SOMETIMES => _('Sometimes'),
|
array(Group_privacy_settings::SOMETIMES => _m('Sometimes'),
|
||||||
Group_privacy_settings::ALWAYS => _('Always'),
|
Group_privacy_settings::ALWAYS => _m('Always'),
|
||||||
Group_privacy_settings::NEVER => _('Never')),
|
Group_privacy_settings::NEVER => _m('Never')),
|
||||||
_('Whether to allow private messages to this group'),
|
_m('Whether to allow private messages to this group'),
|
||||||
false,
|
false,
|
||||||
(empty($gps)) ? Group_privacy_settings::SOMETIMES : $gps->allow_privacy);
|
(empty($gps)) ? Group_privacy_settings::SOMETIMES : $gps->allow_privacy);
|
||||||
$form->out->elementEnd('li');
|
$form->out->elementEnd('li');
|
||||||
$form->out->elementStart('li');
|
$form->out->elementStart('li');
|
||||||
$form->out->dropdown('allow_sender',
|
$form->out->dropdown('allow_sender',
|
||||||
_('Private sender'),
|
_m('Private sender'),
|
||||||
array(Group_privacy_settings::EVERYONE => _('Everyone'),
|
array(Group_privacy_settings::EVERYONE => _m('Everyone'),
|
||||||
Group_privacy_settings::MEMBER => _('Member'),
|
Group_privacy_settings::MEMBER => _m('Member'),
|
||||||
Group_privacy_settings::ADMIN => _('Admin')),
|
Group_privacy_settings::ADMIN => _m('Admin')),
|
||||||
_('Who can send private messages to the group'),
|
_m('Who can send private messages to the group'),
|
||||||
false,
|
false,
|
||||||
(empty($gps)) ? Group_privacy_settings::MEMBER : $gps->allow_sender);
|
(empty($gps)) ? Group_privacy_settings::MEMBER : $gps->allow_sender);
|
||||||
$form->out->elementEnd('li');
|
$form->out->elementEnd('li');
|
||||||
|
@ -370,8 +370,8 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||||
|
|
||||||
$action->elementStart('li', 'entity_send-a-message');
|
$action->elementStart('li', 'entity_send-a-message');
|
||||||
$action->element('a', array('href' => common_local_url('newgroupmessage', array('nickname' => $group->nickname)),
|
$action->element('a', array('href' => common_local_url('newgroupmessage', array('nickname' => $group->nickname)),
|
||||||
'title' => _('Send a direct message to this group')),
|
'title' => _m('Send a direct message to this group')),
|
||||||
_('Message'));
|
_m('Message'));
|
||||||
// $form = new GroupMessageForm($action, $group);
|
// $form = new GroupMessageForm($action, $group);
|
||||||
// $form->hidden = true;
|
// $form->hidden = true;
|
||||||
// $form->show();
|
// $form->show();
|
||||||
|
@ -454,7 +454,7 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||||
|
|
||||||
// Don't save the notice!
|
// Don't save the notice!
|
||||||
// FIXME: this is probably cheating.
|
// FIXME: this is probably cheating.
|
||||||
throw new ClientException(sprintf(_('Forced notice to private group message.')),
|
throw new ClientException(sprintf(_m('Forced notice to private group message.')),
|
||||||
200);
|
200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,7 +476,7 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||||
$gps = Group_privacy_settings::forGroup($group);
|
$gps = Group_privacy_settings::forGroup($group);
|
||||||
|
|
||||||
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
|
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
|
||||||
$action->element('p', 'privategroupindicator', _('Private'));
|
$action->element('p', 'privategroupindicator', _m('Private'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -123,7 +123,7 @@ class Group_message extends Memcached_DataObject
|
||||||
{
|
{
|
||||||
if (!$user->hasRight(Right::NEWMESSAGE)) {
|
if (!$user->hasRight(Right::NEWMESSAGE)) {
|
||||||
// XXX: maybe break this out into a separate right
|
// XXX: maybe break this out into a separate right
|
||||||
throw new Exception(sprintf(_('User %s not allowed to send private messages.'),
|
throw new Exception(sprintf(_m('User %s is not allowed to send private messages.'),
|
||||||
$user->nickname));
|
$user->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ class Group_message extends Memcached_DataObject
|
||||||
{
|
{
|
||||||
$group = User_group::staticGet('id', $this->to_group);
|
$group = User_group::staticGet('id', $this->to_group);
|
||||||
if (empty($group)) {
|
if (empty($group)) {
|
||||||
throw new ServerException(_('No group for group message'));
|
throw new ServerException(_m('No group for group message'));
|
||||||
}
|
}
|
||||||
return $group;
|
return $group;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ class Group_message extends Memcached_DataObject
|
||||||
{
|
{
|
||||||
$sender = Profile::staticGet('id', $this->from_profile);
|
$sender = Profile::staticGet('id', $this->from_profile);
|
||||||
if (empty($sender)) {
|
if (empty($sender)) {
|
||||||
throw new ServerException(_('No sender for group message'));
|
throw new ServerException(_m('No sender for group message'));
|
||||||
}
|
}
|
||||||
return $sender;
|
return $sender;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,27 +156,27 @@ class Group_message_profile extends Memcached_DataObject
|
||||||
|
|
||||||
// TRANS: Subject for direct-message notification email.
|
// TRANS: Subject for direct-message notification email.
|
||||||
// TRANS: %s is the sending user's nickname.
|
// TRANS: %s is the sending user's nickname.
|
||||||
$subject = sprintf(_('New private message from %s to group %s'), $from_profile->nickname, $group->nickname);
|
$subject = sprintf(_m('New private message from %1$s to group %2$s'), $from_profile->nickname, $group->nickname);
|
||||||
|
|
||||||
// TRANS: Body for direct-message notification email.
|
// TRANS: Body for direct-message notification email.
|
||||||
// TRANS: %1$s is the sending user's long name, %2$s is the sending user's nickname,
|
// TRANS: %1$s is the sending user's long name, %2$s is the sending user's nickname,
|
||||||
// TRANS: %3$s is the message content, %4$s a URL to the message,
|
// TRANS: %3$s is the message content, %4$s a URL to the message,
|
||||||
// TRANS: %5$s is the StatusNet sitename.
|
// TRANS: %5$s is the StatusNet sitename.
|
||||||
$body = sprintf(_("%1\$s (%2\$s) sent a private message to group %3\$s:\n\n".
|
$body = sprintf(_m("%1\$s (%2\$s) sent a private message to group %3\$s:\n\n".
|
||||||
"------------------------------------------------------\n".
|
"------------------------------------------------------\n".
|
||||||
"%4\$s\n".
|
"%4\$s\n".
|
||||||
"------------------------------------------------------\n\n".
|
"------------------------------------------------------\n\n".
|
||||||
"You can reply to their message here:\n\n".
|
"You can reply to their message here:\n\n".
|
||||||
"%5\$s\n\n".
|
"%5\$s\n\n".
|
||||||
"Don't reply to this email; it won't get to them.\n\n".
|
"Do not reply to this email; it will not get to them.\n\n".
|
||||||
"With kind regards,\n".
|
"With kind regards,\n".
|
||||||
"%6\$s\n"),
|
"%6\$s"),
|
||||||
$from_profile->getBestName(),
|
$from_profile->getBestName(),
|
||||||
$from_profile->nickname,
|
$from_profile->nickname,
|
||||||
$group->nickname,
|
$group->nickname,
|
||||||
$gm->content,
|
$gm->content,
|
||||||
common_local_url('newmessage', array('to' => $from_profile->id)),
|
common_local_url('newmessage', array('to' => $from_profile->id)),
|
||||||
common_config('site', 'name'));
|
common_config('site', 'name')) . "\n";
|
||||||
|
|
||||||
$headers = _mail_prepare_headers('message', $to->nickname, $from_profile->nickname);
|
$headers = _mail_prepare_headers('message', $to->nickname, $from_profile->nickname);
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ class Group_privacy_settings extends Memcached_DataObject
|
||||||
$gps = self::forGroup($group);
|
$gps = self::forGroup($group);
|
||||||
|
|
||||||
if ($gps->allow_privacy == Group_privacy_settings::NEVER) {
|
if ($gps->allow_privacy == Group_privacy_settings::NEVER) {
|
||||||
throw new Exception(sprintf(_('Group %s does not allow private messages.'),
|
throw new Exception(sprintf(_m('Group %s does not allow private messages.'),
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,27 +172,27 @@ class Group_privacy_settings extends Memcached_DataObject
|
||||||
case Group_privacy_settings::EVERYONE:
|
case Group_privacy_settings::EVERYONE:
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
if (Group_block::isBlocked($group, $profile)) {
|
if (Group_block::isBlocked($group, $profile)) {
|
||||||
throw new Exception(sprintf(_('User %s is blocked from group %s.'),
|
throw new Exception(sprintf(_m('User %1$s is blocked from group %2$s.'),
|
||||||
$user->nickname,
|
$user->nickname,
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Group_privacy_settings::MEMBER:
|
case Group_privacy_settings::MEMBER:
|
||||||
if (!$user->isMember($group)) {
|
if (!$user->isMember($group)) {
|
||||||
throw new Exception(sprintf(_('User %s is not a member of group %s.'),
|
throw new Exception(sprintf(_m('User %1$s is not a member of group %2$s.'),
|
||||||
$user->nickname,
|
$user->nickname,
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Group_privacy_settings::ADMIN:
|
case Group_privacy_settings::ADMIN:
|
||||||
if (!$user->isAdmin($group)) {
|
if (!$user->isAdmin($group)) {
|
||||||
throw new Exception(sprintf(_('User %s is not an administrator of group %s.'),
|
throw new Exception(sprintf(_m('User %1$s is not an administrator of group %2$s.'),
|
||||||
$user->nickname,
|
$user->nickname,
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception(sprintf(_('Unknown privacy settings for group %s.'),
|
throw new Exception(sprintf(_m('Unknown privacy settings for group %s.'),
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class GroupinboxAction extends GroupDesignAction
|
||||||
$cur = common_current_user();
|
$cur = common_current_user();
|
||||||
|
|
||||||
if (empty($cur)) {
|
if (empty($cur)) {
|
||||||
throw new ClientException(_('Only for logged-in users'), 403);
|
throw new ClientException(_m('Only for logged-in users.'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$nicknameArg = $this->trimmed('nickname');
|
$nicknameArg = $this->trimmed('nickname');
|
||||||
|
@ -79,17 +79,17 @@ class GroupinboxAction extends GroupDesignAction
|
||||||
$localGroup = Local_group::staticGet('nickname', $nickname);
|
$localGroup = Local_group::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (empty($localGroup)) {
|
if (empty($localGroup)) {
|
||||||
throw new ClientException(_('No such group'), 404);
|
throw new ClientException(_m('No such group.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $localGroup->group_id);
|
$this->group = User_group::staticGet('id', $localGroup->group_id);
|
||||||
|
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
throw new ClientException(_('No such group'), 404);
|
throw new ClientException(_m('No such group.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$cur->isMember($this->group)) {
|
if (!$cur->isMember($this->group)) {
|
||||||
throw new ClientException(_('Only for members'), 403);
|
throw new ClientException(_m('Only for members.'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->page = $this->trimmed('page');
|
$this->page = $this->trimmed('page');
|
||||||
|
@ -167,11 +167,11 @@ class GroupinboxAction extends GroupDesignAction
|
||||||
$base = $this->group->getFancyName();
|
$base = $this->group->getFancyName();
|
||||||
|
|
||||||
if ($this->page == 1) {
|
if ($this->page == 1) {
|
||||||
return sprintf(_('%s group inbox'), $base);
|
return sprintf(_m('%s group inbox'), $base);
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Page title for any but first group page.
|
// TRANS: Page title for any but first group page.
|
||||||
// TRANS: %1$s is a group name, $2$s is a page number.
|
// TRANS: %1$s is a group name, $2$s is a page number.
|
||||||
return sprintf(_('%1$s group inbox, page %2$d'),
|
return sprintf(_m('%1$s group inbox, page %2$d'),
|
||||||
$base,
|
$base,
|
||||||
$this->page);
|
$this->page);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ class GroupMessageCommand extends Command
|
||||||
$gm = Group_message::send($this->user, $group, $this->text);
|
$gm = Group_message::send($this->user, $group, $this->text);
|
||||||
|
|
||||||
$channel->output($this->user,
|
$channel->output($this->user,
|
||||||
sprintf(_('Direct message to group %s sent.'),
|
sprintf(_m('Direct message to group %s sent.'),
|
||||||
$group->nickname));
|
$group->nickname));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -87,7 +87,7 @@ class GroupMessageForm extends Form
|
||||||
{
|
{
|
||||||
$this->out->element('legend',
|
$this->out->element('legend',
|
||||||
null,
|
null,
|
||||||
sprintf(_('Message to %s'), $this->group->nickname));
|
sprintf(_m('Message to %s'), $this->group->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,7 +128,7 @@ class GroupMessageForm extends Form
|
||||||
{
|
{
|
||||||
$this->out->element('label', array('for' => 'notice_data-text',
|
$this->out->element('label', array('for' => 'notice_data-text',
|
||||||
'id' => 'notice_data-text-label'),
|
'id' => 'notice_data-text-label'),
|
||||||
sprintf(_('Direct message to %s'), $this->group->nickname));
|
sprintf(_m('Direct message to %s'), $this->group->nickname));
|
||||||
|
|
||||||
$this->out->element('textarea', array('id' => 'notice_data-text',
|
$this->out->element('textarea', array('id' => 'notice_data-text',
|
||||||
'cols' => 35,
|
'cols' => 35,
|
||||||
|
@ -140,7 +140,7 @@ class GroupMessageForm extends Form
|
||||||
|
|
||||||
if ($contentLimit > 0) {
|
if ($contentLimit > 0) {
|
||||||
$this->out->elementStart('dl', 'form_note');
|
$this->out->elementStart('dl', 'form_note');
|
||||||
$this->out->element('dt', null, _('Available characters'));
|
$this->out->element('dt', null, _m('Available characters'));
|
||||||
$this->out->element('dd', array('class' => 'count'),
|
$this->out->element('dd', array('class' => 'count'),
|
||||||
$contentLimit);
|
$contentLimit);
|
||||||
$this->out->elementEnd('dl');
|
$this->out->elementEnd('dl');
|
||||||
|
|
|
@ -66,11 +66,11 @@ class NewgroupmessageAction extends Action
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_('Must be logged in.'), 403);
|
throw new ClientException(_m('Must be logged in.'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->user->hasRight(Right::NEWMESSAGE)) {
|
if (!$this->user->hasRight(Right::NEWMESSAGE)) {
|
||||||
throw new Exception(sprintf(_('User %s not allowed to send private messages.'),
|
throw new Exception(sprintf(_m('User %s not allowed to send private messages.'),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,13 +87,13 @@ class NewgroupmessageAction extends Action
|
||||||
$localGroup = Local_group::staticGet('nickname', $nickname);
|
$localGroup = Local_group::staticGet('nickname', $nickname);
|
||||||
|
|
||||||
if (empty($localGroup)) {
|
if (empty($localGroup)) {
|
||||||
throw new ClientException(_('No such group'), 404);
|
throw new ClientException(_m('No such group.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $localGroup->group_id);
|
$this->group = User_group::staticGet('id', $localGroup->group_id);
|
||||||
|
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
throw new ClientException(_('No such group'), 404);
|
throw new ClientException(_m('No such group.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This throws an exception on error
|
// This throws an exception on error
|
||||||
|
@ -140,12 +140,12 @@ class NewgroupmessageAction extends Action
|
||||||
if ($this->boolean('ajax')) {
|
if ($this->boolean('ajax')) {
|
||||||
$this->startHTML('text/xml;charset=utf-8');
|
$this->startHTML('text/xml;charset=utf-8');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
$this->element('title', null, _('Message sent'));
|
$this->element('title', null, _m('Message sent'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
$this->element('p',
|
$this->element('p',
|
||||||
array('id' => 'command_result'),
|
array('id' => 'command_result'),
|
||||||
sprintf(_('Direct message to %s sent.'),
|
sprintf(_m('Direct message to %s sent.'),
|
||||||
$this->group->nickname));
|
$this->group->nickname));
|
||||||
$this->elementEnd('body');
|
$this->elementEnd('body');
|
||||||
$this->elementEnd('html');
|
$this->elementEnd('html');
|
||||||
|
@ -156,6 +156,6 @@ class NewgroupmessageAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return sprintf(_('New message to group %s'), $this->group->nickname);
|
return sprintf(_m('New message to group %s'), $this->group->nickname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ class ShowgroupmessageAction extends Action
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ClientException(_('Only logged-in users can view private messages.'),
|
throw new ClientException(_m('Only logged-in users can view private messages.'),
|
||||||
403);
|
403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,23 +76,23 @@ class ShowgroupmessageAction extends Action
|
||||||
$this->gm = Group_message::staticGet('id', $id);
|
$this->gm = Group_message::staticGet('id', $id);
|
||||||
|
|
||||||
if (empty($this->gm)) {
|
if (empty($this->gm)) {
|
||||||
throw new ClientException(_('No such message'), 404);
|
throw new ClientException(_m('No such message.'), 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->group = User_group::staticGet('id', $this->gm->to_group);
|
$this->group = User_group::staticGet('id', $this->gm->to_group);
|
||||||
|
|
||||||
if (empty($this->group)) {
|
if (empty($this->group)) {
|
||||||
throw new ServerException(_('Group not found.'));
|
throw new ServerException(_m('Group not found.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->user->isMember($this->group)) {
|
if (!$this->user->isMember($this->group)) {
|
||||||
throw new ClientException(_('Cannot read message.'), 403);
|
throw new ClientException(_m('Cannot read message.'), 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sender = Profile::staticGet('id', $this->gm->from_profile);
|
$this->sender = Profile::staticGet('id', $this->gm->from_profile);
|
||||||
|
|
||||||
if (empty($this->sender)) {
|
if (empty($this->sender)) {
|
||||||
throw new ServerException(_('No sender found.'));
|
throw new ServerException(_m('No sender found.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -117,7 +117,7 @@ class ShowgroupmessageAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return sprintf(_('Message from %1$s to group %2$s on %3$s'),
|
return sprintf(_m('Message from %1$s to group %2$s on %3$s'),
|
||||||
$this->sender->nickname,
|
$this->sender->nickname,
|
||||||
$this->group->nickname,
|
$this->group->nickname,
|
||||||
common_exact_date($this->gm->created));
|
common_exact_date($this->gm->created));
|
||||||
|
|
|
@ -290,12 +290,12 @@ class IrcPlugin extends ImPlugin {
|
||||||
* @return boolean success value
|
* @return boolean success value
|
||||||
*/
|
*/
|
||||||
public function sendConfirmationCode($screenname, $code, $user, $checked = false) {
|
public function sendConfirmationCode($screenname, $code, $user, $checked = false) {
|
||||||
$body = sprintf(_('User "%s" on %s has said that your %s screenname belongs to them. ' .
|
$body = sprintf(_m('User "%1$s" on %2$s has said that your %3$s screenname belongs to them. ' .
|
||||||
'If that\'s true, you can confirm by clicking on this URL: ' .
|
'If that\'s true, you can confirm by clicking on this URL: ' .
|
||||||
'%s' .
|
'%4$s' .
|
||||||
' . (If you cannot click it, copy-and-paste it into the ' .
|
' . (If you cannot click it, copy-and-paste it into the ' .
|
||||||
'address bar of your browser). If that user isn\'t you, ' .
|
'address bar of your browser). If that user is not you, ' .
|
||||||
'or if you didn\'t request this confirmation, just ignore this message.'),
|
'or if you did not request this confirmation, just ignore this message.'),
|
||||||
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
|
$user->nickname, common_config('site', 'name'), $this->getDisplayName(), common_local_url('confirmaddress', array('code' => $code)));
|
||||||
|
|
||||||
if ($this->regcheck && !$checked) {
|
if ($this->regcheck && !$checked) {
|
||||||
|
|
|
@ -244,7 +244,7 @@ class IrcManager extends ImManager {
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
common_log_db_error($confirm, 'DELETE', __FILE__);
|
common_log_db_error($confirm, 'DELETE', __FILE__);
|
||||||
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
// TRANS: Server error thrown on database error canceling IM address confirmation.
|
||||||
$this->serverError(_('Couldn\'t delete confirmation.'));
|
$this->serverError(_m('Could not delete confirmation.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,7 @@ class LdapCommon
|
||||||
function changePassword($username,$oldpassword,$newpassword)
|
function changePassword($username,$oldpassword,$newpassword)
|
||||||
{
|
{
|
||||||
if(! isset($this->attributes['password']) || !isset($this->password_encoding)){
|
if(! isset($this->attributes['password']) || !isset($this->password_encoding)){
|
||||||
//throw new Exception(_('Sorry, changing LDAP passwords is not supported at this time'));
|
//throw new Exception(_m('Sorry, changing LDAP passwords is not supported at this time.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$entry = $this->get_user($username,array('dn' => 'dn'));
|
$entry = $this->get_user($username,array('dn' => 'dn'));
|
||||||
|
|
|
@ -56,7 +56,7 @@ class OembedproxyAction extends OembedAction
|
||||||
// We're not a general oEmbed proxy service; limit to valid sessions.
|
// We're not a general oEmbed proxy service; limit to valid sessions.
|
||||||
$token = $this->trimmed('token');
|
$token = $this->trimmed('token');
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
$this->clientError(_('There was a problem with your session token. '.
|
$this->clientError(_m('There was a problem with your session token. '.
|
||||||
'Try again, please.'));
|
'Try again, please.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ class LinkbackPlugin extends Plugin
|
||||||
{
|
{
|
||||||
$profile = $this->notice->getProfile();
|
$profile = $this->notice->getProfile();
|
||||||
|
|
||||||
$args = array('title' => sprintf(_('%1$s\'s status on %2$s'),
|
$args = array('title' => sprintf(_m('%1$s\'s status on %2$s'),
|
||||||
$profile->nickname,
|
$profile->nickname,
|
||||||
common_exact_date($this->notice->created)),
|
common_exact_date($this->notice->created)),
|
||||||
'excerpt' => $this->notice->content,
|
'excerpt' => $this->notice->content,
|
||||||
|
|
|
@ -15,7 +15,7 @@ class RemoteProfileAction extends ShowstreamAction
|
||||||
$this->profile = Profile::staticGet('id', $id);
|
$this->profile = Profile::staticGet('id', $id);
|
||||||
|
|
||||||
if (!$this->profile) {
|
if (!$this->profile) {
|
||||||
$this->serverError(_('User has no profile.'));
|
$this->serverError(_m('User has no profile.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ class MollomPlugin extends Plugin
|
||||||
);
|
);
|
||||||
$response = $this->mollom('mollom.checkContent', $data);
|
$response = $this->mollom('mollom.checkContent', $data);
|
||||||
if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
|
if ($response['spam'] == MOLLOM_ANALYSIS_SPAM) {
|
||||||
throw new ClientException(_("Spam Detected"), 400);
|
throw new ClientException(_m("Spam Detected."), 400);
|
||||||
}
|
}
|
||||||
if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
|
if ($response['spam'] == MOLLOM_ANALYSIS_UNSURE) {
|
||||||
//if unsure, let through
|
//if unsure, let through
|
||||||
|
|
|
@ -157,7 +157,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
|
|
||||||
if (!empty($old)) {
|
if (!empty($old)) {
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('This is already a favorite.'));
|
throw new ClientException(_m('This is already a favorite.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Fave::addNew($profile, $notice)) {
|
if (!Fave::addNew($profile, $notice)) {
|
||||||
|
@ -179,7 +179,7 @@ class UsersalmonAction extends SalmonAction
|
||||||
'notice_id' => $notice->id));
|
'notice_id' => $notice->id));
|
||||||
if (empty($fave)) {
|
if (empty($fave)) {
|
||||||
// TRANS: Client exception.
|
// TRANS: Client exception.
|
||||||
throw new ClientException(_('Notice wasn\'t favorited!'));
|
throw new ClientException(_m('Notice was not favorited!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$fave->delete();
|
$fave->delete();
|
||||||
|
|
|
@ -125,12 +125,12 @@ class FinishopenidloginAction extends Action
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->input('newname', _m('New nickname'),
|
$this->input('newname', _m('New nickname'),
|
||||||
($this->username) ? $this->username : '',
|
($this->username) ? $this->username : '',
|
||||||
_m('1-64 lowercase letters or numbers, no punctuation or spaces'));
|
_m('1-64 lowercase letters or numbers, no punctuation or spaces.'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->input('email', _('Email'), $this->getEmail(),
|
$this->input('email', _m('Email'), $this->getEmail(),
|
||||||
_('Used only for updates, announcements, '.
|
_m('Used only for updates, announcements, '.
|
||||||
'and password recovery'));
|
'and password recovery.'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
|
||||||
// Hook point for captcha etc
|
// Hook point for captcha etc
|
||||||
|
@ -146,7 +146,7 @@ class FinishopenidloginAction extends Action
|
||||||
'class' => 'checkbox'));
|
'class' => 'checkbox'));
|
||||||
// TRANS: OpenID plugin link text.
|
// TRANS: OpenID plugin link text.
|
||||||
// TRANS: %s is a link to a licese with the license name as link text.
|
// TRANS: %s is a link to a licese with the license name as link text.
|
||||||
$message = _('My text and files are available under %s ' .
|
$message = _m('My text and files are available under %s ' .
|
||||||
'except this private data: password, ' .
|
'except this private data: password, ' .
|
||||||
'email address, IM address, and phone number.');
|
'email address, IM address, and phone number.');
|
||||||
$link = '<a href="' .
|
$link = '<a href="' .
|
||||||
|
|
|
@ -275,6 +275,6 @@ class OpenIDAdminPanelForm extends AdminForm
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Save'), 'submit', null, _m('Save OpenID settings'));
|
$this->out->submit('submit', _m('Save'), 'submit', null, _m('Save OpenID settings.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,7 +444,7 @@ class PollPlugin extends MicroAppPlugin
|
||||||
$form->show();
|
$form->show();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$out->text(_('Poll data is missing'));
|
$out->text(_m('Poll data is missing'));
|
||||||
}
|
}
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class LoggingAggregatorAction extends Action
|
||||||
parent::handle($args);
|
parent::handle($args);
|
||||||
|
|
||||||
if (empty($this->url)) {
|
if (empty($this->url)) {
|
||||||
$this->showError(_('A URL parameter is required.'));
|
$this->showError(_m('A URL parameter is required.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ class RecaptchaPlugin extends Plugin
|
||||||
|
|
||||||
if (!$resp->is_valid) {
|
if (!$resp->is_valid) {
|
||||||
if($this->display_errors) {
|
if($this->display_errors) {
|
||||||
$action->showForm(sprintf(_("(reCAPTCHA error: %s)", $resp->error)));
|
$action->showForm(sprintf(_m("(reCAPTCHA error: %s)", $resp->error)));
|
||||||
}
|
}
|
||||||
$action->showForm(_m("Captcha does not match!"));
|
$action->showForm(_m("Captcha does not match!"));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ConfirmfirstemailAction extends Action
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
throw new ClientException(_('You are already logged in.'));
|
throw new ClientException(_m('You are already logged in.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->code = $this->trimmed('code');
|
$this->code = $this->trimmed('code');
|
||||||
|
@ -74,25 +74,25 @@ class ConfirmfirstemailAction extends Action
|
||||||
$this->confirm = Confirm_address::staticGet('code', $this->code);
|
$this->confirm = Confirm_address::staticGet('code', $this->code);
|
||||||
|
|
||||||
if (empty($this->confirm)) {
|
if (empty($this->confirm)) {
|
||||||
throw new ClientException(_('Confirmation code not found.'));
|
throw new ClientException(_m('Confirmation code not found.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::staticGet('id', $this->confirm->user_id);
|
$this->user = User::staticGet('id', $this->confirm->user_id);
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
throw new ServerException(_('No user for that confirmation code.'));
|
throw new ServerException(_m('No user for that confirmation code.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $this->confirm->address_type;
|
$type = $this->confirm->address_type;
|
||||||
|
|
||||||
if ($type != 'email') {
|
if ($type != 'email') {
|
||||||
throw new ServerException(sprintf(_('Unrecognized address type %s.'), $type));
|
throw new ServerException(sprintf(_m('Unrecognized address type %s.'), $type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($this->user->email) && $this->user->email == $confirm->address) {
|
if (!empty($this->user->email) && $this->user->email == $confirm->address) {
|
||||||
// TRANS: Client error for an already confirmed email/jabber/sms address.
|
// TRANS: Client error for an already confirmed email/jabber/sms address.
|
||||||
throw new ClientException(_('That address has already been confirmed.'));
|
throw new ClientException(_m('That address has already been confirmed.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isPost()) {
|
if ($this->isPost()) {
|
||||||
|
@ -103,10 +103,10 @@ class ConfirmfirstemailAction extends Action
|
||||||
$confirm = $this->trimmed('confirm');
|
$confirm = $this->trimmed('confirm');
|
||||||
|
|
||||||
if (strlen($password) < 6) {
|
if (strlen($password) < 6) {
|
||||||
throw new ClientException(_('Password too short.'));
|
throw new ClientException(_m('Password too short.'));
|
||||||
return;
|
return;
|
||||||
} else if (0 != strcmp($password, $confirm)) {
|
} else if (0 != strcmp($password, $confirm)) {
|
||||||
throw new ClientException(_("Passwords don't match."));
|
throw new ClientException(_m("Passwords do not match."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ class ConfirmfirstemailAction extends Action
|
||||||
function showContent()
|
function showContent()
|
||||||
{
|
{
|
||||||
$this->element('p', 'instructions',
|
$this->element('p', 'instructions',
|
||||||
sprintf(_('You have confirmed the email address for your new user account %s. '.
|
sprintf(_m('You have confirmed the email address for your new user account %s. '.
|
||||||
'Use the form below to set your new password.'),
|
'Use the form below to set your new password.'),
|
||||||
$this->user->nickname));
|
$this->user->nickname));
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ class ConfirmfirstemailAction extends Action
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
{
|
{
|
||||||
return _('Set a password');
|
return _m('Set a password');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ class ConfirmFirstEmailForm extends Form
|
||||||
|
|
||||||
function formLegend()
|
function formLegend()
|
||||||
{
|
{
|
||||||
return _('Confirm email');
|
return _m('Confirm email');
|
||||||
}
|
}
|
||||||
|
|
||||||
function action()
|
function action()
|
||||||
|
@ -206,18 +206,18 @@ class ConfirmFirstEmailForm extends Form
|
||||||
{
|
{
|
||||||
$this->out->elementStart('ul', 'form_data');
|
$this->out->elementStart('ul', 'form_data');
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$this->out->password('password', _('New password'),
|
$this->out->password('password', _m('New password'),
|
||||||
_('6 or more characters.'));
|
_m('6 or more characters.'));
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
$this->out->elementStart('li');
|
$this->out->elementStart('li');
|
||||||
$this->out->password('confirm', _('Confirm'),
|
$this->out->password('confirm', _m('Confirm'),
|
||||||
_('Same as password above.'));
|
_m('Same as password above.'));
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
}
|
}
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('save', _('Save'));
|
$this->out->submit('save', _m('Save'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ class SearchsubAction extends Action
|
||||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||||
// TRANS: Client error displayed trying to perform any request method other than POST.
|
// TRANS: Client error displayed trying to perform any request method other than POST.
|
||||||
// TRANS: Do not translate POST.
|
// TRANS: Do not translate POST.
|
||||||
$this->clientError(_('This action only accepts POST requests.'));
|
$this->clientError(_m('This action only accepts POST requests.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class SearchsubAction extends Action
|
||||||
|
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
// TRANS: Client error displayed when the session token is not okay.
|
// TRANS: Client error displayed when the session token is not okay.
|
||||||
$this->clientError(_('There was a problem with your session token.'.
|
$this->clientError(_m('There was a problem with your session token.'.
|
||||||
' Try again, please.'));
|
' Try again, please.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class SearchsubAction extends Action
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
// TRANS: Client error displayed trying to subscribe when not logged in.
|
// TRANS: Client error displayed trying to subscribe when not logged in.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_m('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class SearchsubAction extends Action
|
||||||
|
|
||||||
if (empty($this->search)) {
|
if (empty($this->search)) {
|
||||||
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
||||||
$this->clientError(_('No such profile.'));
|
$this->clientError(_m('No such profile.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,6 @@ class SearchSubForm extends Form
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Subscribe'), 'submit', null, _m('Subscribe to this search'));
|
$this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this search'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,6 @@ class SearchUnsubForm extends SearchSubForm
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Unsubscribe'), 'submit', null, _m('Unsubscribe from this search'));
|
$this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this search'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ class MirrorSettingsAction extends SettingsAction
|
||||||
header('Content-Type: text/html;charset=utf-8');
|
header('Content-Type: text/html;charset=utf-8');
|
||||||
$this->elementStart('html');
|
$this->elementStart('html');
|
||||||
$this->elementStart('head');
|
$this->elementStart('head');
|
||||||
$this->element('title', null, _('Provider add'));
|
$this->element('title', null, _m('Provider add'));
|
||||||
$this->elementEnd('head');
|
$this->elementEnd('head');
|
||||||
$this->elementStart('body');
|
$this->elementStart('body');
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class SubscriptionThrottlePlugin extends Plugin
|
||||||
$subtime = strtotime($sub->created);
|
$subtime = strtotime($sub->created);
|
||||||
$now = time();
|
$now = time();
|
||||||
if ($now - $subtime < $seconds) {
|
if ($now - $subtime < $seconds) {
|
||||||
throw new Exception(_("Too many subscriptions. Take a break and try again later."));
|
throw new Exception(_m("Too many subscriptions. Take a break and try again later."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ class SubscriptionThrottlePlugin extends Plugin
|
||||||
$jointime = strtotime($mem->created);
|
$jointime = strtotime($mem->created);
|
||||||
$now = time();
|
$now = time();
|
||||||
if ($now - $jointime < $seconds) {
|
if ($now - $jointime < $seconds) {
|
||||||
throw new Exception(_("Too many memberships. Take a break and try again later."));
|
throw new Exception(_m("Too many memberships. Take a break and try again later."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ class TagsubAction extends Action
|
||||||
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
|
||||||
// TRANS: Client error displayed trying to perform any request method other than POST.
|
// TRANS: Client error displayed trying to perform any request method other than POST.
|
||||||
// TRANS: Do not translate POST.
|
// TRANS: Do not translate POST.
|
||||||
$this->clientError(_('This action only accepts POST requests.'));
|
$this->clientError(_m('This action only accepts POST requests.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class TagsubAction extends Action
|
||||||
|
|
||||||
if (!$token || $token != common_session_token()) {
|
if (!$token || $token != common_session_token()) {
|
||||||
// TRANS: Client error displayed when the session token is not okay.
|
// TRANS: Client error displayed when the session token is not okay.
|
||||||
$this->clientError(_('There was a problem with your session token.'.
|
$this->clientError(_m('There was a problem with your session token.'.
|
||||||
' Try again, please.'));
|
' Try again, please.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class TagsubAction extends Action
|
||||||
|
|
||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
// TRANS: Client error displayed trying to subscribe when not logged in.
|
// TRANS: Client error displayed trying to subscribe when not logged in.
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_m('Not logged in.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ class TagsubAction extends Action
|
||||||
|
|
||||||
if (empty($this->tag)) {
|
if (empty($this->tag)) {
|
||||||
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
// TRANS: Client error displayed trying to subscribe to a non-existing profile.
|
||||||
$this->clientError(_('No such profile.'));
|
$this->clientError(_m('No such profile.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,6 @@ class TagSubForm extends Form
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Subscribe'), 'submit', null, _m('Subscribe to this tag'));
|
$this->out->submit('submit', _m('BUTTON','Subscribe'), 'submit', null, _m('Subscribe to this tag'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,13 +115,13 @@ class TagSubsAction extends GalleryAction
|
||||||
$current_user = common_current_user();
|
$current_user = common_current_user();
|
||||||
if ($this->user->id === $current_user->id) {
|
if ($this->user->id === $current_user->id) {
|
||||||
// TRANS: Tag subscription list text when the logged in user has no tag subscriptions.
|
// TRANS: Tag subscription list text when the logged in user has no tag subscriptions.
|
||||||
$message = _('You\'re not listening to any hash tags right now. You can push the "Subscribe" button ' .
|
$message = _m('You are not listening to any hash tags right now. You can push the "Subscribe" button ' .
|
||||||
'on any hashtag page to automatically receive any public messages on this site that use that ' .
|
'on any hashtag page to automatically receive any public messages on this site that use that ' .
|
||||||
'tag, even if you\'re not subscribed to the poster.');
|
'tag, even if you are not subscribed to the poster.');
|
||||||
} else {
|
} else {
|
||||||
// TRANS: Tag subscription list text when looking at the subscriptions for a of a user other
|
// TRANS: Tag subscription list text when looking at the subscriptions for a of a user other
|
||||||
// TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname.
|
// TRANS: than the logged in user that has no tag subscriptions. %s is the user nickname.
|
||||||
$message = sprintf(_('%s is not listening to any tags.'), $this->user->nickname);
|
$message = sprintf(_m('%s is not listening to any tags.'), $this->user->nickname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -104,6 +104,6 @@ class TagUnsubForm extends TagSubForm
|
||||||
|
|
||||||
function formActions()
|
function formActions()
|
||||||
{
|
{
|
||||||
$this->out->submit('submit', _('Unsubscribe'), 'submit', null, _m('Unsubscribe from this tag'));
|
$this->out->submit('submit', _m('BUTTON','Unsubscribe'), 'submit', null, _m('Unsubscribe from this tag'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ class TemplateAction extends Action
|
||||||
header('WWW-Authenticate: Basic realm="StatusNet API"');
|
header('WWW-Authenticate: Basic realm="StatusNet API"');
|
||||||
|
|
||||||
// cancelled the browser login form
|
// cancelled the browser login form
|
||||||
$this->clientError(_('Authentication error!'), $code = 401);
|
$this->clientError(_m('Authentication error!'), $code = 401);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ class TemplateAction extends Action
|
||||||
|
|
||||||
// verify that user is admin
|
// verify that user is admin
|
||||||
if (!($user->id == 1))
|
if (!($user->id == 1))
|
||||||
$this->clientError(_('Only User #1 can update the template.'), $code = 401);
|
$this->clientError(_m('Only User #1 can update the template.'), $code = 401);
|
||||||
|
|
||||||
// open the old template
|
// open the old template
|
||||||
$tpl_file = $this->templateFolder() . '/index.html';
|
$tpl_file = $this->templateFolder() . '/index.html';
|
||||||
|
@ -316,7 +316,7 @@ class TemplateAction extends Action
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// bad username and password
|
// bad username and password
|
||||||
$this->clientError(_('Authentication error!'), $code = 401);
|
$this->clientError(_m('Authentication error!'), $code = 401);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -392,8 +392,8 @@ class TwitterauthorizationAction extends Action
|
||||||
_m('1-64 lowercase letters or numbers, no punctuation or spaces'));
|
_m('1-64 lowercase letters or numbers, no punctuation or spaces'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->input('email', _('Email'), $this->getEmail(),
|
$this->input('email', _m('LABEL','Email'), $this->getEmail(),
|
||||||
_('Used only for updates, announcements, '.
|
_m('Used only for updates, announcements, '.
|
||||||
'and password recovery'));
|
'and password recovery'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class AdminprofileflagAction extends Action
|
||||||
// User must be logged in.
|
// User must be logged in.
|
||||||
|
|
||||||
if (!common_logged_in()) {
|
if (!common_logged_in()) {
|
||||||
$this->clientError(_('Not logged in.'));
|
$this->clientError(_m('Not logged in.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class AdminprofileflagAction extends Action
|
||||||
// User must have the right to review flags
|
// User must have the right to review flags
|
||||||
|
|
||||||
if (!$user->hasRight(UserFlagPlugin::REVIEWFLAGS)) {
|
if (!$user->hasRight(UserFlagPlugin::REVIEWFLAGS)) {
|
||||||
$this->clientError(_('You cannot review profile flags.'));
|
$this->clientError(_m('You cannot review profile flags.'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,8 @@ class UserLimitPlugin extends Plugin
|
||||||
$cnt = $cls->count();
|
$cnt = $cls->count();
|
||||||
|
|
||||||
if ($cnt >= $this->maxUsers) {
|
if ($cnt >= $this->maxUsers) {
|
||||||
$msg = sprintf(_('Cannot register; maximum number of users (%d) reached.'),
|
// @todo FIXME: i18n issue. Needs plural.
|
||||||
|
$msg = sprintf(_m('Cannot register; maximum number of users (%d) reached.'),
|
||||||
$this->maxUsers);
|
$this->maxUsers);
|
||||||
|
|
||||||
throw new ClientException($msg);
|
throw new ClientException($msg);
|
||||||
|
|
|
@ -81,16 +81,16 @@ class WikiHashtagsPlugin extends Plugin
|
||||||
$action->raw($html);
|
$action->raw($html);
|
||||||
$action->elementStart('p');
|
$action->elementStart('p');
|
||||||
$action->element('a', array('href' => $editurl,
|
$action->element('a', array('href' => $editurl,
|
||||||
'title' => sprintf(_('Edit the article for #%s on WikiHashtags'), $tag)),
|
'title' => sprintf(_m('Edit the article for #%s on WikiHashtags'), $tag)),
|
||||||
_('Edit'));
|
_m('Edit'));
|
||||||
$action->element('a', array('href' => 'http://www.gnu.org/copyleft/fdl.html',
|
$action->element('a', array('href' => 'http://www.gnu.org/copyleft/fdl.html',
|
||||||
'title' => _('Shared under the terms of the GNU Free Documentation License'),
|
'title' => _m('Shared under the terms of the GNU Free Documentation License'),
|
||||||
'rel' => 'license'),
|
'rel' => 'license'),
|
||||||
'GNU FDL');
|
'GNU FDL');
|
||||||
$action->elementEnd('p');
|
$action->elementEnd('p');
|
||||||
} else {
|
} else {
|
||||||
$action->element('a', array('href' => $editurl),
|
$action->element('a', array('href' => $editurl),
|
||||||
sprintf(_('Start the article for #%s on WikiHashtags'), $tag));
|
sprintf(_m('Start the article for #%s on WikiHashtags'), $tag));
|
||||||
}
|
}
|
||||||
|
|
||||||
$action->elementEnd('div');
|
$action->elementEnd('div');
|
||||||
|
|
|
@ -354,8 +354,9 @@ class XmppPlugin extends ImPlugin
|
||||||
$xs->text(" ");
|
$xs->text(" ");
|
||||||
$xs->element('a', array(
|
$xs->element('a', array(
|
||||||
'href'=>common_local_url('conversation',
|
'href'=>common_local_url('conversation',
|
||||||
array('id' => $notice->conversation)).'#notice-'.$notice->id
|
array('id' => $notice->conversation)).'#notice-'.$notice->id),
|
||||||
),sprintf(_('[%s]'),$notice->id));
|
// TRANS: %s is a notice ID.
|
||||||
|
sprintf(_m('[%s]'),$notice->id));
|
||||||
$xs->elementEnd('body');
|
$xs->elementEnd('body');
|
||||||
$xs->elementEnd('html');
|
$xs->elementEnd('html');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user