r84960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84959‎ | r84960 | r84961 >
Date:15:04, 29 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added messages
Modified paths:
  • /trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php (modified) (history)
  • /trunk/extensions/SemanticResultFormats/SRF_Messages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php
@@ -15,37 +15,40 @@
1616 */
1717 class SRFGraph extends SMWResultPrinter {
1818 public static $NODE_SHAPES = array(
19 - 'box', 'rect', 'rectangle',
20 - 'none', 'plaintext',
21 - 'polygon',
22 - 'ellipse',
 19+ 'box',
 20+ 'box3d',
2321 'circle',
24 - 'point',
25 - 'egg',
26 - 'triangle',
 22+ 'component',
2723 'diamond',
28 - 'trapezium',
29 - 'parallelogram',
30 - 'house',
31 - 'pentagon ',
32 - 'hexagon',
33 - 'septagon',
34 - 'octagon',
3524 'doublecircle',
3625 'doubleoctagon',
37 - 'tripleoctagon',
 26+ 'egg',
 27+ 'ellipse',
 28+ 'folder',
 29+ 'hexagon',
 30+ 'house',
 31+ 'invhouse',
 32+ 'invtrapezium',
3833 'invtriangle',
39 - 'invtrapezium',
40 - 'invhouse',
 34+ 'Mcircle',
4135 'Mdiamond',
4236 'Msquare',
43 - 'Mcircle',
 37+ 'none',
 38+ 'note',
 39+ 'octagon',
 40+ 'parallelogram',
 41+ 'pentagon ',
 42+ 'plaintext',
 43+ 'point',
 44+ 'polygon',
 45+ 'rect',
 46+ 'rectangle',
 47+ 'septagon',
4448 'square',
45 - 'note',
4649 'tab',
47 - 'folder',
48 - 'box3d',
49 - 'component',
 50+ 'trapezium',
 51+ 'triangle',
 52+ 'tripleoctagon',
5053 );
5154
5255 protected $m_graphName = 'QueryResult';
@@ -226,6 +229,14 @@
227230 return $graphInput;
228231 }
229232
 233+ /**
 234+ * (non-PHPdoc)
 235+ * @see SMWResultPrinter::getName()
 236+ */
 237+ public function getName() {
 238+ return wfMsg( 'srf-printername-graph' );
 239+ }
 240+
230241 public function getParameters() {
231242 return array(
232243 array( 'name' => 'graphname', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_graphname' ) ),
@@ -234,7 +245,10 @@
235246 array( 'name' => 'graphlabel', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphlabel' ), 'values'=> array( 'yes', 'no' ) ),
236247 array( 'name' => 'rankdir', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_rankdir' ) ),
237248 array( 'name' => 'graphlink', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphlink' ), 'values'=> array( 'yes', 'no' ) ),
238 - array( 'name' => 'graphcolor', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphcolor' ), 'values'=> array( 'yes', 'no' ) )
 249+ array( 'name' => 'graphcolor', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphcolor' ), 'values'=> array( 'yes', 'no' ) ),
 250+ array( 'name' => 'nodeshape', 'type' => 'enumeration', 'description' => wfMsg( 'srf-paramdesc-graph-nodeshape' ), 'values'=> self::$NODE_SHAPES ),
 251+ array( 'name' => 'nameproperty', 'type' => 'text', 'description' => wfMsg( 'srf-paramdesc-graph-nameprop' ) ),
 252+ array( 'name' => 'relation', 'type' => 'enumeration', 'description' => wfMsg( 'srf-paramdesc-graph-relation' ), 'values'=> array( 'parent', 'child' ) ),
239253 );
240254 }
241255
Index: trunk/extensions/SemanticResultFormats/SRF_Messages.php
@@ -100,6 +100,10 @@
101101 'srf_paramdesc_hashname' => 'If given and the HashTables extension is available this will create an hash with the specified name',
102102
103103 // format "graph"
 104+ 'srf-printername-graph' => 'Graph',
 105+ 'srf-paramdesc-graph-relation' => 'Are the subjects or nameproperties parents or childs?',
 106+ 'srf-paramdesc-graph-nameprop' => 'Allows setting a property that will be used as subject instead of the actual subject',
 107+ 'srf-paramdesc-graph-nodeshape' => 'The shape of each node on the graph',
104108 'srf_paramdesc_graphname' => 'Title',
105109 'srf_paramdesc_graphsize' => 'Graph size (in px)',
106110 'srf_paramdesc_graphlegend' => 'Show graph legend or not',

Status & tagging log