Output "web" instead of gettext translation file metadata when notice.source is empty

This commit is contained in:
Brion Vibber 2010-08-11 18:53:34 -07:00
parent d15a41c96e
commit 111fc33e1a

View File

@ -499,7 +499,7 @@ class NoticeListItem extends Widget
$ns = $this->notice->getSource();
if ($ns) {
$source_name = (empty($ns->name)) ? _($ns->code) : _($ns->name);
$source_name = (empty($ns->name)) ? ($ns->code ? _($ns->code) : _('web')) : _($ns->name);
$this->out->text(' ');
$this->out->elementStart('span', 'source');
// FIXME: probably i18n issue. If "from" is followed by text, that should be a parameter to "from" (from %s).