* Copyright (C) 2011, StatusNet, Inc.
*
* A single list item for showing in a message list
- *
+ *
* PHP version 5
*
* This program is free software: you can redistribute it and/or modify
*
* @return void
*/
-
function show()
{
$this->out->elementStart('li', array('class' => 'hentry notice',
if ($this->message->source) {
$this->out->elementStart('span', 'source');
// 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->showSource($this->message->source);
$this->out->elementEnd('span');
$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
*/
function showSource($source)
{
- $source_name = _($source);
+ $source_name = _m('SOURCE',$source);
switch ($source) {
case 'web':
case 'xmpp':