Some other i18n and L10n updates, too.
i18n/L10n review not complete.
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'));
}
}
} else {
common_debug("Blogspamnet results = " . $response);
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)) {
- 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)) {
// don't do anything
} 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;
$nb = self::getByURL($profile, $url);
if (!empty($nb)) {
- throw new ClientException(_('Bookmark already exists.'));
+ throw new ClientException(_m('Bookmark already exists.'));
}
if (empty($options)) {
if (array_key_exists('uri', $options)) {
$other = Bookmark::staticGet('uri', $options['uri']);
if (!empty($other)) {
- throw new ClientException(_('Bookmark already exists.'));
+ throw new ClientException(_m('Bookmark already exists.'));
}
}
$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,
$shortUrl,
$description,
implode(' ', $hashtags));
- $rendered = sprintf(_('<span class="xfolkentry">'.
- '<a class="taggedlink" href="%s">%s</a> '.
- '<span class="description">%s</span> '.
- '<span class="meta">%s</span>'.
+ $rendered = sprintf(_m('<span class="xfolkentry">'.
+ '<a class="taggedlink" href="%1$s">%2$s</a> '.
+ '<span class="description">%3$s</span> '.
+ '<span class="meta">%4$s</span>'.
'</span>'),
htmlspecialchars($url),
htmlspecialchars($title),
$action->elementStart('li');
$action->element('a',
array('href' => common_local_url('importdelicious')),
- _('Import del.icio.us bookmarks'));
+ _m('Import del.icio.us bookmarks'));
$action->elementEnd('li');
}
$relLinkEls = ActivityUtils::getLinks($bookmark->element, 'related');
if (count($relLinkEls) < 1) {
- throw new ClientException(_('Expected exactly 1 link '.
+ throw new ClientException(_m('Expected exactly 1 link '.
'rel=related in a Bookmark.'));
}
$attachments = $notice->attachments();
if (count($attachments) != 1) {
- throw new ServerException(_('Bookmark notice with the '.
+ throw new ServerException(_m('Bookmark notice with the '.
'wrong number of attachments.'));
}
$this->li();
$this->out->input('title',
- _('Title'),
+ _m('LABEL','Title'),
$this->_title,
- _('Title of the bookmark'));
+ _m('Title of the bookmark'));
$this->unli();
$this->li();
$this->out->input('url',
- _('URL'),
+ _m('LABEL','URL'),
$this->_url,
- _('URL to bookmark'));
+ _m('URL to bookmark'));
$this->unli();
$this->li();
$this->out->input('tags',
- _('Tags'),
+ _m('LABEL','Tags'),
$this->_tags,
- _('Comma- or space-separated list of tags'));
+ _m('Comma- or space-separated list of tags'));
$this->unli();
$this->li();
$this->out->input('description',
- _('Description'),
+ _m('LABEL','Description'),
$this->_description,
- _('Description of the URL'));
+ _m('Description of the URL'));
$this->unli();
$this->out->elementEnd('ul');
// TRANS: Title for mini-posting window loaded from bookmarklet.
// TRANS: %s is the StatusNet site name.
$this->element('title',
- null, sprintf(_('Bookmark on %s'),
+ null, sprintf(_m('Bookmark on %s'),
common_config('site', 'name')));
}
$dls = $doc->getElementsByTagName('dl');
if ($dls->length != 1) {
- throw new ClientException(_("Bad import file."));
+ throw new ClientException(_m("Bad import file."));
}
$dl = $dls->item(0);
$as = $dt->getElementsByTagName('a');
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);
$private = $a->getAttribute('private');
if ($private != 0) {
- throw new ClientException(_('Skipping private bookmark.'));
+ throw new ClientException(_m('Skipping private bookmark.'));
}
if (!empty($dd)) {
}
// 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);
function title()
{
- return _("Import del.icio.us bookmarks");
+ return _m("Import del.icio.us bookmarks");
}
/**
$cur = common_current_user();
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.'),
403);
}
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;
$this->checkSessionToken();
if (!isset($_FILES[ImportDeliciousForm::FILEINPUT]['error'])) {
- throw new ClientException(_('No uploaded file.'));
+ throw new ClientException(_m('No uploaded file.'));
}
switch ($_FILES[ImportDeliciousForm::FILEINPUT]['error']) {
break;
case UPLOAD_ERR_INI_SIZE:
// 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.'));
return;
case UPLOAD_ERR_FORM_SIZE:
throw new ClientException(
// 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.'));
return;
case UPLOAD_ERR_PARTIAL:
@unlink($_FILES[ImportDeliciousForm::FILEINPUT]['tmp_name']);
// TRANS: Client exception.
- throw new ClientException(_('The uploaded file was only' .
+ throw new ClientException(_m('The uploaded file was only' .
' partially uploaded.'));
return;
case UPLOAD_ERR_NO_FILE:
// No file; probably just a non-AJAX submission.
- throw new ClientException(_('No uploaded file.'));
+ throw new ClientException(_m('No uploaded file.'));
return;
case UPLOAD_ERR_NO_TMP_DIR:
// 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;
case UPLOAD_ERR_CANT_WRITE:
// 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;
case UPLOAD_ERR_EXTENSION:
// 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;
default:
common_log(LOG_ERR, __METHOD__ . ": Unknown upload error " .
$_FILES[ImportDeliciousForm::FILEINPUT]['error']);
// 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;
}
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);
{
if ($this->success) {
$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) {
$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 {
$form = new ImportDeliciousForm($this);
$form->show();
{
$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.'));
$this->out->elementEnd('p');
_m('BUTTON', 'Upload'),
'submit',
null,
- _('Upload the file'));
+ _m('Upload the file'));
}
}
function title()
{
- return _('New bookmark');
+ return _m('New bookmark');
}
/**
$this->user = common_current_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);
}
}
try {
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)) {
- throw new ClientException(_('Bookmark must have an URL.'));
+ throw new ClientException(_m('Bookmark must have an URL.'));
}
$this->elementStart('html');
$this->elementStart('head');
// TRANS: Page title after sending a notice.
- $this->element('title', null, _('Notice posted'));
+ $this->element('title', null, _m('Notice posted'));
$this->elementEnd('head');
$this->elementStart('body');
$this->showNotice($saved);
$this->file = File::staticGet('id', $this->trimmed('id'));
if (empty($this->file)) {
- throw new ClientException(_('Unknown URL'));
+ throw new ClientException(_m('Unknown URL'));
}
$pageArg = $this->trimmed('page');
function title()
{
if ($this->page == 1) {
- return sprintf(_("Notices linking to %s"), $this->file->url);
+ return sprintf(_m("Notices linking to %s"), $this->file->url);
} else {
- return sprintf(_("Notices linking to %s, page %d"),
+ return sprintf(_m("Notices linking to %1$s, page %2$d"),
$this->file->url,
$this->page);
}
{
// TRANS: Title for bookmark.
// 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->bookmark->title);
}
$nav->out->menuItem(
common_local_url('userdirectory'),
- _('Directory'),
- _('User Directory'),
+ _m('Directory'),
+ _m('User Directory'),
$actionName == 'userdirectory',
'nav_directory'
);
function getInstructions()
{
// TRANS: %%site.name%% is the name of the StatusNet site.
- return _(
+ return _m(
'Search for people on %%site.name%% by their name, '
. 'location, or interests. Separate the terms by spaces; '
. ' they must be 3 characters or more.'
$this->elementStart('fieldset');
- $this->element('legend', null, _('Search site'));
+ $this->element('legend', null, _m('Search site'));
$this->elementStart('ul', 'form_data');
$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->elementEnd('li');
)
);
} else {
- $this->element('p', 'error', _('No results.'));
+ $this->element('p', 'error', _m('No results.'));
$message = _m(<<<E_O_T
* Make sure all words are spelled correctly.
* Try different keywords.
$action->elementStart('li');
$action->checkbox('emailsummary',
// 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));
$action->elementEnd('li');
return true;
'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->raw(sprintf(_('Recent updates from %1s for %2s:'),
+ $out->raw(sprintf(_m('Recent updates from %1s for %2s:'),
common_config('site', 'name'),
$profile->getBestName()));
$out->elementEnd('div');
$out->text(' ');
$out->element('a',
array('href' => $convurl.'#notice-'.$notice->id),
- _('in context'));
+ _m('in context'));
}
}
$out->elementEnd('div');
$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_config('site', 'name')));
// 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'));
if (empty($ess)) {
$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',
'title' => common_date_iso8601($event->start_time)),
if (!empty($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->elementEnd('div');
}
if (!empty($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->elementEnd('div');
}
$rsvps = $event->getRSVPs();
$out->elementStart('div', 'event-rsvps');
- $out->element('strong', null, _('Attending: '));
+ $out->element('strong', null, _m('Attending:'));
$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::NEGATIVE]),
count($rsvps[RSVP::POSSIBLE])));
if (array_key_exists('uri', $options)) {
$other = Happening::staticGet('uri', $options['uri']);
if (!empty($other)) {
- throw new ClientException(_('Event already exists.'));
+ throw new ClientException(_m('Event already exists.'));
}
}
// 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,
common_exact_date($ev->start_time),
common_exact_date($ev->end_time),
$location,
$description);
- $rendered = sprintf(_('<span class="vevent">'.
- '<span class="summary">%s</span> '.
- '<abbr class="dtstart" title="%s">%s</a> - '.
- '<abbr class="dtend" title="%s">%s</a> '.
- '(<span class="location">%s</span>): '.
- '<span class="description">%s</span> '.
+ $rendered = sprintf(_m('<span class="vevent">'.
+ '<span class="summary">%1$s</span> '.
+ '<abbr class="dtstart" title="%2$s">%3$s</a> - '.
+ '<abbr class="dtend" title="%4$s">%5$s</a> '.
+ '(<span class="location">%6$s</span>): '.
+ '<span class="description">%7$s</span> '.
'</span>'),
htmlspecialchars($title),
htmlspecialchars(common_date_iso8601($ev->start_time)),
if (array_key_exists('uri', $options)) {
$other = RSVP::staticGet('uri', $options['uri']);
if (!empty($other)) {
- throw new ClientException(_('RSVP already exists.'));
+ throw new ClientException(_m('RSVP already exists.'));
}
}
'event_id' => $event->id));
if (!empty($other)) {
- throw new ClientException(_('RSVP already exists.'));
+ throw new ClientException(_m('RSVP already exists.'));
}
$rsvp = new RSVP();
switch ($response) {
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;
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;
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;
default:
throw new Exception("Unknown response code {$response}");
if (empty($event)) {
$eventUrl = '#';
- $eventTitle = _('an unknown event');
+ $eventTitle = _m('an unknown event');
} else {
$notice = $event->getNotice();
$eventUrl = $notice->bestUrl();
switch ($response) {
case 'Y':
- $fmt = _("%1s is attending %2s.");
+ $fmt = _m("%1s is attending %2s.");
break;
case 'N':
- $fmt = _("%1s is not attending %2s.");
+ $fmt = _m("%1s is not attending %2s.");
break;
case '?':
- $fmt = _("%1s might attend %2s.>");
+ $fmt = _m("%1s might attend %2s.>");
break;
default:
throw new Exception("Unknown response code {$response}");
}
if (empty($event)) {
- $eventTitle = _('an unknown event');
+ $eventTitle = _m('an unknown event');
} else {
$notice = $event->getNotice();
$eventTitle = $event->title;
function title()
{
- return _('Cancel RSVP');
+ return _m('Cancel RSVP');
}
/**
$rsvpId = $this->trimmed('rsvp');
if (empty($rsvpId)) {
- throw new ClientException(_('No such rsvp.'));
+ throw new ClientException(_m('No such RSVP.'));
}
$this->rsvp = RSVP::staticGet('id', $rsvpId);
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);
if (empty($this->event)) {
- throw new ClientException(_('No such event.'));
+ throw new ClientException(_m('No such event.'));
}
$this->user = common_current_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;
$this->elementStart('html');
$this->elementStart('head');
// TRANS: Page title after sending a notice.
- $this->element('title', null, _('Event saved'));
+ $this->element('title', null, _m('Event saved'));
$this->elementEnd('head');
$this->elementStart('body');
$this->elementStart('body');
switch (RSVP::verbFor($this->rsvp->response)) {
case RSVP::POSITIVE:
- $this->out->text(_('You will attend this event.'));
+ $this->out->text(_m('You will attend this event.'));
break;
case RSVP::NEGATIVE:
- $this->out->text(_('You will not attend this event.'));
+ $this->out->text(_m('You will not attend this event.'));
break;
case RSVP::POSSIBLE:
- $this->out->text(_('You might attend this event.'));
+ $this->out->text(_m('You might attend this event.'));
break;
}
$this->li();
$this->out->input('title',
- _('Title'),
+ _m('LABEL','Title'),
null,
- _('Title of the event'));
+ _m('Title of the event'));
$this->unli();
$this->li();
$this->out->input('startdate',
- _('Start date'),
+ _m('LABEL','Start date'),
null,
- _('Date the event starts'));
+ _m('Date the event starts'));
$this->unli();
$this->li();
$this->out->input('starttime',
- _('Start time'),
+ _m('LABEL','Start time'),
null,
- _('Time the event starts'));
+ _m('Time the event starts'));
$this->unli();
$this->li();
$this->out->input('enddate',
- _('End date'),
+ _m('LABEL','End date'),
null,
- _('Date the event ends'));
+ _m('Date the event ends'));
$this->unli();
$this->li();
$this->out->input('endtime',
- _('End time'),
+ _m('LABEL','End time'),
null,
- _('Time the event ends'));
+ _m('Time the event ends'));
$this->unli();
$this->li();
$this->out->input('location',
- _('Location'),
+ _m('LABEL','Location'),
null,
- _('Event location'));
+ _m('Event location'));
$this->unli();
$this->li();
$this->out->input('url',
- _('URL'),
+ _m('LABEL','URL'),
null,
- _('URL for more information'));
+ _m('URL for more information'));
$this->unli();
$this->li();
$this->out->input('description',
- _('Description'),
+ _m('LABEL','Description'),
null,
- _('Description of the event'));
+ _m('Description of the event'));
$this->unli();
$this->out->elementEnd('ul');
function title()
{
- return _('New event');
+ return _m('New event');
}
/**
$this->user = common_current_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);
}
$this->title = $this->trimmed('title');
if (empty($this->title)) {
- throw new ClientException(_('Title required.'));
+ throw new ClientException(_m('Title required.'));
}
$this->location = $this->trimmed('location');
$startDate = $this->trimmed('startdate');
if (empty($startDate)) {
- throw new ClientException(_('Start date required.'));
+ throw new ClientException(_m('Start date required.'));
}
$startTime = $this->trimmed('starttime');
$endDate = $this->trimmed('enddate');
if (empty($endDate)) {
- throw new ClientException(_('End date required.'));
+ throw new ClientException(_m('End date required.'));
}
$endTime = $this->trimmed('endtime');
$this->endTime = strtotime($end);
if ($this->startTime == 0) {
- throw new Exception(sprintf(_('Could not parse date "%s"'),
+ throw new Exception(sprintf(_m('Could not parse date "%s"'),
$start));
}
if ($this->endTime == 0) {
- throw new Exception(sprintf(_('Could not parse date "%s"'),
+ throw new Exception(sprintf(_m('Could not parse date "%s"'),
$end));
}
{
try {
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)) {
- throw new ClientException(_('Event must have a start time.'));
+ throw new ClientException(_m('Event must have a start time.'));
}
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();
$this->elementStart('html');
$this->elementStart('head');
// TRANS: Page title after sending a notice.
- $this->element('title', null, _('Event saved'));
+ $this->element('title', null, _m('Event saved'));
$this->elementEnd('head');
$this->elementStart('body');
$this->showNotice($saved);
function title()
{
- return _('New RSVP');
+ return _m('New RSVP');
}
/**
$eventId = $this->trimmed('event');
if (empty($eventId)) {
- throw new ClientException(_('No such event.'));
+ throw new ClientException(_m('No such event.'));
}
$this->event = Happening::staticGet('id', $eventId);
if (empty($this->event)) {
- throw new ClientException(_('No such event.'));
+ throw new ClientException(_m('No such event.'));
}
$this->user = common_current_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));
$this->elementStart('html');
$this->elementStart('head');
// TRANS: Page title after sending a notice.
- $this->element('title', null, _('Event saved'));
+ $this->element('title', null, _m('Event saved'));
$this->elementEnd('head');
$this->elementStart('body');
$this->elementStart('body');
{
$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('submitvalue', '');
{
// TRANS: Title for event.
// 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->event->title);
}
_m('BUTTON','Save'),
'submit form_action-secondary',
'save',
- _('Save details')
+ _m('Save details')
);
}
* @return instructions for use
*/
function getInstructions() {
- return _('Facebook settings');
+ return _m('Facebook settings');
}
/*
$action->elementStart('li');
// 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') :
User_followeveryone_prefs::followEveryone($user->id));
$form->out->elementStart('li');
$form->out->dropdown('allow_privacy',
- _('Private messages'),
- array(Group_privacy_settings::SOMETIMES => _('Sometimes'),
- Group_privacy_settings::ALWAYS => _('Always'),
- Group_privacy_settings::NEVER => _('Never')),
- _('Whether to allow private messages to this group'),
+ _m('Private messages'),
+ array(Group_privacy_settings::SOMETIMES => _m('Sometimes'),
+ Group_privacy_settings::ALWAYS => _m('Always'),
+ Group_privacy_settings::NEVER => _m('Never')),
+ _m('Whether to allow private messages to this group'),
false,
(empty($gps)) ? Group_privacy_settings::SOMETIMES : $gps->allow_privacy);
$form->out->elementEnd('li');
$form->out->elementStart('li');
$form->out->dropdown('allow_sender',
- _('Private sender'),
- array(Group_privacy_settings::EVERYONE => _('Everyone'),
- Group_privacy_settings::MEMBER => _('Member'),
- Group_privacy_settings::ADMIN => _('Admin')),
- _('Who can send private messages to the group'),
+ _m('Private sender'),
+ array(Group_privacy_settings::EVERYONE => _m('Everyone'),
+ Group_privacy_settings::MEMBER => _m('Member'),
+ Group_privacy_settings::ADMIN => _m('Admin')),
+ _m('Who can send private messages to the group'),
false,
(empty($gps)) ? Group_privacy_settings::MEMBER : $gps->allow_sender);
$form->out->elementEnd('li');
$action->elementStart('li', 'entity_send-a-message');
$action->element('a', array('href' => common_local_url('newgroupmessage', array('nickname' => $group->nickname)),
- 'title' => _('Send a direct message to this group')),
- _('Message'));
+ 'title' => _m('Send a direct message to this group')),
+ _m('Message'));
// $form = new GroupMessageForm($action, $group);
// $form->hidden = true;
// $form->show();
// Don't save the notice!
// 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);
}
}
$gps = Group_privacy_settings::forGroup($group);
if ($gps->allow_privacy == Group_privacy_settings::ALWAYS) {
- $action->element('p', 'privategroupindicator', _('Private'));
+ $action->element('p', 'privategroupindicator', _m('Private'));
}
return true;
{
if (!$user->hasRight(Right::NEWMESSAGE)) {
// 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));
}
{
$group = User_group::staticGet('id', $this->to_group);
if (empty($group)) {
- throw new ServerException(_('No group for group message'));
+ throw new ServerException(_m('No group for group message'));
}
return $group;
}
{
$sender = Profile::staticGet('id', $this->from_profile);
if (empty($sender)) {
- throw new ServerException(_('No sender for group message'));
+ throw new ServerException(_m('No sender for group message'));
}
return $sender;
}
// TRANS: Subject for direct-message notification email.
// 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: %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: %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".
"%4\$s\n".
"------------------------------------------------------\n\n".
"You can reply to their message here:\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".
- "%6\$s\n"),
+ "%6\$s"),
$from_profile->getBestName(),
$from_profile->nickname,
$group->nickname,
$gm->content,
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);
$gps = self::forGroup($group);
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));
}
case Group_privacy_settings::EVERYONE:
$profile = $user->getProfile();
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,
$group->nickname));
}
break;
case Group_privacy_settings::MEMBER:
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,
$group->nickname));
}
break;
case Group_privacy_settings::ADMIN:
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,
$group->nickname));
}
break;
default:
- throw new Exception(sprintf(_('Unknown privacy settings for group %s.'),
+ throw new Exception(sprintf(_m('Unknown privacy settings for group %s.'),
$group->nickname));
}
$cur = common_current_user();
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');
$localGroup = Local_group::staticGet('nickname', $nickname);
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);
if (empty($this->group)) {
- throw new ClientException(_('No such group'), 404);
+ throw new ClientException(_m('No such group.'), 404);
}
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');
$base = $this->group->getFancyName();
if ($this->page == 1) {
- return sprintf(_('%s group inbox'), $base);
+ return sprintf(_m('%s group inbox'), $base);
} else {
// TRANS: Page title for any but first group page.
// 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,
$this->page);
}
$gm = Group_message::send($this->user, $group, $this->text);
$channel->output($this->user,
- sprintf(_('Direct message to group %s sent.'),
+ sprintf(_m('Direct message to group %s sent.'),
$group->nickname));
return true;
{
$this->out->element('legend',
null,
- sprintf(_('Message to %s'), $this->group->nickname));
+ sprintf(_m('Message to %s'), $this->group->nickname));
}
/**
{
$this->out->element('label', array('for' => 'notice_data-text',
'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',
'cols' => 35,
if ($contentLimit > 0) {
$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'),
$contentLimit);
$this->out->elementEnd('dl');
$this->user = common_current_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)) {
- 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));
}
$localGroup = Local_group::staticGet('nickname', $nickname);
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);
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
if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
- $this->element('title', null, _('Message sent'));
+ $this->element('title', null, _m('Message sent'));
$this->elementEnd('head');
$this->elementStart('body');
$this->element('p',
array('id' => 'command_result'),
- sprintf(_('Direct message to %s sent.'),
+ sprintf(_m('Direct message to %s sent.'),
$this->group->nickname));
$this->elementEnd('body');
$this->elementEnd('html');
function title()
{
- return sprintf(_('New message to group %s'), $this->group->nickname);
+ return sprintf(_m('New message to group %s'), $this->group->nickname);
}
}
$this->user = common_current_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);
}
$this->gm = Group_message::staticGet('id', $id);
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);
if (empty($this->group)) {
- throw new ServerException(_('Group not found.'));
+ throw new ServerException(_m('Group not found.'));
}
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);
if (empty($this->sender)) {
- throw new ServerException(_('No sender found.'));
+ throw new ServerException(_m('No sender found.'));
}
return true;
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->group->nickname,
common_exact_date($this->gm->created));
* @return boolean success value
*/
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: ' .
- '%s' .
+ '%4$s' .
' . (If you cannot click it, copy-and-paste it into the ' .
- 'address bar of your browser). If that user isn\'t you, ' .
- 'or if you didn\'t request this confirmation, just ignore this message.'),
+ 'address bar of your browser). If that user is not you, ' .
+ '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)));
if ($this->regcheck && !$checked) {
if (!$result) {
common_log_db_error($confirm, 'DELETE', __FILE__);
// 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;
}
}
function changePassword($username,$oldpassword,$newpassword)
{
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;
}
$entry = $this->get_user($username,array('dn' => 'dn'));
// We're not a general oEmbed proxy service; limit to valid sessions.
$token = $this->trimmed('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.'));
}
{
$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,
common_exact_date($this->notice->created)),
'excerpt' => $this->notice->content,
$this->profile = Profile::staticGet('id', $id);
if (!$this->profile) {
- $this->serverError(_('User has no profile.'));
+ $this->serverError(_m('User has no profile.'));
return false;
}
);
$response = $this->mollom('mollom.checkContent', $data);
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 unsure, let through
if (!empty($old)) {
// 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)) {
'notice_id' => $notice->id));
if (empty($fave)) {
// TRANS: Client exception.
- throw new ClientException(_('Notice wasn\'t favorited!'));
+ throw new ClientException(_m('Notice was not favorited!'));
}
$fave->delete();
$this->elementStart('li');
$this->input('newname', _m('New nickname'),
($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->elementStart('li');
- $this->input('email', _('Email'), $this->getEmail(),
- _('Used only for updates, announcements, '.
- 'and password recovery'));
+ $this->input('email', _m('Email'), $this->getEmail(),
+ _m('Used only for updates, announcements, '.
+ 'and password recovery.'));
$this->elementEnd('li');
// Hook point for captcha etc
'class' => 'checkbox'));
// TRANS: OpenID plugin 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, ' .
'email address, IM address, and phone number.');
$link = '<a href="' .
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.'));
}
}
$form->show();
}
} else {
- $out->text(_('Poll data is missing'));
+ $out->text(_m('Poll data is missing'));
}
$out->elementEnd('div');
parent::handle($args);
if (empty($this->url)) {
- $this->showError(_('A URL parameter is required.'));
+ $this->showError(_m('A URL parameter is required.'));
return;
}
if (!$resp->is_valid) {
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!"));
return false;
$user = common_current_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->confirm = Confirm_address::staticGet('code', $this->code);
if (empty($this->confirm)) {
- throw new ClientException(_('Confirmation code not found.'));
+ throw new ClientException(_m('Confirmation code not found.'));
return;
}
$this->user = User::staticGet('id', $this->confirm->user_id);
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;
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) {
// 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()) {
$confirm = $this->trimmed('confirm');
if (strlen($password) < 6) {
- throw new ClientException(_('Password too short.'));
+ throw new ClientException(_m('Password too short.'));
return;
} else if (0 != strcmp($password, $confirm)) {
- throw new ClientException(_("Passwords don't match."));
+ throw new ClientException(_m("Passwords do not match."));
return;
}
function showContent()
{
$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.'),
$this->user->nickname));
function title()
{
- return _('Set a password');
+ return _m('Set a password');
}
}
function formLegend()
{
- return _('Confirm email');
+ return _m('Confirm email');
}
function action()
{
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li');
- $this->out->password('password', _('New password'),
- _('6 or more characters.'));
+ $this->out->password('password', _m('New password'),
+ _m('6 or more characters.'));
$this->out->elementEnd('li');
$this->out->elementStart('li');
- $this->out->password('confirm', _('Confirm'),
- _('Same as password above.'));
+ $this->out->password('confirm', _m('Confirm'),
+ _m('Same as password above.'));
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
}
function formActions()
{
- $this->out->submit('save', _('Save'));
+ $this->out->submit('save', _m('Save'));
}
}
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
// TRANS: Client error displayed trying to perform any request method other than 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;
}
if (!$token || $token != common_session_token()) {
// 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.'));
return false;
}
if (empty($this->user)) {
// TRANS: Client error displayed trying to subscribe when not logged in.
- $this->clientError(_('Not logged in.'));
+ $this->clientError(_m('Not logged in.'));
return false;
}
if (empty($this->search)) {
// 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;
}
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'));
}
}
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'));
}
}
header('Content-Type: text/html;charset=utf-8');
$this->elementStart('html');
$this->elementStart('head');
- $this->element('title', null, _('Provider add'));
+ $this->element('title', null, _m('Provider add'));
$this->elementEnd('head');
$this->elementStart('body');
$subtime = strtotime($sub->created);
$now = time();
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."));
}
}
}
$jointime = strtotime($mem->created);
$now = time();
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."));
}
}
}
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
// TRANS: Client error displayed trying to perform any request method other than 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;
}
if (!$token || $token != common_session_token()) {
// 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.'));
return false;
}
if (empty($this->user)) {
// TRANS: Client error displayed trying to subscribe when not logged in.
- $this->clientError(_('Not logged in.'));
+ $this->clientError(_m('Not logged in.'));
return false;
}
if (empty($this->tag)) {
// 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;
}
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'));
}
}
$current_user = common_current_user();
if ($this->user->id === $current_user->id) {
// 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 ' .
- 'tag, even if you\'re not subscribed to the poster.');
+ 'tag, even if you are not subscribed to the poster.');
} else {
// 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.
- $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 {
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'));
}
}
header('WWW-Authenticate: Basic realm="StatusNet API"');
// cancelled the browser login form
- $this->clientError(_('Authentication error!'), $code = 401);
+ $this->clientError(_m('Authentication error!'), $code = 401);
} else {
// verify that user is admin
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
$tpl_file = $this->templateFolder() . '/index.html';
} else {
// bad username and password
- $this->clientError(_('Authentication error!'), $code = 401);
+ $this->clientError(_m('Authentication error!'), $code = 401);
}
_m('1-64 lowercase letters or numbers, no punctuation or spaces'));
$this->elementEnd('li');
$this->elementStart('li');
- $this->input('email', _('Email'), $this->getEmail(),
- _('Used only for updates, announcements, '.
+ $this->input('email', _m('LABEL','Email'), $this->getEmail(),
+ _m('Used only for updates, announcements, '.
'and password recovery'));
$this->elementEnd('li');
// User must be logged in.
if (!common_logged_in()) {
- $this->clientError(_('Not logged in.'));
+ $this->clientError(_m('Not logged in.'));
return;
}
// User must have the right to review flags
if (!$user->hasRight(UserFlagPlugin::REVIEWFLAGS)) {
- $this->clientError(_('You cannot review profile flags.'));
+ $this->clientError(_m('You cannot review profile flags.'));
return false;
}
$cnt = $cls->count();
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);
throw new ClientException($msg);
$action->raw($html);
$action->elementStart('p');
$action->element('a', array('href' => $editurl,
- 'title' => sprintf(_('Edit the article for #%s on WikiHashtags'), $tag)),
- _('Edit'));
+ 'title' => sprintf(_m('Edit the article for #%s on WikiHashtags'), $tag)),
+ _m('Edit'));
$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'),
'GNU FDL');
$action->elementEnd('p');
} else {
$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');
$xs->text(" ");
$xs->element('a', array(
'href'=>common_local_url('conversation',
- array('id' => $notice->conversation)).'#notice-'.$notice->id
- ),sprintf(_('[%s]'),$notice->id));
+ array('id' => $notice->conversation)).'#notice-'.$notice->id),
+ // TRANS: %s is a notice ID.
+ sprintf(_m('[%s]'),$notice->id));
$xs->elementEnd('body');
$xs->elementEnd('html');