Fix several L10n and i18n issues.

Add dummy method MessageListItem::messageListItemDummyMessages() to allow xgettext to add possible sources to POT files.
Mark a few i18n issues as FIXME as well as some messages for which the use case was not clear to me.
Merged some code on multiple lines into one.
Translator documentation added.
Remove superfluous whiteapace.
This commit is contained in:
Siebrand Mazeland 2011-04-03 01:09:02 +02:00
parent a466d4573a
commit fec3edee45
8 changed files with 101 additions and 67 deletions

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
* @see InboxAction * @see InboxAction
* @see OutboxAction * @see OutboxAction
*/ */
class MailboxAction extends CurrentUserDesignAction class MailboxAction extends CurrentUserDesignAction
{ {
var $page = null; var $page = null;
@ -71,12 +70,12 @@ class MailboxAction extends CurrentUserDesignAction
* *
* @return void * @return void
*/ */
function handle($args) function handle($args)
{ {
parent::handle($args); parent::handle($args);
if (!$this->user) { if (!$this->user) {
// TRANS: Client error displayed when trying to access a mailbox without providing a user.
$this->clientError(_('No such user.'), 404); $this->clientError(_('No such user.'), 404);
return; return;
} }
@ -84,6 +83,7 @@ class MailboxAction extends CurrentUserDesignAction
$cur = common_current_user(); $cur = common_current_user();
if (!$cur || $cur->id != $this->user->id) { if (!$cur || $cur->id != $this->user->id) {
// TRANS: Client error displayed when trying to access a mailbox that is not of the logged in user.
$this->clientError(_('Only the user can read their own mailboxes.'), $this->clientError(_('Only the user can read their own mailboxes.'),
403); 403);
return; return;
@ -114,8 +114,9 @@ class MailboxAction extends CurrentUserDesignAction
$this->trimmed('action'), $this->trimmed('action'),
array('nickname' => $this->user->nickname)); array('nickname' => $this->user->nickname));
} else { } else {
$this->element('p', $this->element('p',
'guide', 'guide',
// TRANS: Message displayed when there are no private messages in the inbox of a user.
_('You have no private messages. '. _('You have no private messages. '.
'You can send private message to engage other users in conversation. '. 'You can send private message to engage other users in conversation. '.
'People can send you messages for your eyes only.')); 'People can send you messages for your eyes only.'));
@ -139,7 +140,6 @@ class MailboxAction extends CurrentUserDesignAction
* *
* @return void * @return void
*/ */
function showPageNotice() function showPageNotice()
{ {
$instr = $this->getInstructions(); $instr = $this->getInstructions();
@ -157,7 +157,6 @@ class MailboxAction extends CurrentUserDesignAction
* *
* @return boolean * @return boolean
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
return true; return true;

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* Private mailboxes menu * Private mailboxes menu
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class MailboxMenu extends Menu class MailboxMenu extends Menu
{ {
function show() function show()
@ -56,15 +55,18 @@ class MailboxMenu extends Menu
$this->item('inbox', $this->item('inbox',
array('nickname' => $nickname), array('nickname' => $nickname),
_('Inbox'), // TRANS: Menu item in mailbox menu. Leads to incoming private messages.
_('Your incoming messages')); _m('MENU','Inbox'),
// TRANS: Menu item title in mailbox menu. Leads to incoming private messages.
_('Your incoming messages.'));
$this->item('outbox', $this->item('outbox',
array('nickname' => $nickname), array('nickname' => $nickname),
_('Outbox'), // TRANS: Menu item in mailbox menu. Leads to outgoing private messages.
_('Your sent messages')); _m('MENU','Outbox'),
// TRANS: Menu item title in mailbox menu. Leads to outgoing private messages.
_('Your sent messages.'));
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');
} }
} }

View File

@ -21,7 +21,7 @@ require_once(INSTALLDIR . '/lib/mail.php');
require_once(INSTALLDIR . '/lib/mediafile.php'); require_once(INSTALLDIR . '/lib/mediafile.php');
require_once('Mail/mimeDecode.php'); require_once('Mail/mimeDecode.php');
// FIXME: we use both Mail_mimeDecode and mailparse // @todo FIXME: we use both Mail_mimeDecode and mailparse
// Need to move everything to mailparse // Need to move everything to mailparse
class MailHandler class MailHandler
@ -34,19 +34,23 @@ class MailHandler
{ {
list($from, $to, $msg, $attachments) = $this->parse_message($rawmessage); list($from, $to, $msg, $attachments) = $this->parse_message($rawmessage);
if (!$from || !$to || !$msg) { if (!$from || !$to || !$msg) {
// TRANS: Error message in incoming mail handler used when an incoming e-mail cannot be processed.
$this->error(null, _('Could not parse message.')); $this->error(null, _('Could not parse message.'));
} }
common_log(LOG_INFO, "Mail from $from to $to with ".count($attachments) .' attachment(s): ' .substr($msg, 0, 20)); common_log(LOG_INFO, "Mail from $from to $to with ".count($attachments) .' attachment(s): ' .substr($msg, 0, 20));
$user = $this->user_from_header($from); $user = $this->user_from_header($from);
if (!$user) { if (!$user) {
// TRANS: Error message in incoming mail handler used when an incoming e-mail is not from a registered user.
$this->error($from, _('Not a registered user.')); $this->error($from, _('Not a registered user.'));
return false; return false;
} }
if (!$this->user_match_to($user, $to)) { if (!$this->user_match_to($user, $to)) {
// TRANS: Error message in incoming mail handler used when an incoming e-mail is not from a user's incoming e-mail address.
$this->error($from, _('Sorry, that is not your incoming email address.')); $this->error($from, _('Sorry, that is not your incoming email address.'));
return false; return false;
} }
if (!$user->emailpost) { if (!$user->emailpost) {
// TRANS: Error message in incoming mail handler used when no incoming e-mail is allowed.
$this->error($from, _('Sorry, no incoming email allowed.')); $this->error($from, _('Sorry, no incoming email allowed.'));
return false; return false;
} }
@ -57,7 +61,8 @@ class MailHandler
$msg = $this->cleanup_msg($msg); $msg = $this->cleanup_msg($msg);
$msg = $user->shortenLinks($msg); $msg = $user->shortenLinks($msg);
if (Notice::contentTooLong($msg)) { if (Notice::contentTooLong($msg)) {
$this->error($from, sprintf(_('That\'s too long. Maximum notice size is %d character.', // TRANS: Error message in incoming mail handler used when an incoming e-mail contains too many characters.
$this->error($from, sprintf(_m('That\'s too long. Maximum notice size is %d character.',
'That\'s too long. Maximum notice size is %d characters.', 'That\'s too long. Maximum notice size is %d characters.',
Notice::maxContent()), Notice::maxContent()),
Notice::maxContent())); Notice::maxContent()));
@ -66,7 +71,6 @@ class MailHandler
$mediafiles = array(); $mediafiles = array();
foreach($attachments as $attachment){ foreach($attachments as $attachment){
$mf = null; $mf = null;
try { try {
@ -137,9 +141,9 @@ class MailHandler
function respond($from, $to, $response) function respond($from, $to, $response)
{ {
$headers['From'] = $to; $headers['From'] = $to;
$headers['To'] = $from; $headers['To'] = $from;
// TRANS: E-mail subject for reply to an e-mail command.
$headers['Subject'] = _('Command complete'); $headers['Subject'] = _('Command complete');
return mail_send(array($from), $headers, $response); return mail_send(array($from), $headers, $response);
@ -226,7 +230,9 @@ class MailHandler
function unsupported_type($type) function unsupported_type($type)
{ {
$this->error(null, sprintf(_('Unsupported message type: %s'), $type)); // TRANS: Error message in incoming mail handler used when an incoming e-mail is of an unsupported type.
// TRANS: %s is the unsupported type.
$this->error(null, sprintf(_('Unsupported message type: %s.'), $type));
} }
function cleanup_msg($msg) function cleanup_msg($msg)

View File

@ -46,19 +46,16 @@ require_once INSTALLDIR.'/lib/form.php';
* *
* @see HTMLOutputter * @see HTMLOutputter
*/ */
class MessageForm extends Form class MessageForm extends Form
{ {
/** /**
* User to send a direct message to * User to send a direct message to
*/ */
var $to = null; var $to = null;
/** /**
* Pre-filled content of the form * Pre-filled content of the form
*/ */
var $content = null; var $content = null;
/** /**
@ -68,7 +65,6 @@ class MessageForm extends Form
* @param User $to user to send a message to * @param User $to user to send a message to
* @param string $content content to pre-fill * @param string $content content to pre-fill
*/ */
function __construct($out=null, $to=null, $content=null) function __construct($out=null, $to=null, $content=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -82,7 +78,6 @@ class MessageForm extends Form
* *
* @return string ID of the form * @return string ID of the form
*/ */
function id() function id()
{ {
return 'form_notice-direct'; return 'form_notice-direct';
@ -93,7 +88,6 @@ class MessageForm extends Form
* *
* @return string class of the form * @return string class of the form
*/ */
function formClass() function formClass()
{ {
return 'form_notice ajax-notice'; return 'form_notice ajax-notice';
@ -104,7 +98,6 @@ class MessageForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('newmessage'); return common_local_url('newmessage');
@ -117,6 +110,7 @@ class MessageForm extends Form
*/ */
function formLegend() function formLegend()
{ {
// TRANS: Form legend for direct notice.
$this->out->element('legend', null, _('Send a direct notice')); $this->out->element('legend', null, _('Send a direct notice'));
} }
@ -125,7 +119,6 @@ class MessageForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$user = common_current_user(); $user = common_current_user();
@ -133,7 +126,9 @@ class MessageForm extends Form
$mutual_users = $user->mutuallySubscribedUsers(); $mutual_users = $user->mutuallySubscribedUsers();
$mutual = array(); $mutual = array();
// TRANS Label entry in drop-down selection box in direct-message inbox/outbox. This is the default entry in the drop-down box, doubling as instructions and a brake against accidental submissions with the first user in the list. // TRANS: Label entry in drop-down selection box in direct-message inbox/outbox.
// TRANS: This is the default entry in the drop-down box, doubling as instructions
// TRANS: and a brake against accidental submissions with the first user in the list.
$mutual[0] = _('Select recipient:'); $mutual[0] = _('Select recipient:');
while ($mutual_users->fetch()) { while ($mutual_users->fetch()) {
@ -150,6 +145,7 @@ class MessageForm extends Form
$mutual[0] = _('No mutual subscribers.'); $mutual[0] = _('No mutual subscribers.');
} }
// TRANS: Dropdown label in direct notice form.
$this->out->dropdown('to', _('To'), $mutual, null, false, $this->out->dropdown('to', _('To'), $mutual, null, false,
($this->to) ? $this->to->id : null); ($this->to) ? $this->to->id : null);
@ -173,13 +169,13 @@ class MessageForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->element('input', array('id' => 'notice_action-submit', $this->out->element('input', array('id' => 'notice_action-submit',
'class' => 'submit', 'class' => 'submit',
'name' => 'message_send', 'name' => 'message_send',
'type' => 'submit', 'type' => 'submit',
// TRANS: Button text for sending a direct notice.
'value' => _m('Send button for sending notice', 'Send'))); 'value' => _m('Send button for sending notice', 'Send')));
} }
} }

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* The message list widget * The message list widget
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
abstract class MessageList extends Widget abstract class MessageList extends Widget
{ {
var $message; var $message;
@ -60,10 +59,10 @@ abstract class MessageList extends Widget
parent::__construct($out); parent::__construct($out);
$this->message = $message; $this->message = $message;
} }
/** /**
* Show the widget * Show the widget
* *
* Uses newItem() to create each new item. * Uses newItem() to create each new item.
* *
* @return integer count of messages seen. * @return integer count of messages seen.
@ -74,6 +73,7 @@ abstract class MessageList extends Widget
$this->out->elementStart('div', array('id' =>'notices_primary')); $this->out->elementStart('div', array('id' =>'notices_primary'));
// TRANS: Header in message list.
$this->out->element('h2', null, _('Messages')); $this->out->element('h2', null, _('Messages'));
$this->out->elementStart('ul', 'notices messages'); $this->out->elementStart('ul', 'notices messages');
@ -85,7 +85,7 @@ abstract class MessageList extends Widget
if ($cnt > MESSAGES_PER_PAGE) { if ($cnt > MESSAGES_PER_PAGE) {
break; break;
} }
$mli = $this->newItem($this->message); $mli = $this->newItem($this->message);
$mli->show(); $mli->show();

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* A single list item for showing in a message list * A single list item for showing in a message list
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -65,7 +65,6 @@ abstract class MessageListItem extends Widget
* *
* @return void * @return void
*/ */
function show() function show()
{ {
$this->out->elementStart('li', array('class' => 'hentry notice', $this->out->elementStart('li', array('class' => 'hentry notice',
@ -120,6 +119,7 @@ abstract class MessageListItem extends Widget
if ($this->message->source) { if ($this->message->source) {
$this->out->elementStart('span', 'source'); $this->out->elementStart('span', 'source');
// FIXME: bad i18n. Device should be a parameter (from %s). // FIXME: bad i18n. Device should be a parameter (from %s).
// TRANS: Followed by notice source (usually the client used to send the notice).
$this->out->text(_('from')); $this->out->text(_('from'));
$this->showSource($this->message->source); $this->showSource($this->message->source);
$this->out->elementEnd('span'); $this->out->elementEnd('span');
@ -129,6 +129,29 @@ abstract class MessageListItem extends Widget
$this->out->elementEnd('li'); $this->out->elementEnd('li');
} }
/**
* Dummy method. Serves no other purpose than to make strings available used
* in self::showSource() through xgettext.
*
* @return void
*/
function messageListItemDummyMessages()
{
// A dummy array with messages. These will get extracted by xgettext and
// are used in self::showSource().
$dummy_messages = array(
// TRANS: A possible notice source (web interface).
_m('SOURCE','web'),
// TRANS: A possible notice source (XMPP).
_m('SOURCE','xmpp'),
// TRANS: A possible notice source (e-mail).
_m('SOURCE','mail'),
// TRANS: A possible notice source (OpenMicroBlogging).
_m('SOURCE','omb'),
// TRANS: A possible notice source (Application Programming Interface).
_m('SOURCE','api'),
);
}
/** /**
* Show the source of the message * Show the source of the message
@ -142,7 +165,7 @@ abstract class MessageListItem extends Widget
*/ */
function showSource($source) function showSource($source)
{ {
$source_name = _($source); $source_name = _m('SOURCE',$source);
switch ($source) { switch ($source) {
case 'web': case 'web':
case 'xmpp': case 'xmpp':

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc. * Copyright (C) 2011, StatusNet, Inc.
* *
* Superclass for microapp plugin * Superclass for microapp plugin
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -39,8 +39,8 @@ if (!defined('STATUSNET')) {
* *
* This class lets you define micro-applications with different kinds of activities. * This class lets you define micro-applications with different kinds of activities.
* *
* The applications work more-or-less like other * The applications work more-or-less like other
* *
* @category Microapp * @category Microapp
* @package StatusNet * @package StatusNet
* @author Evan Prodromou <evan@status.net> * @author Evan Prodromou <evan@status.net>
@ -48,7 +48,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
abstract class MicroAppPlugin extends Plugin abstract class MicroAppPlugin extends Plugin
{ {
/** /**
@ -255,10 +254,9 @@ abstract class MicroAppPlugin extends Plugin
* by calling the overridable $this->deleteRelated(). * by calling the overridable $this->deleteRelated().
* *
* @param Notice $notice Notice being deleted * @param Notice $notice Notice being deleted
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onNoticeDeleteRelated($notice) function onNoticeDeleteRelated($notice)
{ {
if ($this->isMyNotice($notice)) { if ($this->isMyNotice($notice)) {
@ -277,7 +275,6 @@ abstract class MicroAppPlugin extends Plugin
* *
* @fixme WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation * @fixme WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation
*/ */
function onStartShowNoticeItem($nli) function onStartShowNoticeItem($nli)
{ {
if (!$this->isMyNotice($nli->notice)) { if (!$this->isMyNotice($nli->notice)) {
@ -294,9 +291,9 @@ abstract class MicroAppPlugin extends Plugin
$nli->showNoticeLocation(); $nli->showNoticeLocation();
$nli->showContext(); $nli->showContext();
$nli->showRepeat(); $nli->showRepeat();
$out->elementEnd('div'); $out->elementEnd('div');
$nli->showNoticeOptions(); $nli->showNoticeOptions();
return false; return false;
@ -310,7 +307,6 @@ abstract class MicroAppPlugin extends Plugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onStartActivityObjectFromNotice($notice, &$object) function onStartActivityObjectFromNotice($notice, &$object)
{ {
if ($this->isMyNotice($notice)) { if ($this->isMyNotice($notice)) {
@ -329,7 +325,6 @@ abstract class MicroAppPlugin extends Plugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onStartHandleFeedEntryWithProfile($activity, $oprofile) function onStartHandleFeedEntryWithProfile($activity, $oprofile)
{ {
if ($this->isMyActivity($activity)) { if ($this->isMyActivity($activity)) {
@ -337,7 +332,8 @@ abstract class MicroAppPlugin extends Plugin
$actor = $oprofile->checkAuthorship($activity); $actor = $oprofile->checkAuthorship($activity);
if (empty($actor)) { if (empty($actor)) {
throw new ClientException(_('Can\'t get author for activity.')); // TRANS: Client exception thrown when no author for an activity was found.
throw new ClientException(_('Cannot get author for activity.'));
} }
$object = $activity->objects[0]; $object = $activity->objects[0];
@ -368,31 +364,32 @@ abstract class MicroAppPlugin extends Plugin
function onStartHandleSalmonTarget($activity, $target) function onStartHandleSalmonTarget($activity, $target)
{ {
if ($this->isMyActivity($activity)) { if ($this->isMyActivity($activity)) {
$this->log(LOG_INFO, "Checking {$activity->id} as a valid Salmon slap."); $this->log(LOG_INFO, "Checking {$activity->id} as a valid Salmon slap.");
if ($target instanceof User_group) { if ($target instanceof User_group) {
$uri = $target->getUri(); $uri = $target->getUri();
if (!in_array($uri, $activity->context->attention)) { if (!in_array($uri, $activity->context->attention)) {
throw new ClientException(_("Bookmark not posted ". // @todo FIXME: please document (i18n).
"to this group.")); // TRANS: Client exception.
throw new ClientException(_('Bookmark not posted to this group.'));
} }
} else if ($target instanceof User) { } else if ($target instanceof User) {
$uri = $target->uri; $uri = $target->uri;
$original = null; $original = null;
if (!empty($activity->context->replyToID)) { if (!empty($activity->context->replyToID)) {
$original = Notice::staticGet('uri', $original = Notice::staticGet('uri',
$activity->context->replyToID); $activity->context->replyToID);
} }
if (!in_array($uri, $activity->context->attention) && if (!in_array($uri, $activity->context->attention) &&
(empty($original) || (empty($original) ||
$original->profile_id != $target->id)) { $original->profile_id != $target->id)) {
throw new ClientException(_("Object not posted ". // @todo FIXME: Please document (i18n).
"to this user.")); // TRANS: Client exception.
throw new ClientException(_('Object not posted to this user.'));
} }
} else { } else {
throw new ServerException(_("Don't know how to handle ". // TRANS: Server exception thrown when a micro app plugin uses a target that cannot be handled.
"this kind of target.")); throw new ServerException(_('Do not know how to handle this kind of target.'));
} }
$actor = Ostatus_profile::ensureActivityObjectProfile($activity->actor); $actor = Ostatus_profile::ensureActivityObjectProfile($activity->actor);
@ -422,7 +419,6 @@ abstract class MicroAppPlugin extends Plugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onStartAtomPubNewActivity(&$activity, $user, &$notice) function onStartAtomPubNewActivity(&$activity, $user, &$notice)
{ {
if ($this->isMyActivity($activity)) { if ($this->isMyActivity($activity)) {
@ -451,7 +447,6 @@ abstract class MicroAppPlugin extends Plugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onStartImportActivity($user, $author, $activity, $trusted, &$done) function onStartImportActivity($user, $author, $activity, $trusted, &$done)
{ {
if ($this->isMyActivity($activity)) { if ($this->isMyActivity($activity)) {

View File

@ -4,7 +4,7 @@
* Copyright (C) 2010, StatusNet, Inc. * Copyright (C) 2010, StatusNet, Inc.
* *
* An item in a notice list * An item in a notice list
* *
* PHP version 5 * PHP version 5
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
@ -348,15 +348,20 @@ class NoticeListItem extends Widget
if (empty($name)) { if (empty($name)) {
$latdms = $this->decimalDegreesToDMS(abs($lat)); $latdms = $this->decimalDegreesToDMS(abs($lat));
$londms = $this->decimalDegreesToDMS(abs($lon)); $londms = $this->decimalDegreesToDMS(abs($lon));
// TRANS: Used in coordinates as abbreviation of north // TRANS: Used in coordinates as abbreviation of north.
$north = _('N'); $north = _('N');
// TRANS: Used in coordinates as abbreviation of south // TRANS: Used in coordinates as abbreviation of south.
$south = _('S'); $south = _('S');
// TRANS: Used in coordinates as abbreviation of east // TRANS: Used in coordinates as abbreviation of east.
$east = _('E'); $east = _('E');
// TRANS: Used in coordinates as abbreviation of west // TRANS: Used in coordinates as abbreviation of west.
$west = _('W'); $west = _('W');
$name = sprintf( $name = sprintf(
// TRANS: Coordinates message.
// TRANS: %1$s is lattitude degrees, %2$s is lattitude minutes,
// TRANS: %3$s is lattitude seconds, %4$s is N (north) or S (south) depending on lattitude,
// TRANS: %5$s is longitude degrees, %6$s is longitude minutes,
// TRANS: %7$s is longitude seconds, %8$s is E (east) or W (west) depending on longitude,
_('%1$u°%2$u\'%3$u"%4$s %5$u°%6$u\'%7$u"%8$s'), _('%1$u°%2$u\'%3$u"%4$s %5$u°%6$u\'%7$u"%8$s'),
$latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0? $north:$south), $latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0? $north:$south),
$londms['deg'],$londms['min'], $londms['sec'],($lon>0? $east:$west)); $londms['deg'],$londms['min'], $londms['sec'],($lon>0? $east:$west));
@ -366,6 +371,7 @@ class NoticeListItem extends Widget
$this->out->text(' '); $this->out->text(' ');
$this->out->elementStart('span', array('class' => 'location')); $this->out->elementStart('span', array('class' => 'location'));
// TRANS: Followed by geo location.
$this->out->text(_('at')); $this->out->text(_('at'));
$this->out->text(' '); $this->out->text(' ');
if (empty($url)) { if (empty($url)) {
@ -414,10 +420,11 @@ class NoticeListItem extends Widget
$ns = $this->notice->getSource(); $ns = $this->notice->getSource();
if ($ns) { if ($ns) {
$source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _('web')) : _($ns->name); $source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _m('SOURCE','web')) : _($ns->name);
$this->out->text(' '); $this->out->text(' ');
$this->out->elementStart('span', 'source'); $this->out->elementStart('span', 'source');
// FIXME: probably i18n issue. If "from" is followed by text, that should be a parameter to "from" (from %s). // FIXME: probably i18n issue. If "from" is followed by text, that should be a parameter to "from" (from %s).
// TRANS: Followed by notice source.
$this->out->text(_('from')); $this->out->text(_('from'));
$this->out->text(' '); $this->out->text(' ');
@ -434,7 +441,6 @@ class NoticeListItem extends Widget
// if $ns->name and $ns->url are populated we have // if $ns->name and $ns->url are populated we have
// configured a source attr somewhere // configured a source attr somewhere
if (!empty($name) && !empty($url)) { if (!empty($name) && !empty($url)) {
$this->out->elementStart('span', 'device'); $this->out->elementStart('span', 'device');
$attrs = array( $attrs = array(
@ -479,6 +485,7 @@ class NoticeListItem extends Widget
array( array(
'href' => $convurl.'#notice-'.$this->notice->id, 'href' => $convurl.'#notice-'.$this->notice->id,
'class' => 'response'), 'class' => 'response'),
// TRANS: Addition in notice list item if notice is part of a conversation.
_('in context') _('in context')
); );
} else { } else {
@ -513,6 +520,7 @@ class NoticeListItem extends Widget
$this->out->elementStart('span', 'repeat vcard'); $this->out->elementStart('span', 'repeat vcard');
// TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname.
$this->out->raw(_('Repeated by')); $this->out->raw(_('Repeated by'));
$this->out->elementStart('a', $attrs); $this->out->elementStart('a', $attrs);
@ -539,7 +547,9 @@ class NoticeListItem extends Widget
array('replyto' => $this->profile->nickname, 'inreplyto' => $this->notice->id)); array('replyto' => $this->profile->nickname, 'inreplyto' => $this->notice->id));
$this->out->elementStart('a', array('href' => $reply_url, $this->out->elementStart('a', array('href' => $reply_url,
'class' => 'notice_reply', 'class' => 'notice_reply',
// TRANS: Link title in notice list item to reply to a notice.
'title' => _('Reply to this notice'))); 'title' => _('Reply to this notice')));
// TRANS: Link text in notice list item to reply to a notice.
$this->out->text(_('Reply')); $this->out->text(_('Reply'));
$this->out->text(' '); $this->out->text(' ');
$this->out->element('span', 'notice_id', $this->notice->id); $this->out->element('span', 'notice_id', $this->notice->id);
@ -565,7 +575,10 @@ class NoticeListItem extends Widget
array('notice' => $todel->id)); array('notice' => $todel->id));
$this->out->element('a', array('href' => $deleteurl, $this->out->element('a', array('href' => $deleteurl,
'class' => 'notice_delete', 'class' => 'notice_delete',
'title' => _('Delete this notice')), _('Delete')); // TRANS: Link title in notice list item to delete a notice.
'title' => _('Delete this notice')),
// TRANS: Link text in notice list item to delete a notice.
_('Delete'));
} }
} }