r24880 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24879‎ | r24880 | r24881 >
Date:16:15, 17 August 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Cleanup. Removed obsoleted code, changed German and English translations to consistent new terminology. Removed obsolete messages in all
languages.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Datatype.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageDe.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEs.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageFr.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageHe.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguagePl.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageRu.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageSk.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialAttributes.php (deleted) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialRelations.php (deleted) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialUnusedAttributes.php (deleted) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialUnusedRelations.php (deleted) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialWantedRelations.php (deleted) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchTriple.php (deleted) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialWantedRelations.php
@@ -1,74 +0,0 @@
2 -<?php
3 -/**
4 - * @author Daniel M. Herzig
5 - *
6 - * This page shows all relations which don't have an explanatory page
7 - */
8 -
9 -if (!defined('MEDIAWIKI')) die();
10 -
11 -global $IP;
12 -
13 -require_once( "$IP/includes/SpecialPage.php" );
14 -require_once( "$IP/includes/Title.php" );
15 -require_once("$IP/includes/QueryPage.php");
16 -
17 -function doSpecialWantedRelations($par = null) {
18 - list( $limit, $offset ) = wfCheckLimits();
19 - $rep = new SMWWantedRelationsPage();
20 - return $rep->doQuery( $offset, $limit );
21 -}
22 -
23 -SpecialPage::addPage( new SpecialPage('WantedRelations','',true,'doSpecialWantedRelations',false) );
24 -
25 -
26 -
27 -class SMWWantedRelationsPage extends QueryPage {
28 -
29 - function getName() {
30 - return "wanted_relations";
31 - }
32 -
33 - function isExpensive() {
34 - return true;
35 - }
36 -
37 - function isSyndicated() { return false; }
38 -
39 - function getPageHeader() {
40 - return '<p>' . wfMsg('smw_wanted_relations') . "</p><br />\n";
41 - }
42 -
43 - function getSQL() {
44 - $dbr =& wfGetDB( DB_SLAVE );
45 - $relations = $dbr->tableName( 'smw_relations' );
46 - $page = $dbr->tableName( 'page' );
47 - $NSrel = SMW_NS_RELATION;
48 -
49 - return
50 - "SELECT 'WantedRelations' as type,
51 - {$NSrel} as namespace,
52 - relation_title as title,
53 - COUNT(*) as value
54 - FROM $relations
55 - WHERE relation_title
56 - NOT IN
57 - (SELECT DISTINCT page_title FROM $page)
58 - GROUP BY relation_title
59 - ";
60 - }
61 -
62 - function sortDescending() {
63 - return true;
64 - }
65 -
66 - function formatResult( $skin, $result ) {
67 - global $wgLang;
68 - $title = Title::makeTitle( SMW_NS_RELATION, $result->title );
69 - $rlink = $skin->makeLinkObj( $title, $title->getText() );
70 -
71 - return "$rlink ($result->value) ";
72 - }
73 -}
74 -
75 -
Index: trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialUnusedRelations.php
@@ -1,73 +0,0 @@
2 -<?php
3 -/**
4 - * @author Denny Vrandecic
5 - *
6 - * This page shows all relations that have a page but are
7 - * are not instantiated.
8 - */
9 -
10 -if (!defined('MEDIAWIKI')) die();
11 -
12 -global $IP;
13 -require_once( "$IP/includes/SpecialPage.php" );
14 -require_once( "$IP/includes/Title.php" );
15 -require_once("$IP/includes/QueryPage.php");
16 -
17 -function doSpecialUnusedRelations($par = null) {
18 - list( $limit, $offset ) = wfCheckLimits();
19 - $rep = new UnusedRelationsPage();
20 - return $rep->doQuery( $offset, $limit );
21 -}
22 -
23 -SpecialPage::addPage( new SpecialPage('UnusedRelations','',true,'doSpecialUnusedRelations',false) );
24 -
25 -
26 -
27 -class UnusedRelationsPage extends QueryPage {
28 -
29 - function getName() {
30 - return "UnusedRelations";
31 - }
32 -
33 - function isExpensive() {
34 - return false;
35 - }
36 -
37 - function isSyndicated() { return false; }
38 -
39 - function getPageHeader() {
40 - return '<p>' . wfMsg('smw_unusedrelations_docu') . "</p><br />\n";
41 - }
42 - function getSQL() {
43 - $NScat = SMW_NS_RELATION;
44 - $dbr =& wfGetDB( DB_SLAVE );
45 - extract( $dbr->tableNames( 'smw_relations','page' ));
46 - return "SELECT 'Unusedrelations' as type,
47 - {$NScat} as namespace,
48 - page_title as title,
49 - 1 as value
50 - FROM $page
51 - LEFT JOIN $smw_relations ON page_title=relation_title
52 - WHERE subject_id IS NULL
53 - AND page_namespace = {$NScat}
54 - AND page_is_redirect = 0";
55 -// return "SELECT 'Unusedcategories' as type,
56 -// {$NScat} as namespace, page_title as title, 1 as value
57 -// FROM $page
58 -// LEFT JOIN $categorylinks ON page_title=cl_to
59 -// WHERE cl_from IS NULL
60 -// AND page_namespace = {$NScat}
61 -// AND page_is_redirect = 0";
62 - }
63 -
64 - function sortDescending() {
65 - return false;
66 - }
67 -
68 - function formatResult( $skin, $result ) {
69 - global $wgLang;
70 - $title = Title::makeTitle( SMW_NS_RELATION, $result->title );
71 - return $skin->makeLinkObj( $title, $title->getText() );
72 - }
73 -}
74 -
Index: trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialAttributes.php
@@ -1,75 +0,0 @@
2 -<?php
3 -/**
4 - * @author Denny Vrandecic
5 - *
6 - * This page shows all used attributes.
7 - */
8 -
9 -if (!defined('MEDIAWIKI')) die();
10 -
11 -global $IP;
12 -require_once( "$IP/includes/SpecialPage.php" );
13 -require_once( "$IP/includes/Title.php" );
14 -require_once("$IP/includes/QueryPage.php");
15 -
16 -function doSpecialAttributes($par = null) {
17 - list( $limit, $offset ) = wfCheckLimits();
18 - $rep = new AttributesPage();
19 - return $rep->doQuery( $offset, $limit );
20 -}
21 -
22 -SpecialPage::addPage( new SpecialPage('Attributes','',true,'doSpecialAttributes',false) );
23 -
24 -
25 -class AttributesPage extends QueryPage {
26 -
27 - function getName() {
28 - return "Attributes";
29 - }
30 -
31 - function isExpensive() {
32 - return false;
33 - }
34 -
35 - function isSyndicated() { return false; }
36 -
37 - function getPageHeader() {
38 - return '<p>' . wfMsg('smw_attributes_docu') . "</p><br />\n";
39 - }
40 - function getSQL() {
41 - $NSatt = SMW_NS_ATTRIBUTE;
42 - $dbr =& wfGetDB( DB_SLAVE );
43 - $attributes = $dbr->tableName( 'smw_attributes' );
44 - // QueryPage uses the value from this SQL in an ORDER clause,
45 - // so return attribute title in value, and its type in title.
46 - return "SELECT 'Attributes' as type,
47 - {$NSatt} as namespace,
48 - value_datatype as title,
49 - attribute_title as value,
50 - COUNT(*) as count
51 - FROM $attributes
52 - GROUP BY attribute_title, value_datatype";
53 - }
54 -
55 - function sortDescending() {
56 - return false;
57 - }
58 -
59 - function formatResult( $skin, $result ) {
60 - global $wgLang, $wgExtraNamespaces;
61 - // The attribute title is in value, see getSQL().
62 - $attrtitle = Title::makeTitle( SMW_NS_ATTRIBUTE, $result->value );
63 - $attrlink = $skin->makeLinkObj( $attrtitle, $attrtitle->getText() );
64 - // The value_datatype is in title, see getSQL().
65 -
66 - $typelabel = SMWTypeHandlerFactory::getTypeLabelByID($result->title);
67 - if ( $typelabel === NULL ) { // type unknown, maybe some upgrade problem
68 - $typelabel = $result->title;
69 - }
70 - $typetitle = Title::makeTitle( SMW_NS_TYPE, $typelabel );
71 - $typelink = $skin->makeLinkObj( $typetitle);
72 -
73 - return "$attrlink ($result->count)" . wfMsg('smw_attr_type_join', $typelink);
74 - }
75 -}
76 -
Index: trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialUnusedAttributes.php
@@ -1,72 +0,0 @@
2 -<?php
3 -/**
4 - * @author Denny Vrandecic
5 - *
6 - * This page shows all attributes that have a page but are
7 - * are not instantiated.
8 - */
9 -
10 -if (!defined('MEDIAWIKI')) die();
11 -
12 -global $IP;
13 -require_once( "$IP/includes/SpecialPage.php" );
14 -require_once( "$IP/includes/Title.php" );
15 -require_once("$IP/includes/QueryPage.php");
16 -
17 -function doSpecialUnsusedAttributes($par = null) {
18 - list( $limit, $offset ) = wfCheckLimits();
19 - $rep = new UnusedAttributesPage();
20 - return $rep->doQuery( $offset, $limit );
21 -}
22 -
23 -SpecialPage::addPage( new SpecialPage('UnusedAttributes','',true,'doSpecialUnsusedAttributes',false) );
24 -
25 -
26 -
27 -class UnusedAttributesPage extends QueryPage {
28 - function getName() {
29 - return "UnusedAttributes";
30 - }
31 -
32 - function isExpensive() {
33 - return false;
34 - }
35 -
36 - function isSyndicated() { return false; }
37 -
38 - function getPageHeader() {
39 - return '<p>' . wfMsg('smw_unusedattributes_docu') . "</p><br />\n";
40 - }
41 - function getSQL() {
42 - $NScat = SMW_NS_ATTRIBUTE;
43 - $dbr =& wfGetDB( DB_SLAVE );
44 - extract( $dbr->tableNames( 'smw_attributes','page' ));
45 - return "SELECT 'Unusedattributes' as type,
46 - {$NScat} as namespace,
47 - page_title as title,
48 - 1 as value
49 - FROM $page
50 - LEFT JOIN $smw_attributes ON page_title=attribute_title
51 - WHERE subject_id IS NULL
52 - AND page_namespace = {$NScat}
53 - AND page_is_redirect = 0";
54 -// return "SELECT 'Unusedcategories' as type,
55 -// {$NScat} as namespace, page_title as title, 1 as value
56 -// FROM $page
57 -// LEFT JOIN $categorylinks ON page_title=cl_to
58 -// WHERE cl_from IS NULL
59 -// AND page_namespace = {$NScat}
60 -// AND page_is_redirect = 0";
61 - }
62 -
63 - function sortDescending() {
64 - return false;
65 - }
66 -
67 - function formatResult( $skin, $result ) {
68 - global $wgLang;
69 - $title = Title::makeTitle( SMW_NS_ATTRIBUTE, $result->title );
70 - return $skin->makeLinkObj( $title, $title->getText() );
71 - }
72 -}
73 -
Index: trunk/extensions/SemanticMediaWiki/specials/Relations/SMW_SpecialRelations.php
@@ -1,64 +0,0 @@
2 -<?php
3 -/**
4 - * @author Denny Vrandecic
5 - *
6 - * This page shows all used relations.
7 - */
8 -
9 -if (!defined('MEDIAWIKI')) die();
10 -
11 -global $IP;
12 -require_once( "$IP/includes/SpecialPage.php" );
13 -require_once( "$IP/includes/Title.php" );
14 -require_once("$IP/includes/QueryPage.php");
15 -
16 -function doSpecialRelations($par = null) {
17 - list( $limit, $offset ) = wfCheckLimits();
18 - $rep = new RelationsPage();
19 - return $rep->doQuery( $offset, $limit );
20 -}
21 -
22 -SpecialPage::addPage( new SpecialPage('Relations','',true,'doSpecialRelations',false) );
23 -
24 -class RelationsPage extends QueryPage {
25 -
26 - function getName() {
27 - return "Relations";
28 - }
29 -
30 - function isExpensive() {
31 - return false;
32 - }
33 -
34 - function isSyndicated() { return false; }
35 -
36 - function getPageHeader() {
37 - return '<p>' . wfMsg('smw_relations_docu') . "</p><br />\n";
38 - }
39 - function getSQL() {
40 - $dbr =& wfGetDB( DB_SLAVE );
41 - $relations = $dbr->tableName( 'smw_relations' );
42 - $NSrel = SMW_NS_RELATION;
43 - # QueryPage uses the value from this SQL in an ORDER clause.
44 - return "SELECT 'Relations' as type,
45 - {$NSrel} as namespace,
46 - relation_title as title,
47 - relation_title as value,
48 - COUNT(*) as count
49 - FROM $relations
50 - GROUP BY relation_title";
51 - }
52 -
53 - function sortDescending() {
54 - return false;
55 - }
56 -
57 - function formatResult( $skin, $result ) {
58 - global $wgLang;
59 - $title = Title::makeTitle( SMW_NS_RELATION, $result->title );
60 - $rlink = $skin->makeLinkObj( $title, $title->getText() );
61 - return "$rlink ($result->count)";
62 - }
63 -}
64 -
65 -
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchTriple.php
@@ -1,117 +0,0 @@
2 -<?php
3 -/**
4 - * @author Markus Krötzsch
5 - * @author Klaus Lassleben
6 - *
7 - * This special page for MediaWiki implements a simple triple search.
8 - * It only supports full matching but can also be useful to introspect
9 - * the database.
10 - *
11 - * TODO: This function is obsolete and will be removed in some future
12 - * (included for backwards compatibility now).
13 - */
14 -
15 -if (!defined('MEDIAWIKI')) die();
16 -
17 -
18 -global $IP, $smwgIP;
19 -require_once($smwgIP . '/includes/SMW_Datatype.php');
20 -require_once( "$IP/includes/SpecialPage.php" );
21 -
22 -function doSpecialSearchTriple($par = null) {
23 - global $wgOut, $wgRequest, $wgUser;
24 -
25 - $out = '';
26 - $searchtype = $wgRequest->getVal('do');
27 - $subject = $wgRequest->getVal('subject');
28 - $relation = $wgRequest->getVal('relation');
29 - $object = $wgRequest->getVal('object');
30 - $attribute = $wgRequest->getVal('attribute');
31 - $value = $wgRequest->getVal('value');
32 -
33 - $relation = ucfirst($relation);
34 - $attribute = ucfirst($attribute);
35 -
36 -
37 - $sk =& $wgUser->getSkin();
38 - $out .= '<h2>' . wfMsg('redirectpagesub') . '</h2>';
39 - $out .= '<ul><li>' . $sk->makeKnownLinkObj(Title::newFromText('Browse',NS_SPECIAL), wfMsg('browse') ) . '</li>';
40 - $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('SearchByRelation',NS_SPECIAL), wfMsg('searchbyrelation') ) . '</li>';
41 - $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('SearchByAttribute',NS_SPECIAL), wfMsg('searchbyattribute') ) . '</li>';
42 - $out .= '<li>' . $sk->makeKnownLinkObj(Title::newFromText('Ask',NS_SPECIAL), wfMsg('ask') ) . '</li></ul>';
43 - $out .= '<br /><br /><div style="border: 1px solid grey; padding: 20px; background: #DDD; ">';
44 -
45 - $out .= SMWSpecialSearchTriple::getSearchForm($subject, $relation, $object, $attribute, $value, $searchtype);
46 - // find out what the user wants:
47 - if ( ($searchtype==wfMsg('smw_searchtriple_searchatt')) || ($searchtype=='Search Attributes')) {
48 - // Search for attributes
49 - $out .= SMWSpecialSearchTriple::searchAttributes($subject, $attribute, $value);
50 - } elseif ( ($searchtype==wfMsg('smw_searchtriple_searchrel')) || ($searchtype=='Search Relations') ) {
51 - // Search for relations
52 - $out .= SMWSpecialSearchTriple::searchRelations($subject, $relation, $object);
53 - } // else: just don't do anything
54 -
55 - $wgOut->setPageTitle(wfMsg('searchtriple'));
56 - $out .= '</div>';
57 - $wgOut->addHTML($out);
58 -}
59 -
60 -SpecialPage::addPage( new SpecialPage('SearchTriple','',false,'doSpecialSearchTriple',false));
61 -
62 -
63 -
64 -// static class to encapsulate some functions
65 -class SMWSpecialSearchTriple {
66 -
67 - function getSearchForm($subject, $relation, $object, $attribute, $value) {
68 - global $wgOut;
69 -
70 - $form = '';
71 -
72 - $title = Title::makeTitle( NS_SPECIAL, 'SearchTriple' );
73 -
74 - $form .= '<form name="tripleSearch" action="' . $title->escapeLocalURL() . '" method="get"><input type="hidden" name="title" value="' . $title->getPrefixedText() . '"/>';
75 - $form .= wfMsg('smw_searchtriple_docu') . "\n\n";
76 -// $form .=
77 -// '<input id="rel" type="radio" name="searchtype" value="relation" checked="checked" /><label for="rel">Relation</label>'.
78 -// '<input id="att" type="radio" name="searchtype" value="attribute" checked="checked" /><label for="att">Attribute</label>';
79 -
80 - $form .= '<table summary="layout table" style="padding: 4px 5px; border:0px; border-collapse:collapse; background: none; ">' . "\n";
81 - //line 1 and 2: search for relations
82 - $form .= '<tr>' . "\n";
83 - $form .= '<td>' . wfMsg('smw_searchtriple_subject') . '</td>' . "\n";
84 - $form .= '<td>' . wfMsg('smw_searchtriple_relation') . '</td>' . "\n";
85 - $form .= '<td>' . wfMsg('smw_searchtriple_object') . '</td>' . "\n";
86 - $form .= '<td></td>' . "\n";
87 - $form .= '</tr>' . "\n";
88 - $form .= '<tr>' . "\n";
89 - $form .= '<td><input disabled="disabled" type="text" name="subject" value="' . htmlspecialchars($subject) . '"/></td>' . "\n";
90 - $form .= '<td><input disabled="disabled" type="text" name="relation" value="' . htmlspecialchars($relation) . '"/></td>' . "\n";
91 - $form .= '<td><input disabled="disabled" type="text" name="object" value="' . htmlspecialchars($object) . '"/></td>' . "\n";
92 - $form .= '<td><input disabled="disabled" type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchrel') . '"/></td>' . "\n";
93 - $form .= '</tr>' . "\n";
94 - //line 3 and 4: search for attributes
95 - $form .= '<tr>' . "\n";
96 - $form .= '<td></td>' . "\n";
97 - $form .= '<td>' . wfMsg('smw_searchtriple_attribute') . '</td>' . "\n";
98 - $form .= '<td>' . wfMsg('smw_searchtriple_attvalue') . '</td>' . "\n";
99 - $form .= '<td></td>' . "\n";
100 - $form .= '</tr>' . "\n";
101 - $form .= '<tr>' . "\n";
102 - $form .= '<td></td>' . "\n";
103 - $form .= '<td><input disabled="disabled" type="text" name="attribute" value="' . htmlspecialchars($attribute) . '"/></td>' . "\n";
104 - $form .= '<td><input disabled="disabled" type="text" name="value" value="' . htmlspecialchars($value) . '"/></td>' . "\n";
105 - $form .= '<td><input disabled="disabled" type="submit" name="do" value="' . wfMsg('smw_searchtriple_searchatt') . '"/></td>' . "\n";
106 - $form .= '</tr>' . "\n";
107 - $form .= "</table> \n </form> \n <br/><hr/> \n";
108 -
109 -// $form .= '<script language="javascript">' . "\n";
110 -// $form .= ' document.tripleSearch.subject.focus();' . "\n";
111 -// $form .= ' document.tripleSearch.subject.select();' . "\n";
112 -// $form .= '</script>' . "\n";
113 -
114 - return $form;
115 - }
116 -}
117 -
118 -
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Datatype.php
@@ -86,69 +86,6 @@
8787 }
8888
8989 /**
90 - * This method returns the XSD datatype identifier
91 - * for the type of the given id, or NULL if id is not
92 - * known. Since this is used a lot during RDF export, it
93 - * should be reasonably light-weight.
94 - */
95 - static function getXSDTypeByID($typeid) {
96 - if (array_key_exists($typeid,SMWTypeHandlerFactory::$typeLabelsByID)) {
97 - $label = SMWTypeHandlerFactory::$typeLabelsByID[$typeid];
98 - $th = SMWTypeHandlerFactory::getTypeHandlerByLabel($label, false);
99 - if ($th !== NULL) return $th->getXSDType();
100 - }
101 - // maybe a custom type?
102 - if ( (mb_substr($typeid,0,5) == 'Type:') ||
103 - ('geoarea' == $typeid) || ('geolength' == $typeid) ) { // compatibility with <0.5 DB entries
104 - //TODO: when restructuring the type system, provide an update method that "fixes" those old types
105 - // Reuse existing float type handler:
106 - //FIXME: This is bad, since be create a cache entry with the wrong type. It is a good shortcut
107 - // for the given purpose, but not for other purposes where the same cache entry will be used!
108 - SMWTypeHandlerFactory::$typeLabelsByID[$typeid] = SMWTypeHandlerFactory::$typeLabelsByID['float'];
109 - $th = SMWTypeHandlerFactory::getTypeHandlerByLabel(SMWTypeHandlerFactory::$typeLabelsByID['float'], false);
110 - return $th->getXSDType();
111 - }
112 - return NULL;
113 - }
114 -
115 - /**
116 - * This method returns a typehandler object
117 - * for the type of the given id, or NULL if id is not
118 - * known. Since this is used a lot during RDF export, it
119 - * should be reasonably light-weight.
120 - */
121 - static function getTypeHandlerByID($typeid) {
122 - $label = SMWTypeHandlerFactory::getTypeLabelByID($typeid);
123 - if ( $label !== NULL ) {
124 - $th = SMWTypeHandlerFactory::getTypeHandlerByLabel($label);
125 - return $th;
126 - } else {
127 - return NULL;
128 - }
129 - }
130 -
131 - /**
132 - * This method returns a typehandler label
133 - * for the type of the given id, or NULL if id is not
134 - * known. This is lighter-weight than creating a type handler.
135 - */
136 - static function getTypeLabelByID($typeid) {
137 - if (array_key_exists($typeid,SMWTypeHandlerFactory::$typeLabelsByID)) {
138 - return SMWTypeHandlerFactory::$typeLabelsByID[$typeid];
139 - }
140 - // maybe a custom type? The label then is the string without the prefix "Type:"
141 - if (mb_substr($typeid,0,5) == 'Type:') {
142 - SMWTypeHandlerFactory::$typeLabelsByID[$typeid] = mb_substr($typeid,5);
143 - return mb_substr($typeid,5);
144 - } elseif ( ('geoarea' == $typeid) || ('geolength' == $typeid) ) { // compatibility with <0.5 DB entries
145 - //TODO: when restructuring the type system, provide an update method that "fixes" those old types
146 - SMWTypeHandlerFactory::$typeLabelsByID[$typeid] = SMWTypeHandlerFactory::$typeLabelsByID['float']; // the best we can do
147 - return SMWTypeHandlerFactory::$typeLabelsByID['float'];
148 - }
149 - return NULL;
150 - }
151 -
152 - /**
15390 * This method returns an array of the labels of built-in types (those
15491 * announced in code rather than user-defined types with custom units).
15592 * Needed since typeHandlersByLabel is private.
@@ -158,29 +95,6 @@
15996 }
16097
16198 /**
162 - * This method retrieves a type handler object for a given
163 - * special property, provided as a constant identifier. Not
164 - * every special property has a type (some are relations),
165 - * and an error might be returned in certain cases.
166 - */
167 - static function getSpecialTypeHandler($special) {
168 - switch ($special) {
169 - case SMW_SP_HAS_URI:
170 - return new SMWURITypeHandler(SMW_URI_MODE_URI);
171 - case SMW_SP_MAIN_DISPLAY_UNIT: case SMW_SP_DISPLAY_UNIT: case SMW_SP_SERVICE_LINK:
172 - return new SMWStringTypeHandler();
173 - case SMW_SP_CONVERSION_FACTOR: case SMW_SP_POSSIBLE_VALUE:
174 - return new SMWStringTypeHandler();
175 - case SMW_SP_CONVERSION_FACTOR_SI:
176 - return new SMWStringTypeHandler(); // TODO: change this into an appropriate handler
177 - default:
178 - global $smwgContLang;
179 - $specprops = $smwgContLang->getSpecialPropertiesArray();
180 - return new SMWErrorTypeHandler(wfMsgForContent('smw_noattribspecial',$specprops[$special]));
181 - }
182 - }
183 -
184 - /**
18599 * This method returns the type handler object for a given type label
186100 * (i.e. a localized type name), or an error type handler if the label
187101 * is not associated with some handler. The label is usually the article
@@ -215,33 +129,6 @@
216130 }
217131
218132 /**
219 - * This method retrieves a type handler object for a given
220 - * attribute. The attribute is expected to be in text
221 - * form without preceding namespace.
222 - */
223 - static function getTypeHandler($attribute) {
224 - if(!array_key_exists($attribute,SMWTypeHandlerFactory::$typeHandlersByAttribute)) {
225 - global $wgContLang;
226 - $atitle = Title::newFromText($wgContLang->getNsText(SMW_NS_ATTRIBUTE) . ':' . $attribute);
227 - if ($atitle !== NULL) {
228 - $typearray = smwfGetStore()->getSpecialValues($atitle,SMW_SP_HAS_TYPE);
229 - } else { $typearray = Array(); }
230 -
231 - if (count($typearray)==1) {
232 - SMWTypeHandlerFactory::$typeHandlersByAttribute[$attribute] =
233 - SMWTypeHandlerFactory::getTypeHandlerByLabel($typearray[0]);
234 - } elseif (count($typearray)==0) {
235 - SMWTypeHandlerFactory::$typeHandlersByAttribute[$attribute] =
236 - new SMWErrorTypeHandler(wfMsgForContent('smw_notype'));
237 - } else {
238 - SMWTypeHandlerFactory::$typeHandlersByAttribute[$attribute] =
239 - new SMWErrorTypeHandler(wfMsgForContent('smw_manytypes'));
240 - }
241 - }
242 - return SMWTypeHandlerFactory::$typeHandlersByAttribute[$attribute];
243 - }
244 -
245 - /**
246133 * This method retrieves the desired display units list, if any,
247134 * for a given attribute as an array. It gets them from two
248135 * special properties.
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php
@@ -75,7 +75,7 @@
7676 $nav = $this->getNavigationLinks();
7777 $r = '<a name="SMWResults"></a>' . $nav . "<div id=\"mw-pages\">\n";
7878 $r .= '<h2>' . wfMsg('smw_attribute_header',$ti) . "</h2>\n";
79 - $r .= wfMsg('smw_relationarticlecount', min($this->limit, count($this->articles))) . "\n";
 79+ $r .= wfMsg('smw_attributearticlecount', min($this->limit, count($this->articles))) . "\n";
8080 $r .= $this->shortList( $this->articles, $this->articles_start_char ) . "\n</div>" . $nav;
8181 return $r;
8282 }
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore.php
@@ -881,6 +881,7 @@
882882 }
883883
884884 function getUnusedPropertiesSpecial($requestoptions = NULL) {
 885+ /// FIXME filter out the builtin properties!
885886 $db =& wfGetDB( DB_SLAVE );
886887 $options = ' ORDER BY page_title';
887888 if ($requestoptions->limit >= 0) {
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php
@@ -104,8 +104,8 @@
105105 case SMW_SP_SUBPROPERTY_OF:
106106 $result = SMWDataValueFactory::newTypeIDValue('_wpg', $value, $caption);
107107 break;
108 - default: // no special property
109 - $result = new SMWErrorValue(wfMsgForContent('smw_noattribspecial',$specialprop));
 108+ default: // special property was created but not added here; this is bad but we still are nice
 109+ $result = SMWDataValueFactory::newTypeIDValue('_str', $value, $caption);
110110 }
111111
112112 if ($value !== false) {
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEn.php
@@ -9,13 +9,11 @@
1010 class SMW_LanguageEn extends SMW_Language {
1111
1212 protected $smwContentMessages = array(
13 - 'smw_edithelp' => 'Editing help on relations and attributes',
 13+ 'smw_edithelp' => 'Editing help on properties',
1414 'smw_helppage' => 'Relation',
1515 'smw_viewasrdf' => 'RDF feed',
1616 'smw_finallistconjunct' => ', and', //used in "A, B, and C"
1717 'smw_factbox_head' => 'Facts about $1',
18 - 'smw_att_head' => 'Attribute values',
19 - 'smw_rel_head' => 'Relations to other pages',
2018 'smw_spec_head' => 'Special properties',
2119 // URIs that should not be used in objects in cases where users can provide URIs
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -32,14 +30,12 @@
3331 // Messages and strings for basic datatype processing
3432 'smw_decseparator' => '.',
3533 'smw_kiloseparator' => ',',
36 - 'smw_unknowntype' => 'Unsupported type “$1” defined for attribute.',
37 - 'smw_noattribspecial' => 'Special property “$1” is not an attribute (use “::” instead of “:=”).',
38 - 'smw_notype' => 'No type defined for attribute.',
39 - 'smw_manytypes' => 'More than one type defined for attribute.',
 34+ 'smw_unknowntype' => 'Unsupported type “$1” defined for property.',
 35+ 'smw_manytypes' => 'More than one type defined for property.',
4036 'smw_emptystring' => 'Empty strings are not accepted.',
4137 'smw_maxstring' => 'String representation $1 is too long for this site.',
42 - 'smw_nopossiblevalues' => 'Possible values for this attribute are not enumerated.',
43 - 'smw_notinenum' => '“$1” is not in the list of possible values ($2) for this attribute.',
 38+ 'smw_nopossiblevalues' => 'Possible values for this property are not enumerated.',
 39+ 'smw_notinenum' => '“$1” is not in the list of possible values ($2) for this property.',
4440 'smw_noboolean' => '“$1” is not recognized as a boolean (true/false) value.',
4541 'smw_true_words' => 't,yes,y', // comma-separated synonyms for boolean TRUE besides 'true' and '1'
4642 'smw_false_words' => 'f,no,n', // comma-separated synonyms for boolean FALSE besides 'false' and '0'
@@ -47,7 +43,7 @@
4844 'smw_nofloat' => '“$1” is no floating point number.',
4945 'smw_infinite' => 'Numbers as long as “$1” are not supported on this site.',
5046 'smw_infinite_unit' => 'Conversion into unit “$1” resulted in a number that is too long for this site.',
51 - // Currently unused, floats silently store units. 'smw_unexpectedunit' => 'this attribute supports no unit conversion',
 47+ // Currently unused, floats silently store units. 'smw_unexpectedunit' => 'this property supports no unit conversion',
5248 'smw_unsupportedprefix' => 'Prefixes for numbers (“$1”) are not supported.',
5349 'smw_unsupportedunit' => 'Unit conversion for unit “$1” not supported.',
5450 // Messages for geo coordinates parsing
@@ -74,31 +70,17 @@
7571
7672 protected $smwUserMessages = array(
7773 'smw_devel_warning' => 'This feature is currently under development, and might not be fully functional. Backup your data before using it.',
78 - // Messages for pages of types, relations, and attributes
79 - 'smw_type_header' => 'Attributes of type “$1”',
80 - 'smw_typearticlecount' => 'Showing $1 attributes using this type.',
81 - 'smw_attribute_header' => 'Pages using the attribute “$1”',
82 - 'smw_attributearticlecount' => '<p>Showing $1 pages using this attribute.</p>',
83 - 'smw_relation_header' => 'Pages using the relation “$1”',
84 - 'smw_relationarticlecount' => '<p>Showing $1 pages using this relation.</p>',
 74+ // Messages for pages of types and properties
 75+ 'smw_type_header' => 'Properties of type “$1”',
 76+ 'smw_typearticlecount' => 'Showing $1 properties using this type.',
 77+ 'smw_attribute_header' => 'Pages using the property “$1”',
 78+ 'smw_attributearticlecount' => '<p>Showing $1 pages using this property.</p>',
8579 // Messages for Export RDF Special
8680 'exportrdf' => 'Export pages to RDF', //name of this special
8781 'smw_exportrdf_docu' => '<p>This page allows you to obtain data from a page in RDF format. To export pages, enter the titles in the text box below, one title per line.</p>',
8882 'smw_exportrdf_recursive' => 'Recursively export all related pages. Note that the result could be large!',
8983 'smw_exportrdf_backlinks' => 'Also export all pages that refer to the exported pages. Generates browsable RDF.',
9084 'smw_exportrdf_lastdate' => 'Do not export pages that were not changed since the given point in time',
91 - // Messages for Search Triple Special
92 - 'searchtriple' => 'Simple semantic search', //name of this special
93 - 'smw_searchtriple_docu' => "<p>Fill in either the upper or lower row of the input form to search for relations or attributes, respectively. Some of the fields can be left empty to obtain more results. However, if an attribute value is given, the attribute name must be specified as well. As usual, attribute values can be entered with a unit of measurement.</p>\n\n<p>Be aware that you must press the right button to obtain results. Just pressing <i>Return</i> might not trigger the search you wanted.</p>",
94 - 'smw_searchtriple_subject' => 'Subject page:',
95 - 'smw_searchtriple_relation' => 'Relation name:',
96 - 'smw_searchtriple_attribute' => 'Attribute name:',
97 - 'smw_searchtriple_object' => 'Object page:',
98 - 'smw_searchtriple_attvalue' => 'Attribute value:',
99 - 'smw_searchtriple_searchrel' => 'Search Relations',
100 - 'smw_searchtriple_searchatt' => 'Search Attributes',
101 - 'smw_searchtriple_resultrel' => 'Search results (relations)',
102 - 'smw_searchtriple_resultatt' => 'Search results (attributes)',
10385 // Messages for Properties Special
10486 'properties' => 'Properties',
10587 'smw_properties_docu' => 'The following properties are used in the wiki.',
@@ -134,7 +116,7 @@
135117 'smw_oi_importedfromontology' => 'Import from ontology',
136118 // Messages for (data)Types Special
137119 'types' => 'Types',
138 - 'smw_types_docu' => 'The following is a list of all datatypes that can be assigned to attributes. Each datatype has a page where additional information can be provided.',
 120+ 'smw_types_docu' => 'The following is a list of all datatypes that can be assigned to properties. Each datatype has a page where additional information can be provided.',
139121 'smw_types_units' => 'Standard unit: $1; supported units: $2',
140122 'smw_types_builtin' => 'Built-in types',
141123 /*Messages for ExtendedStatistics Special*/
@@ -149,12 +131,12 @@
150132 'smw_extstats_totalri' => 'Total number of relation instances:',
151133 'smw_extstats_totalra' => 'Average number of instances per relation:',
152134 'smw_extstats_totalpr' => 'Total number of pages about relations:',
153 - 'smw_extstats_totala' => 'Total number of attributes:',
154 - 'smw_extstats_totalai' => 'Total number of attribute instances:',
155 - 'smw_extstats_totalaa' => 'Average number of instances per attribute:',
 135+ 'smw_extstats_totala' => 'Total number of properties:',
 136+ 'smw_extstats_totalai' => 'Total number of property instances:',
 137+ 'smw_extstats_totalaa' => 'Average number of instances per property:',
156138 /*Messages for Flawed Attributes Special --disabled--*/
157 - 'flawedattributes' => 'Flawed Attributes',
158 - 'smw_fattributes' => 'The pages listed below have an incorrectly defined attribute. The number of incorrect attributes is given in the brackets.',
 139+ 'flawedattributes' => 'Flawed Properties',
 140+ 'smw_fattributes' => 'The pages listed below have an incorrectly defined property. The number of incorrect properties is given in the brackets.',
159141 // Name of the URI Resolver Special (no content)
160142 'uriresolver' => 'URI Resolver',
161143 'smw_uri_doc' => '<p>The URI resolver implements the <a href="http://www.w3.org/2001/tag/issues.html#httpRange-14">W3C TAG finding on httpRange-14</a>. It takes care that humans don\'t turn into websites.</p>',
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageRu.php
@@ -14,8 +14,6 @@
1515 'smw_viewasrdf' => 'RDF источник',
1616 'smw_finallistconjunct' => ' и', //used in "A, B, and C"
1717 'smw_factbox_head' => 'Факты о $1 &mdash; Кликните <span class="smwsearchicon">+</span> чтобы найти похожие страницы.',
18 - 'smw_att_head' => 'Значения атрибута',
19 - 'smw_rel_head' => 'Отношения к другим страницам',
2018 'smw_spec_head' => 'Специальные свойства',
2119 // URIs that should not be used in objects in cases where users can provide URIs
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -33,8 +31,6 @@
3432 'smw_decseparator' => ',',
3533 'smw_kiloseparator' => ' ',
3634 'smw_unknowntype' => 'Тип атрибута "$1" не поддерживается.',
37 - 'smw_noattribspecial' => 'Специальное свойство "$1" не является атрибутом (используйте "::" вместо ":=").',
38 - 'smw_notype' => 'Атрибуту не задан тип.',
3935 'smw_manytypes' => 'Более одного типа определено для атрибута.',
4036 'smw_emptystring' => 'Пустые строки не принимаются.',
4137 'smw_maxstring' => 'Но строчное представление числа $1 слишком длинное для этого сайта.',
@@ -79,25 +75,11 @@
8076 'smw_typearticlecount' => 'Отображается $1 атрибутов этого типа.',
8177 'smw_attribute_header' => 'Страницы, использующие атрибут “$1”',
8278 'smw_attributearticlecount' => '<p>Отображается $1 страниц, использующих этот атрибут.</p>',
83 - 'smw_relation_header' => 'Страницы, использующие отношение “$1”',
84 - 'smw_relationarticlecount' => '<p>Отображается $1 страниц, использующих это отношение.</p>',
8579 // Messages for Export RDF Special
8680 'exportrdf' => 'Экспорт страниц в RDF', //name of this special
8781 'smw_exportrdf_docu' => '<p>Эта страница позволяет экспортировать части статьи в формате RDF. Наберите названия необходимых статей по одному на строку.</p>',
8882 'smw_exportrdf_recursive' => 'Рекурсивный экспорт всех связанных страниц. Результат этой операции может быть очень большим!',
8983 'smw_exportrdf_backlinks' => 'Также экспортировать все страницы, которые ссылаются на экспортируемые страницы. Генерирует RDF с поддержкой полноценной навигации.',
90 - // Messages for Search Triple Special
91 - 'searchtriple' => 'Простой семантический поиск', //name of this special
92 - 'smw_searchtriple_docu' => "<p>Для поиска отношений используйте верхнюю строку. Для поиска атрибутов используйте нижнюю строку. Для пустого поля будут выведены все варианты. Если значение атрибута задано, то имя атрибута также должно быть задано. Значения атрибутов могут быть заданы с единицой измерения.</p>",
93 - 'smw_searchtriple_subject' => 'Страница-субъект:',
94 - 'smw_searchtriple_relation' => 'Имя отношения:',
95 - 'smw_searchtriple_attribute' => 'Имя атрибута:',
96 - 'smw_searchtriple_object' => 'Страница-объект:',
97 - 'smw_searchtriple_attvalue' => 'Значение атрибута:',
98 - 'smw_searchtriple_searchrel' => 'Искать Отношения',
99 - 'smw_searchtriple_searchatt' => 'Искать Атрибуты',
100 - 'smw_searchtriple_resultrel' => 'Результаты поиска (отношения)',
101 - 'smw_searchtriple_resultatt' => 'Результаты поиска (атрибуты)',
10284 // Messages for Properties Special
10385 'properties' => 'Properties', //TODO: translate
10486 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageEs.php
@@ -14,8 +14,6 @@
1515 'smw_viewasrdf' => 'Ver como RDF',
1616 'smw_finallistconjunct' => ' y', //utilizado en "A, B, y C"
1717 'smw_factbox_head' => 'Hechos relativos a à $1 — Búsqueda de páginas similares con <span class="smwsearchicon">+</span>.',
18 - 'smw_att_head' => 'Atributos',
19 - 'smw_rel_head' => 'Relaciones con otros articulos',
2018 'smw_spec_head' => 'Propiedades especiales',
2119 /*URIs that should not be used in objects in cases where users can provide URIs */
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#", // http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#
@@ -33,8 +31,6 @@
3432 'smw_decseparator' => ',',
3533 'smw_kiloseparator' => '.',
3634 'smw_unknowntype' => 'El tipo de datos "$1" no soportado ha sido devuelto al atributo.',
37 - 'smw_noattribspecial' => 'La propiedad especial "$1" no es un atributo (utilice "::" en lugar de ":=").',
38 - 'smw_notype' => 'Ningún tipo de datos ha sido asignado al atributo.',
3935 'smw_nomanytypes' => 'Demasiados tipos de datos han sido asignados al atributo.',
4036 'smw_emptystring' => 'No se aceptan cadenas vacías.',
4137 'smw_maxstring' => 'La representación de la cadena $1 es demasiado grande para este sitio.',
@@ -78,26 +74,11 @@
7975 'smw_typearticlecount' => 'Mostrando $1 atributos usando este tipo.',
8076 'smw_attribute_header' => 'Paginas usando el atributo “$1”',
8177 'smw_attributearticlecount' => '<p>Mostrando $1 páginas usando este atributo.</p>',
82 - 'smw_relation_header' => 'Paginas usando la relación “$1”',
83 - 'smw_relationarticlecount' => '<p>Mostrando $1 páginas usando esta relación.</p>',
8478 /*Messages for Export RDF Special*/
8579 'exportrdf' => 'Exportar el artículo como RDF', //name of this special
8680 'smw_exportrdf_docu' => '<p> En esta página, las partes de contenido de un artículo pueden ser exportadas a formato RDF. Introduzca el nombre de las páginas deseadas en el cuadro de texto que se encuentra debajo, <i>un nombre por línea </i>.<p/>',
8781 'smw_exportrdf_recursive' => 'Exportar igualmente todas las páginas pertinentes de forma recurrente. Esta posibilidad puede conseguir un gran número de resultados !',
8882 'smw_exportrdf_backlinks' => 'Exportar igualmente todas las páginas que reenvían a páginas exportadas. Resulta un RDF en el que se facilita la navegación.',
89 - /*Messages for Search Triple Special*/
90 - 'searchtriple' => 'Búsqueda semántica simple', //name of this special : Einfache semantische Suche
91 - 'smw_searchtriple_header' => '<h1>Búsqueda de relaciones y atributos</h1>',
92 - 'smw_searchtriple_docu' => "<p>Utilice la casilla de búsqueda para buscar artículos en función de ciertas propiedades. La línea superior está destinada a la búsqueda por relación, la línea inferior a la búsqueda por atributo. Ciertos campos pueden ser dejados en blanco para obtener más resultados. Siempre que se introduzca el valor de un atributo (con la unidad de medida correspondiente), el nombre del atributo debe ser también indicado </p>\n\n<p> Observe que existen dos botones de búsqueda. Presionar la tecla \"Enter\" no le llevará probablemente al resultado de su búsqueda.</p>",
93 - 'smw_searchtriple_subject' => 'Nombre del artículo (sujeto):',
94 - 'smw_searchtriple_relation' => 'Nombre de la relación:',
95 - 'smw_searchtriple_attribute' => 'Nombre de los atributos:',
96 - 'smw_searchtriple_object' => 'Nombre del artículo (objeto) (Objekt):',
97 - 'smw_searchtriple_attvalue' => 'Valor de los atributos:',
98 - 'smw_searchtriple_searchrel' => 'Búsqueda por Relación',
99 - 'smw_searchtriple_searchatt' => 'Búsqueda por atributo',
100 - 'smw_searchtriple_resultrel' => 'Resultados de la búsqueda (Relación)',
101 - 'smw_searchtriple_resultatt' => 'Resultados de la búsqueda (atributos)',
10283 // Messages for Properties Special
10384 'properties' => 'Properties', //TODO: translate
10485 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageFr.php
@@ -14,8 +14,6 @@
1515 'smw_viewasrdf' => 'Voir comme RDF',
1616 'smw_finallistconjunct' => ' et', //utilisé dans "A, B, et C"
1717 'smw_factbox_head' => 'Faits relatifs à $1 &mdash; Recherche de pages similaires avec <span class="smwsearchicon">+</span>.',
18 - 'smw_att_head' => 'Attributs',
19 - 'smw_rel_head' => 'Relations à d\'autres articles',
2018 'smw_spec_head' => 'Propriétés spéciales',
2119 /*URIs that should not be used in objects in cases where users can provide URIs */
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -33,8 +31,6 @@
3432 'smw_decseparator' => ',',
3533 'smw_kiloseparator' => '.',
3634 'smw_unknowntype' => 'Le type de données "$1" non supporté a été retourné à l\'attribut.',
37 - 'smw_noattribspecial' => 'La propriété spéciale "$1" n\'est pas un attribut (utilisez "::" au lieu de ":=").',
38 - 'smw_notype' => 'Aucun type de donné n\'a été assigné à l\'attribut.',
3935 'smw_manytypes' => 'Plusieurs types de données ont été assignés à l\'attribut.',
4036 'smw_emptystring' => 'Les chaînes vides ne sont pas acceptées.',
4137 'smw_maxstring' => 'La chaîne de représentation $1 est trop grande pour ce site.',
@@ -78,26 +74,11 @@
7975 'smw_typearticlecount' => 'Showing $1 attributes using this type.', // TODO translate
8076 'smw_attribute_header' => 'Pages using the attribute “$1”', // TODO translate
8177 'smw_attributearticlecount' => '<p>Showing $1 pages using this attribute.</p>', // TODO translate
82 - 'smw_relation_header' => 'Pages using the relation “$1”', // TODO translate
83 - 'smw_relationarticlecount' => '<p>Showing $1 pages using this relation.</p>', // TODO translate
8478 /*Messages for Export RDF Special*/
8579 'exportrdf' => 'Exporter l\'article comme RDF', //name of this special
8680 'smw_exportrdf_docu' => '<p>Sur cette page, des parties du contenu d\'un article peuvent être exportées dans le format RDF. Veuillez entrer le nom des pages souhaitées dans la boîte de texte ci-dessous, <i>un nom par ligne </i>.</p>',
8781 'smw_exportrdf_recursive' => 'Exporter également toutes les pages pertinentes de manière récursive. Cette possibilité peut aboutir à un très grand nombre de résultats !',
8882 'smw_exportrdf_backlinks' => 'Exporter également toutes les pages qui renvoient à des pages exportées. Produit un RDF dans lequel la navigation est facilitée.',
89 - /*Messages for Search Triple Special*/
90 - 'searchtriple' => 'Recherche sémantique simple', //name of this special : Einfache semantische Suche
91 - 'smw_searchtriple_header' => '<h1>Recherche de relations et d\'attributs</h1>',
92 - 'smw_searchtriple_docu' => "<p>Utilisez le masque de recherche pour rechercher des articles selon certaines propriétés. La ligne supérieur est destinée à la recherche par relation, la ligne inférieure à la recherche par attribut. Certains champs peuvent être laissés vide pour obtenir plus de résultats. Cependant si la valeur d'un attribut est entrée (avec l'unité de mesure correspondante), le nom de l'attribut doit également être indiqué.</p>\n\n<p>Veuillez constater qu'il y a deux boutons de recherche. Appuyer sur la touche Entrée ne conduira peut-être pas à ce que soit menée la recherche souhaitée.</p>",
93 - 'smw_searchtriple_subject' => 'Nom de l\'article (sujet):',
94 - 'smw_searchtriple_relation' => 'Nom de la relation:',
95 - 'smw_searchtriple_attribute' => 'Nom des attributs:',
96 - 'smw_searchtriple_object' => 'Nom de l\'article (objet) :',
97 - 'smw_searchtriple_attvalue' => 'Valeur des attributs :',
98 - 'smw_searchtriple_searchrel' => 'Recherche par relation',
99 - 'smw_searchtriple_searchatt' => 'Recherche par attribut',
100 - 'smw_searchtriple_resultrel' => 'Résultats de la recherche (relations)',
101 - 'smw_searchtriple_resultatt' => 'Résultats de la recherche (attributs)',
10283 // Messages for Properties Special
10384 'properties' => 'Properties', //TODO: translate
10485 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageDe.php
@@ -1,22 +1,26 @@
22 <?php
33 /**
44 * @author Markus Krötzsch
 5+ *
 6+ * Main translations:
 7+ * "property" --> "Attribut"
 8+ * "type" --> "Datentyp"
 9+ * "special properties" --> "Besondere Attribute"
510 */
611
 12+
713 global $smwgIP;
814 include_once($smwgIP . '/languages/SMW_Language.php');
915
1016 class SMW_LanguageDe extends SMW_Language {
1117
1218 protected $smwContentMessages = array(
13 - 'smw_edithelp' => 'Bearbeitungshilfe für Relationen und Attribute',
 19+ 'smw_edithelp' => 'Bearbeitungshilfe für Attribute',
1420 'smw_helppage' => 'Relationen und Attribute',
1521 'smw_viewasrdf' => 'RDF-Feed',
1622 'smw_finallistconjunct' => ' und', //used in "A, B, and C"
1723 'smw_factbox_head' => 'Fakten zu $1',
18 - 'smw_att_head' => 'Attribute',
19 - 'smw_rel_head' => 'Relationen zu anderen Seiten',
20 - 'smw_spec_head' => 'Spezielle Eigenschaften',
 24+ 'smw_spec_head' => 'Besondere Attribute',
2125 /*URIs that should not be used in objects in cases where users can provide URIs */
2226 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
2327 'smw_baduri' => 'URIs aus dem Bereich „$1“ sind an dieser Stelle leider nicht verfügbar.',
@@ -34,8 +38,6 @@
3539 'smw_decseparator' => ',',
3640 'smw_kiloseparator' => '.',
3741 'smw_unknowntype' => 'Dem Attribut wurde der unbekannte Datentyp „$1“ zugewiesen.',
38 - 'smw_noattribspecial' => 'Die spezielle Eigenschaft „$1“ ist kein Attribut (bitte „::“ anstelle von „:=“ verwenden).',
39 - 'smw_notype' => 'Dem Attribut wurde kein Datentyp zugewiesen.',
4042 'smw_manytypes' => 'Dem Attribut wurden mehrere Datentypen zugewiesen.',
4143 'smw_emptystring' => 'Leere Zeichenfolgen werden nicht akzeptiert.',
4244 'smw_maxstring' => 'Die Zeichenkette „$1“ ist für diese Website zu lang.',
@@ -79,26 +81,11 @@
8082 'smw_typearticlecount' => 'Es werden $1 Attribute mit diesem Datentyp angezeigt.',
8183 'smw_attribute_header' => 'Seiten mit dem Attribut „$1“',
8284 'smw_attributearticlecount' => '<p>Es werden $1 Seiten angezeigt, die dieses Attribut verwenden.</p>',
83 - 'smw_relation_header' => 'Seiten mit der Relation „$1“',
84 - 'smw_relationarticlecount' => '<p>Es werden $1 Seiten angezeigt, die diese Relation verwenden.</p>',
8585 /*Messages for Export RDF Special*/
8686 'exportrdf' => 'Seite als RDF exportieren', //name of this special
8787 'smw_exportrdf_docu' => '<p>Hier können Informationen über einzelne Seiten im RDF-Format abgerufen werden. Bitte geben Sie die Namen der gewünschten Seiten <i>zeilenweise</i> ein.</p>',
8888 'smw_exportrdf_recursive' => 'Exportiere auch alle relevanten Seiten rekursiv. Diese Einstellung kann zu sehr großen Ergebnissen führen!',
8989 'smw_exportrdf_backlinks' => 'Exportiere auch alle Seiten, die auf exportierte Seiten verweisen. Erzeugt RDF, das leichter durchsucht werden kann.',
90 - /*Messages for Search Triple Special*/
91 - 'searchtriple' => 'Einfache semantische Suche', //name of this special
92 - 'smw_searchtriple_header' => '<h1>Suche nach Relationen und Attributen</h1>',
93 - 'smw_searchtriple_docu' => "<p>Benutzen Sie die Eingabemaske um nach Seiten mit bestimmten Eigenschaften zu suchen. Die obere Zeile dient der Suche nach Relationen, die untere der Suche nach Attributen. Sie können beliebige Felder leer lassen, um nach allen möglichen Belegungen zu suchen. Lediglich bei der Eingabe von Attributwerten (mit den entsprechenden Maßeinheiten) verlangt die Angabe des gewünschten Attributes.</p>\n\n<p>Beachten Sie, dass es zwei Suchknöpfe gibt. Bei Druck der Eingabetaste wird vielleicht nicht die gewünschte Suche durchgeführt.</p>",
94 - 'smw_searchtriple_subject' => 'Seitenname (Subjekt):',
95 - 'smw_searchtriple_relation' => 'Name der Relation:',
96 - 'smw_searchtriple_attribute' => 'Name des Attributs:',
97 - 'smw_searchtriple_object' => 'Seintenname (Objekt):',
98 - 'smw_searchtriple_attvalue' => 'Wert des Attributs:',
99 - 'smw_searchtriple_searchrel' => 'Suche nach Relationen',
100 - 'smw_searchtriple_searchatt' => 'Suche nach Attributen',
101 - 'smw_searchtriple_resultrel' => 'Suchergebnisse (Relationen)',
102 - 'smw_searchtriple_resultatt' => 'Suchergebnisse (Attribute)',
10390 // Messages for Properties Special
10491 'properties' => 'Attribute',
10592 'smw_properties_docu' => 'In diesem Wiki gibt es die folgenden Attribute:',
@@ -175,7 +162,6 @@
176163 'smw_result_next' => 'Vorwärts',
177164 'smw_result_results' => 'Ergebnisse',
178165 'smw_result_noresults' => 'Keine Ergebnisse gefunden.'
179 -
180166 );
181167
182168 protected $smwDatatypeLabels = array(
@@ -223,8 +209,8 @@
224210 return array(
225211 SMW_NS_RELATION => "Relation",
226212 SMW_NS_RELATION_TALK => "Relation_Diskussion",
227 - SMW_NS_PROPERTY => "Eigenschaft",
228 - SMW_NS_PROPERTY_TALK => "Eigenschaft_Diskussion",
 213+ SMW_NS_PROPERTY => "Attribut",
 214+ SMW_NS_PROPERTY_TALK => "Attribut_Diskussion",
229215 SMW_NS_TYPE => "Datentyp",
230216 SMW_NS_TYPE_TALK => "Datentyp_Diskussion"
231217 );
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguagePl.php
@@ -33,8 +33,6 @@
3434 'smw_viewasrdf' => 'RDF feed', //TODO: translate?
3535 'smw_finallistconjunct' => ' i', //used in "A, B, and C"
3636 'smw_factbox_head' => 'Fakty o $1 &mdash; Kliknij <span class="smwsearchicon">+</span> aby znaleźć podobne strony.',
37 - 'smw_att_head' => 'Wartości atrybutów',
38 - 'smw_rel_head' => 'Relacje do innych artykułów',
3937 'smw_spec_head' => 'Własności specjalne',
4038 /*URIs that should not be used in objects in cases where users can provide URIs */
4139 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -52,8 +50,6 @@
5351 'smw_decseparator' => ',',
5452 'smw_kiloseparator' => '.',
5553 'smw_unknowntype' => '"$1" jako typ atrybutu nie jest wspierany.',
56 - 'smw_noattribspecial' => 'Własność specjalna "$1" nie jest atrybutem (użyj "::" zamiast ":=").',
57 - 'smw_notype' => 'Nie zdefiniowano typu dla atrybutu.',
5854 'smw_manytypes' => 'Zdefiniowano więcej niż jeden typ dla atrybutu.',
5955 'smw_emptystring' => 'Puste łańcuchy znakowe są niedozwolone.',
6056 'smw_maxstring' => 'Reprezentacja znakowa $1 jest za długa jak na to miejsce.',
@@ -99,25 +95,11 @@
10096 'smw_typearticlecount' => 'Pokazano $1 atrybutów używających tego typu.',
10197 'smw_attribute_header' => 'Strony używające atrybutu “$1”',
10298 'smw_attributearticlecount' => '<p>Pokazano $1 stron używających tego atrybutu.</p>',
103 - 'smw_relation_header' => 'Strony używające relacji “$1”',
104 - 'smw_relationarticlecount' => '<p>Pokazano $1 stron używających tej relacji.</p>',
10599 /*Messages for Export RDF Special*/
106100 'exportrdf' => 'Eksport stron do RDF', //name of this special
107101 'smw_exportrdf_docu' => '<p>Ta strona pozwala eksportować fragmenty artykułu w formacie RDF. Aby wyeksportować artykuły, wpisz ich tytuły w poniższym polu tekstowym, po jednym tytule w wierszu.</p>',
108102 'smw_exportrdf_recursive' => 'Rekursywny eksport wszystkich powiązanych stron. Zwróć uwagę, że wynik może być olbrzymi!',
109103 'smw_exportrdf_backlinks' => 'Eksportuj także wszystkie strony, które odwołują się do eksportowanych stron. Tworzy przeglądalny RDF.',
110 - /*Messages for Search Triple Special*/
111 - 'searchtriple' => 'Proste szukanie semantyczne', //name of this special
112 - 'smw_searchtriple_docu' => "<p>Wypełnij górny albo dolny wiersz formularza w celu wyszukania, odpowiednio, relacji albo atrybutów. Niektóre pola mogą pozostać puste w celu uzyskania większej liczby wyników. Jednakże, jeśli podana jest wartość atrybutu, podana musi być także jego nazwa. Jak zwykle, wartości atrybutów mogą być podawane wraz z jednostkami miary.</p>\n\n<p>Pamiętaj, że aby uzyskać wyniki, musisz kliknąć w odpowiedni przycisk. Naciśnięcie po prostu <i>Return</i> może wywołać inne szukanie niż zamierzałeś.</p>",
113 - 'smw_searchtriple_subject' => 'Artykuł podmiotowy:',
114 - 'smw_searchtriple_relation' => 'Nazwa relacji:',
115 - 'smw_searchtriple_attribute' => 'Nazwa atrybutu:',
116 - 'smw_searchtriple_object' => 'Artykuł przedmiotowy:',
117 - 'smw_searchtriple_attvalue' => 'Wartość atrybutu:',
118 - 'smw_searchtriple_searchrel' => 'Szukaj relacji',
119 - 'smw_searchtriple_searchatt' => 'Szukaj atrybutów',
120 - 'smw_searchtriple_resultrel' => 'Szukaj wyników (relacje)',
121 - 'smw_searchtriple_resultatt' => 'Szukaj wyników (atrybuty)',
122104 // Messages for Properties Special
123105 'properties' => 'Properties', //TODO: translate
124106 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageHe.php
@@ -14,8 +14,6 @@
1515 'smw_viewasrdf' => 'RDF feed',
1616 'smw_finallistconjunct' => ', וגם', //used in "A, B, and C"
1717 'smw_factbox_head' => 'עובדות על אודות $1 &mdash; לחץ <span class="smwsearchicon">+</span> בכדי למצוא דפים דומים.',
18 - 'smw_att_head' => 'ערכי התכונה',
19 - 'smw_rel_head' => 'יחס לדפים אחרים',
2018 'smw_spec_head' => 'מאפיינים מיוחדים',
2119 /*URIs that should not be used in objects in cases where users can provide URIs */
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -33,8 +31,6 @@
3432 'smw_decseparator' => '.',
3533 'smw_kiloseparator' => ',',
3634 'smw_unknowntype' => '[אופס! טיפוס לא מוכר "$1" הוגדר עבור תכונה זו]',
37 - 'smw_noattribspecial' => '[אופס! מאפיין מיוחד "$1" אינו תכונה (יש להשתמש ב- "::" במקום ב- ":=")]',
38 - 'smw_notype' => '[אופס! לא הוגדר טיפוס לתכונה זו]',
3935 'smw_manytypes' => '[אופס! הוגדר יותר מטיפוס אחד לתכונה זו]',
4036 'smw_emptystring' => '[אופס! לא ניתן להשתמש כאן במחרוזות ריקות]',
4137 'smw_maxstring' => '[מצטערת, ייצוג המחרוזת כ-$1 ארוך מדי עבור אתר זה.]',
@@ -78,25 +74,11 @@
7975 'smw_typearticlecount' => 'Showing $1 attributes using this type.', // TODO translate
8076 'smw_attribute_header' => 'Pages using the attribute “$1”', // TODO translate
8177 'smw_attributearticlecount' => '<p>Showing $1 pages using this attribute.</p>', // TODO translate
82 - 'smw_relation_header' => 'Pages using the relation “$1”', // TODO translate
83 - 'smw_relationarticlecount' => '<p>Showing $1 pages using this relation.</p>', // TODO translate
8478 /*Messages for Export RDF Special*/ // TODO: translate
8579 'exportrdf' => 'Export pages to RDF', //name of this special
8680 'smw_exportrdf_docu' => '<p>This page allows you to obtain data from a page in RDF format. To export pages, enter the titles in the text box below, one title per line.</p>',
8781 'smw_exportrdf_recursive' => 'Recursively export all related pages. Note that the result could be large!',
8882 'smw_exportrdf_backlinks' => 'Also export all pages that refer to the exported pages. Generates browsable RDF.',
89 - /*Messages for Search Triple Special*/
90 - 'searchtriple' => 'חיפוש סמנטי פשוט', //name of this special
91 - 'smw_searchtriple_docu' => "<p>Fill in either the upper or lower row of the input form to search for relations or attributes, respectively. Some of the fields can be left empty to obtain more results. However, if an attribute value is given, the attribute name must be specified as well. As usual, attribute values can be entered with a unit of measurement.</p>\n\n<p>Be aware that you must press the right button to obtain results. Just pressing <i>Return</i> might not trigger the search you wanted.</p>",
92 - 'smw_searchtriple_subject' => 'דף נושא:',
93 - 'smw_searchtriple_relation' => 'שם היחס:',
94 - 'smw_searchtriple_attribute' => 'שם התכונה:',
95 - 'smw_searchtriple_object' => 'דף נשוא:',
96 - 'smw_searchtriple_attvalue' => 'ערך התכונה:',
97 - 'smw_searchtriple_searchrel' => 'חפס יחסים',
98 - 'smw_searchtriple_searchatt' => 'חפש תכונות',
99 - 'smw_searchtriple_resultrel' => 'חפש בתוצאות (יחסים)',
100 - 'smw_searchtriple_resultatt' => 'חפש בתוצאות (תכונות)',
10183 // Messages for Properties Special
10284 'properties' => 'Properties', //TODO: translate
10385 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_LanguageSk.php
@@ -14,8 +14,6 @@
1515 'smw_viewasrdf' => 'RDF feed',
1616 'smw_finallistconjunct' => ' a', //used in "A, B, and C"
1717 'smw_factbox_head' => 'Skutočnosti o $1 &mdash; Kliknutím na <span class="smwsearchicon">+</span> vyhľadáte podobné stránky.',
18 - 'smw_att_head' => 'Hodnoty atribútov',
19 - 'smw_rel_head' => 'Vzťahy s inými stránkami',
2018 'smw_spec_head' => 'Zvláštne vlastnosti',
2119 /*URIs that should not be used in objects in cases where users can provide URIs */
2220 'smw_uri_blacklist' => " http://www.w3.org/1999/02/22-rdf-syntax-ns#\n http://www.w3.org/2000/01/rdf-schema#\n http://www.w3.org/2002/07/owl#",
@@ -33,8 +31,6 @@
3432 'smw_decseparator' => '.',
3533 'smw_kiloseparator' => ',',
3634 'smw_unknowntype' => 'Pre atribút je definovaný nepodporovaný typ "$1".',
37 - 'smw_noattribspecial' => 'Zvláštna vlastnosť "$1" nie je atribút (použite "::" namiesto ":=").',
38 - 'smw_notype' => 'Pre atribút nebol definovaný typ.',
3935 'smw_manytypes' => 'Pre atribút bol definovaný viac ako jeden typ.',
4036 'smw_emptystring' => 'Prázdne reťazcie nie sú akceptované.',
4137 'smw_maxstring' => 'Reprezentácia reťazca $1 je pre túro stránku príliš dlhá.',
@@ -80,25 +76,11 @@
8177 'smw_typearticlecount' => 'Showing $1 attributes using this type.', // TODO translate
8278 'smw_attribute_header' => 'Pages using the attribute “$1”', // TODO translate
8379 'smw_attributearticlecount' => '<p>Showing $1 pages using this attribute.</p>', // TODO translate
84 - 'smw_relation_header' => 'Pages using the relation “$1”', // TODO translate
85 - 'smw_relationarticlecount' => '<p>Showing $1 pages using this relation.</p>', // TODO translate
8680 /*Messages for Export RDF Special*/
8781 'exportrdf' => 'Exportovať stránky do RDF', //name of this special
8882 'smw_exportrdf_docu' => '<p>Táto stránka vám umožňuje exportovať časti stránok do formátu RDF. Po zadaní názvov stránok do spodného textového poľa, jeden názov na riadok, môžete exportovať stránky.</p>',
8983 'smw_exportrdf_recursive' => 'Rekurzívne exportovať všetky súvisiace stránky. Pozor, výsledok môže byť veľmi veľký!',
9084 'smw_exportrdf_backlinks' => 'Tieť exportovať všetky stránky, ktoré odkazujú na exportované stránky. Vytvorí prehliadateľné RDF.',
91 - /*Messages for Search Triple Special*/
92 - 'searchtriple' => 'Jednoduché sémantické vyhľadávanie', //name of this special
93 - 'smw_searchtriple_docu' => "<p>Vyplňte buď vrchný alebo spodný riadok vstupného formulára pre hľadanie vzťahov resp. atribútov. Niektoré z polí je možné nechať nevyplnené, čím získate viac výsledkov. Ak je však zadaná hodnota atribútu, musí byť zadaný aj názov atribútu. Ako obyčajne, hodnoty atribútov je možné zadať spolu s meracou jednotkou.</p>\n\n<p>Buďte si vedomý, že je potrebné stlačiť správne tlačidlo, aby ste dostali výsledky. Iba stlačenie klávesy <i>Enter</i> nemusí spustiť vyhľadávanie, ktoré chcete.</p>",
94 - 'smw_searchtriple_subject' => 'Stránka predmetu:',
95 - 'smw_searchtriple_relation' => 'Názov vzťahu:',
96 - 'smw_searchtriple_attribute' => 'Názov atribútu:',
97 - 'smw_searchtriple_object' => 'Stránka objektu:',
98 - 'smw_searchtriple_attvalue' => 'Hodnota atribútu:',
99 - 'smw_searchtriple_searchrel' => 'Hľadaj vzťahy',
100 - 'smw_searchtriple_searchatt' => 'Hľadaj atribúty',
101 - 'smw_searchtriple_resultrel' => 'Hľadaj výsledky (vzťahy)',
102 - 'smw_searchtriple_resultatt' => 'Hľadaj výsledky (atribúty)',
10385 // Messages for Properties Special
10486 'properties' => 'Properties', //TODO: translate
10587 'smw_properties_docu' => 'The following properties are used in the wiki.', //TODO: translate

Status & tagging log