r40541 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40540‎ | r40541 | r40542 >
Date:16:53, 6 September 2008
Author:vrandezo
Status:old
Tags:
Comment:
Unbreak special property names.
Better messages for empty properties.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -149,7 +149,7 @@
150150 $proptext = $smwgContLang->findSpecialPropertyLabel( $property );
151151 if ($proptext != '') {
152152 $p = Title::newFromText($proptext, SMW_NS_PROPERTY);
153 - $proptext = $skin->makeLinkObj($p, $proptext);
 153+ $proptext = $skin->makeLinkObj($p, $this->unbreak($proptext));
154154 $displayline = true;
155155 }
156156 if (SMW_SP_INSTANCE_OF == $property) {
@@ -197,7 +197,14 @@
198198 $noresult = false;
199199 }
200200 } // end foreach properties
201 - if ($noresult) $html .= "<tr class=\"smwb-propvalue\"><th> &nbsp; </th><td><em>" . wfMsg('smw_result_noresults') . "</em></td></th></table>\n";
 201+ if ($noresult) {
 202+ if ($incoming)
 203+ $noresulttext = wfMsg('smw_browse_no_incoming');
 204+ else
 205+ $noresulttext = wfMsg('smw_browse_no_outgoing');
 206+
 207+ $html .= "<tr class=\"smwb-propvalue\"><th> &nbsp; </th><td><em>" . $noresulttext . "</em></td></th></table>\n";
 208+ }
202209
203210 $html .= "</table>\n";
204211 return $html;
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php
@@ -233,6 +233,8 @@
234234 'smw_browse_more' => '…',
235235 'smw_browse_show_incoming' => 'show properties that link here',
236236 'smw_browse_hide_incoming' => 'hide properties that link here',
 237+ 'smw_browse_no_outgoing' => 'This page has no properties.',
 238+ 'smw_browse_no_incoming' => 'No properties link to this page.',
237239 'smw_inverse_label_default' => '$1 of',
238240 'smw_inverse_label_property' => 'Inverse property label',
239241

Status & tagging log