r100425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100424‎ | r100425 | r100426 >
Date:15:45, 21 October 2011
Author:yaron
Status:deferred
Tags:
Comment:
Tag for verion 0.6.7
Modified paths:
  • /tags/extensions/SemanticInternalObjects/REL_0_6_7 (added) (history)

Diff [purge]

Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_PageSchemas.php
@@ -0,0 +1,146 @@
 2+<?php
 3+
 4+/**
 5+ * Functions for handling Semantic Internal Objects data within the Page Schemas
 6+ * extension.
 7+ *
 8+ * @author Yaron Koren
 9+ * @file SIO_PageSchemas.php
 10+ * @ingroup SIO
 11+ */
 12+
 13+class SIOPageSchemas extends PSExtensionHandler {
 14+ public static function registerClass() {
 15+ global $wgPageSchemasHandlerClasses;
 16+ $wgPageSchemasHandlerClasses[] = 'SIOPageSchemas';
 17+ return true;
 18+ }
 19+
 20+ public static function getDisplayColor() {
 21+ return '#FF8';
 22+ }
 23+
 24+ public static function getTemplateDisplayString() {
 25+ return wfMsg( 'semanticinternalobjects-internalproperty' );
 26+ }
 27+
 28+ /**
 29+ * Returns the display info for the property (if any is defined)
 30+ * for a single field in the Page Schemas XML.
 31+ */
 32+ public static function getTemplateDisplayValues( $templateXML ) {
 33+ foreach ( $templateXML->children() as $tag => $child ) {
 34+ if ( $tag == "semanticinternalobjects_MainProperty" ) {
 35+ $propName = $child->attributes()->name;
 36+ $values = array();
 37+ return array( $propName, $values );
 38+ }
 39+ }
 40+ return null;
 41+ }
 42+
 43+ /**
 44+ * Constructs XML for the SIO property, based on what was submitted
 45+ * in the 'edit schema' form.
 46+ */
 47+ public static function createTemplateXMLFromForm() {
 48+ global $wgRequest;
 49+
 50+ $xmlPerTemplate = array();
 51+ foreach ( $wgRequest->getValues() as $var => $val ) {
 52+ if ( substr( $var, 0, 18 ) == 'sio_property_name_' ) {
 53+ $templateNum = substr( $var, 18 );
 54+ $xml = '<semanticinternalobjects_MainProperty name="' . $val . '" />';
 55+ $xmlPerTemplate[$templateNum] = $xml;
 56+ }
 57+ }
 58+ return $xmlPerTemplate;
 59+ }
 60+
 61+ /**
 62+ * Returns the HTML necessary for getting information about the
 63+ * semantic property within the Page Schemas 'editschema' page.
 64+ */
 65+ public static function getTemplateEditingHTML( $psTemplate) {
 66+ $prop_array = array();
 67+ $hasExistingValues = false;
 68+ if ( !is_null( $psTemplate ) ) {
 69+ $prop_array = $psTemplate->getObject( 'semanticinternalobjects_MainProperty' );
 70+ if ( !is_null( $prop_array ) ) {
 71+ $hasExistingValues = true;
 72+ }
 73+ }
 74+ $text = '<p>' . 'Name of property to connect this template\'s fields to the rest of the page (should only be used if this template can have multiple instances):' . ' ';
 75+ $propName = PageSchemas::getValueFromObject( $prop_array, 'name' );
 76+ $text .= Html::input( 'sio_property_name_num', $propName, array( 'size' => 15 ) ) . "\n";
 77+
 78+ return array( $text, $hasExistingValues );
 79+ }
 80+
 81+ /**
 82+ * Returns the property based on the XML passed from the Page Schemas
 83+ * extension.
 84+ */
 85+ public static function createPageSchemasObject( $tagName, $xml ) {
 86+ if ( $tagName == "semanticinternalobjects_MainProperty" ) {
 87+ foreach ( $xml->children() as $tag => $child ) {
 88+ if ( $tag == $tagName ) {
 89+ $sio_array = array();
 90+ $propName = $child->attributes()->name;
 91+ $sio_array['name'] = (string)$propName;
 92+ foreach ( $child->children() as $prop => $value ) {
 93+ $sio_array[$prop] = (string)$value;
 94+ }
 95+ return $sio_array;
 96+ }
 97+ }
 98+ }
 99+ return null;
 100+ }
 101+
 102+ static function getInternalObjectPropertyName ( $psTemplate ) {
 103+ // TODO - there should be a more direct way to get
 104+ // this data.
 105+ $sioPropertyArray = $psTemplate->getObject( 'semanticinternalobjects_MainProperty' );
 106+ return PageSchemas::getValueFromObject( $sioPropertyArray, 'name' );
 107+ }
 108+
 109+ public static function getPagesToGenerate( $pageSchemaObj ) {
 110+ $pagesToGenerate = array();
 111+ $psTemplates = $pageSchemaObj->getTemplates();
 112+ foreach ( $psTemplates as $psTemplate ) {
 113+ $sioPropertyName = self::getInternalObjectPropertyName( $psTemplate );
 114+ if ( is_null( $sioPropertyName ) ) {
 115+ continue;
 116+ }
 117+ $pagesToGenerate[] = Title::makeTitleSafe( SMW_NS_PROPERTY, $sioPropertyName );
 118+ }
 119+ return $pagesToGenerate;
 120+ }
 121+
 122+ public static function generatePages( $pageSchemaObj, $selectedPages ) {
 123+ global $smwgContLang, $wgUser;
 124+
 125+ $datatypeLabels = $smwgContLang->getDatatypeLabels();
 126+ $pageTypeLabel = $datatypeLabels['_wpg'];
 127+
 128+ $jobs = array();
 129+ $jobParams = array();
 130+ $jobParams['user_id'] = $wgUser->getId();
 131+
 132+ $psTemplates = $pageSchemaObj->getTemplates();
 133+ foreach ( $psTemplates as $psTemplate ) {
 134+ $sioPropertyName = self::getInternalObjectPropertyName( $psTemplate );
 135+ if ( is_null( $sioPropertyName ) ) {
 136+ continue;
 137+ }
 138+ $propTitle = Title::makeTitleSafe( SMW_NS_PROPERTY, $sioPropertyName );
 139+ if ( !in_array( $propTitle, $selectedPages ) ) {
 140+ continue;
 141+ }
 142+ $jobParams['page_text'] = SMWPageSchemas::createPropertyText( $pageTypeLabel, null );
 143+ $jobs[] = new PSCreatePageJob( $propTitle, $jobParams );
 144+ }
 145+ Job::batchInsert( $jobs );
 146+ }
 147+}
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_PageSchemas.php
___________________________________________________________________
Added: svn:eol-style
1148 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.php
@@ -0,0 +1,59 @@
 2+<?php
 3+/**
 4+ * Initialization file for Semantic Internal Objects.
 5+ *
 6+ * @file
 7+ * @ingroup SemanticInternalObjects
 8+ * @author Yaron Koren
 9+ */
 10+
 11+if ( !defined( 'MEDIAWIKI' ) ) die();
 12+
 13+define( 'SIO_VERSION', '0.6.7' );
 14+
 15+$wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'parserhook'][] = array(
 16+ 'path' => __FILE__,
 17+ 'name' => 'Semantic Internal Objects',
 18+ 'version' => SIO_VERSION,
 19+ 'author' => 'Yaron Koren',
 20+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects',
 21+ 'descriptionmsg' => 'semanticinternalobjects-desc',
 22+);
 23+
 24+$wgHooks['ParserFirstCallInit'][] = 'siofRegisterParserFunctions';
 25+$wgHooks['LanguageGetMagic'][] = 'siofLanguageGetMagic';
 26+$wgHooks['ParserClearState'][] = 'SIOHandler::clearState';
 27+$wgHooks['SMWSQLStore2::updateDataAfter'][] = 'SIOHandler::updateData';
 28+$wgHooks['SMWSQLStore2::deleteSubjectAfter'][] = 'SIOHandler::deleteData';
 29+$wgHooks['smwUpdatePropertySubjects'][] = 'SIOHandler::handleUpdatingOfInternalObjects';
 30+$wgHooks['TitleMoveComplete'][] = 'SIOHandler::handlePageMove';
 31+$wgHooks['smwRefreshDataJobs'][] = 'SIOHandler::handleRefreshingOfInternalObjects';
 32+$wgHooks['smwAddToRDFExport'][] = 'SIOSQLStore::createRDF';
 33+$wgHooks['PageSchemasRegisterHandlers'][] = 'SIOPageSchemas::registerClass';
 34+
 35+$siogIP = dirname( __FILE__ );
 36+$wgExtensionMessagesFiles['SemanticInternalObjects'] = $siogIP . '/SemanticInternalObjects.i18n.php';
 37+$wgAutoloadClasses['SIOHandler'] = $siogIP . '/SemanticInternalObjects_body.php';
 38+$wgAutoloadClasses['SIOSQLStore'] = $siogIP . '/SemanticInternalObjects_body.php';
 39+if ( class_exists( 'SMWDIWikiPage' ) ) {
 40+ // SMW >= 1.6
 41+ $wgAutoloadClasses['SIOInternalObjectValue'] = $siogIP . '/SIO_RDFClasses2.php';
 42+} else {
 43+ $wgAutoloadClasses['SIOInternalObjectValue'] = $siogIP . '/SIO_RDFClasses.php';
 44+}
 45+$wgAutoloadClasses['SIOPageSchemas'] = $siogIP . '/SIO_PageSchemas.php';
 46+
 47+function siofRegisterParserFunctions( &$parser ) {
 48+ $parser->setFunctionHook( 'set_internal', array( 'SIOHandler', 'doSetInternal' ) );
 49+ $parser->setFunctionHook( 'set_internal_recurring_event', array( 'SIOHandler', 'doSetInternalRecurringEvent' ) );
 50+ return true; // always return true, in order not to stop MW's hook processing!
 51+}
 52+
 53+function siofLanguageGetMagic( &$magicWords, $langCode = 'en' ) {
 54+ switch ( $langCode ) {
 55+ default:
 56+ $magicWords['set_internal'] = array ( 0, 'set_internal' );
 57+ $magicWords['set_internal_recurring_event'] = array ( 0, 'set_internal_recurring_event' );
 58+ }
 59+ return true;
 60+}
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.php
___________________________________________________________________
Added: svn:eol-style
161 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_RDFClasses.php
@@ -0,0 +1,62 @@
 2+<?php
 3+
 4+/**
 5+ * Classes that enable correct RDF export of Semantic Internal Objects data.
 6+ * This file holds the versions of these classes necessary for SMW 1.5 only.
 7+ *
 8+ * @author Yaron Koren
 9+ */
 10+
 11+class SIOTitle {
 12+ function __construct ($name, $namespace) {
 13+ $this->mName = $name;
 14+ $this->mNamespace = $namespace;
 15+ }
 16+
 17+ /**
 18+ * Based on functions in Title class
 19+ */
 20+ function getPrefixedName() {
 21+ $s = '';
 22+ if ( 0 != $this->mNamespace ) {
 23+ global $wgContLang;
 24+ $s .= $wgContLang->getNsText( $this->mNamespace ) . ':';
 25+ }
 26+ $s .= $this->mName;
 27+ return $s;
 28+ }
 29+
 30+ function getPrefixedURL() {
 31+ $s = $this->getPrefixedName();
 32+ return wfUrlencode( str_replace( ' ', '_', $s ) );
 33+ }
 34+}
 35+
 36+class SIOInternalObjectValue extends SMWWikiPageValue {
 37+ function __construct($name, $namespace) {
 38+ $this->mSIOTitle = new SIOTitle( $name, $namespace );
 39+ }
 40+
 41+ function getExportData() {
 42+ global $smwgNamespace;
 43+ return new SMWExpData( new SMWExpResource( SIOExporter::getResolverURL() . $this->mSIOTitle->getPrefixedURL() ) );
 44+ }
 45+
 46+ function getTitle() {
 47+ return $this->mSIOTitle;
 48+ }
 49+
 50+ function getWikiValue() {
 51+ return $this->mSIOTitle->getPrefixedName();
 52+ }
 53+}
 54+
 55+/**
 56+ * Class to work around the fact that SMWExporter::$m_ent_wiki is protected.
 57+ **/
 58+class SIOExporter extends SMWExporter {
 59+
 60+ static function getResolverURL() {
 61+ return SMWExporter::$m_ent_wiki;
 62+ }
 63+}
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_RDFClasses.php
___________________________________________________________________
Added: svn:eol-style
164 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_RDFClasses2.php
@@ -0,0 +1,34 @@
 2+<?php
 3+
 4+/**
 5+ * Classes that enable correct RDF export of Semantic Internal Objects data.
 6+ * This file holds the versions of these classes necessary for SMW >= 1.6.
 7+ *
 8+ * @author Yaron Koren
 9+ */
 10+
 11+class SIOTitle {
 12+ function __construct ($name, $namespace) {
 13+ $this->mName = $name;
 14+ $this->mNamespace = $namespace;
 15+ }
 16+}
 17+
 18+/**
 19+ * @TODO - should this take advantage of the "internal object"/sub-object/
 20+ * blank-node functionality in SMW 1.6, put in place for use by the Record
 21+ * type? For now, just ignore that.
 22+ */
 23+class SIOInternalObjectValue extends SMWDIWikiPage {
 24+ function __construct($name, $namespace) {
 25+ $this->mSIOTitle = new SIOTitle( $name, $namespace );
 26+ }
 27+
 28+ function getDBkey() {
 29+ return $this->mSIOTitle->mName;
 30+ }
 31+
 32+ function getNamespace() {
 33+ return $this->mSIOTitle->mNamespace;
 34+ }
 35+}
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SIO_RDFClasses2.php
___________________________________________________________________
Added: svn:eol-style
136 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/README
@@ -0,0 +1,89 @@
 2+Semantic Internal Objects Extension
 3+
 4+ Version 0.6.7
 5+ Yaron Koren
 6+
 7+This is free software licensed under the GNU General Public License. Please
 8+see http://www.gnu.org/copyleft/gpl.html for further details, including the
 9+full text and terms of the license.
 10+
 11+== Overview ==
 12+
 13+Semantic Internal Objects is an extension to MediaWiki that defines a
 14+parser function, '#set_internal', that is used to define "internal objects"
 15+within the Semantic MediaWiki system. There are complex types of
 16+information sometimes known as 'n-ary relations' that involve more than one
 17+data value associated together. A simple example is in a cooking recipe; a
 18+recipe may call for 1 cup of flour, and the values "1", "cup" and "flour"
 19+must be encoded together; by themselves, the values are not meaningful (the
 20+third value has meaning, though not all of the meaning it could have). Such
 21+information can be stored already in SMW using multi-valued properties,
 22+though this approach is not flexible and currently leads to querying problems.
 23+Instead, #set_internal can be used to define "internal objects" within a page,
 24+which can then be queried as normal SMW pages would; a row of a recipe would
 25+be a good example of data that could be defined using #set_internal.
 26+
 27+The syntax of #set_internal is as follows:
 28+
 29+{{#set_internal:object_to_page_property
 30+|property1=value1
 31+|property2=value2
 32+...
 33+}}
 34+
 35+A sample call to #set_internal would be:
 36+
 37+{{#set_internal:Has recipe
 38+|Has quantity=1
 39+|Has unit=cup
 40+|Has ingredient=flour
 41+}}
 42+
 43+This call would be placed in a page for a recipe, and it would define an object
 44+that had an automatically-generated name; if it were in a page called "Carrot
 45+cake", for instance, the object would be called "Carrot cake#1". If that page
 46+had subsequent calls to #set_internal, the objects that those calls generated
 47+would be called "Carrot cake#2", "Carrot cake#3", etc.
 48+
 49+It should be noted that #set_internal does not display anything to the screen;
 50+display of the values has to be handled separately (this can be done easily
 51+if the function is called from a template).
 52+
 53+Internal objects, once stored, can be queried as if they were wiki pages. So
 54+the following query would show a table of all the recipes that contain more
 55+than 1/2 a cup of flour, and the number of cups they contain:
 56+
 57+{{#ask:[[Has recipe::+]][[Has ingredient::flour]][[Has unit::cup]][[Has quantity::>.5]]
 58+|mainlabel=-
 59+|? Has recipe
 60+|? Has quantity
 61+}}
 62+
 63+Note the "mainlabel=-" parameter in the query: that hides the names of the
 64+internal objects from users, since those names are meaningless.
 65+
 66+For more information, see the extension homepage at:
 67+http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
 68+
 69+== Requirements ==
 70+
 71+This version of the Semantic Internal Objects extension requires MediaWiki 1.11
 72+or higher and Semantic MediaWiki 1.5.2 or higher.
 73+
 74+== Installation ==
 75+
 76+To install the extension, place the entire 'SemanticInternalObjects' directory
 77+within your MediaWiki 'extensions' directory, then add the following
 78+line to your 'LocalSettings.php' file:
 79+
 80+ require_once( "$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php" );
 81+
 82+== Contact ==
 83+
 84+Most comments, questions, suggestions and bug reports should be sent to
 85+the Semantic MediaWiki mailing list:
 86+
 87+ https://lists.sourceforge.net/lists/listinfo/semediawiki-user
 88+
 89+If possible, please add "[SIO]" at the beginning of the subject line, to
 90+clarify the subject matter.
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/README
___________________________________________________________________
Added: svn:eol-style
191 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.i18n.magic.php
@@ -0,0 +1,41 @@
 2+<?php
 3+/**
 4+ *
 5+ */
 6+
 7+$magicWords = array();
 8+
 9+/** English (English) */
 10+$magicWords['en'] = array(
 11+ 'set_internal' => array( 0, 'set_internal' ),
 12+);
 13+
 14+/** Arabic (العربية) */
 15+$magicWords['ar'] = array(
 16+ 'set_internal' => array( 0, 'ضبط_داخلي' ),
 17+);
 18+
 19+/** Egyptian Spoken Arabic (مصرى) */
 20+$magicWords['arz'] = array(
 21+ 'set_internal' => array( 0, 'ضبط_داخلي', 'set_internal' ),
 22+);
 23+
 24+/** German (Deutsch) */
 25+$magicWords['de'] = array(
 26+ 'set_internal' => array( 0, 'setze_intern' ),
 27+);
 28+
 29+/** Japanese (日本語) */
 30+$magicWords['ja'] = array(
 31+ 'set_internal' => array( 0, '内部設定' ),
 32+);
 33+
 34+/** Macedonian (Македонски) */
 35+$magicWords['mk'] = array(
 36+ 'set_internal' => array( 0, 'задај_внатрешни' ),
 37+);
 38+
 39+/** Dutch (Nederlands) */
 40+$magicWords['nl'] = array(
 41+ 'set_internal' => array( 0, 'intern_instellen' ),
 42+);
\ No newline at end of file
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.i18n.magic.php
___________________________________________________________________
Added: svn:eol-style
143 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects_body.php
@@ -0,0 +1,498 @@
 2+<?php
 3+/**
 4+ * Main classes used by the Semantic Internal Objects extension.
 5+ *
 6+ * @author Yaron Koren
 7+ */
 8+
 9+/**
 10+ * Class that holds information on a single internal object, including all
 11+ * its properties.
 12+ */
 13+class SIOInternalObject {
 14+ protected $mMainTitle;
 15+ protected $mIndex;
 16+ protected $mPropertyValuePairs;
 17+
 18+ public function SIOInternalObject( $mainTitle, $index ) {
 19+ $this->mMainTitle = $mainTitle;
 20+ $this->mIndex = $index;
 21+ $this->mPropertyValuePairs = array();
 22+ }
 23+
 24+ public function addPropertyAndValue( $propName, $value ) {
 25+ // SMW 1.6+
 26+ if ( class_exists( 'SMWDIProperty' ) ) {
 27+ $property = SMWDIProperty::newFromUserLabel( $propName );
 28+ } else {
 29+ $property = SMWPropertyValue::makeUserProperty( $propName );
 30+ }
 31+ $dataValue = SMWDataValueFactory::newPropertyObjectValue( $property, $value );
 32+
 33+ if ( $dataValue->isValid() ) {
 34+ $this->mPropertyValuePairs[] = array( $property, $dataValue );
 35+ } // else - show an error message?
 36+ }
 37+
 38+ public function getPropertyValuePairs() {
 39+ return $this->mPropertyValuePairs;
 40+ }
 41+
 42+ public function getName() {
 43+ return $this->mMainTitle->getDBkey() . '#' . $this->mIndex;
 44+ }
 45+
 46+ public function getNamespace() {
 47+ return $this->mMainTitle->getNamespace();
 48+ }
 49+}
 50+
 51+/**
 52+ * Class for all database-related actions.
 53+ * This class exists mostly because SMWSQLStore2's functions makeSMWPageID()
 54+ * and makeSMWPropertyID(), which are needed for the DB access, are both
 55+ * protected, and thus can't be accessed externally.
 56+ */
 57+class SIOSQLStore extends SMWSQLStore2 {
 58+
 59+ static function deleteDataForPage( $subject ) {
 60+ $pageName = $subject->getDBKey();
 61+ $namespace = $subject->getNamespace();
 62+ $idsForDeletion = array();
 63+
 64+ // Get the set of IDs for internal objects to be deleted.
 65+ $iw = '';
 66+ $db = wfGetDB( DB_SLAVE );
 67+ $res = $db->select(
 68+ 'smw_ids',
 69+ array( 'smw_id' ),
 70+ 'smw_title LIKE ' . $db->addQuotes( $pageName . '#%' ) . ' AND ' . 'smw_namespace=' . $db->addQuotes( $namespace ) . ' AND smw_iw=' . $db->addQuotes( $iw ),
 71+ 'SIO::getSMWPageObjectIDs'
 72+ );
 73+
 74+ while ( $row = $db->fetchObject( $res ) ) {
 75+ $idsForDeletion[] = $row->smw_id;
 76+ }
 77+
 78+ if ( count( $idsForDeletion ) == 0 ) {
 79+ return;
 80+ }
 81+
 82+ // Now, do the deletion.
 83+ $db = wfGetDB( DB_MASTER );
 84+ $idsString = '(' . implode ( ', ', $idsForDeletion ) . ')';
 85+ $db->delete( 'smw_rels2', array( "(s_id IN $idsString) OR (o_id IN $idsString)" ), 'SIO::deleteRels2Data' );
 86+ $db->delete( 'smw_atts2', array( "s_id IN $idsString" ), 'SIO::deleteAtts2Data' );
 87+ $db->delete( 'smw_text2', array( "s_id IN $idsString" ), 'SIO::deleteText2Data' );
 88+ // Handle the sm_coords table only if the Semantic Maps
 89+ // extension is installed and uses sm_coords.
 90+ if ( defined( 'SM_VERSION' ) && version_compare( SM_VERSION, '0.6' ) >= 0 ) {
 91+ $db->delete( 'sm_coords', array( "s_id IN $idsString" ), 'SIO::deleteCoordsData' );
 92+ }
 93+ }
 94+
 95+ /**
 96+ * Returns the set of SQL values needed to insert the data for this
 97+ * internal object into the database.
 98+ */
 99+ function getStorageSQL( $internalObject ) {
 100+ if ( method_exists( 'SMWDIWikiPage', 'getSubobjectName' ) ) {
 101+ // SMW 1.6
 102+ $ioID = $this->makeSMWPageID( $internalObject->getName(), $internalObject->getNamespace(), '', '' );
 103+ } else {
 104+ $ioID = $this->makeSMWPageID( $internalObject->getName(), $internalObject->getNamespace(), '' );
 105+ }
 106+ $upRels2 = array();
 107+ $upAtts2 = array();
 108+ $upText2 = array();
 109+ $upCoords = array();
 110+ // set all the properties pointing from this internal object
 111+ foreach ( $internalObject->getPropertyValuePairs() as $propertyValuePair ) {
 112+ list( $property, $value ) = $propertyValuePair;
 113+
 114+ $tableid = SMWSQLStore2::findPropertyTableID( $property );
 115+ $isRelation = ( $tableid == 'smw_rels2' );
 116+ $isAttribute = ( $tableid == 'smw_atts2' );
 117+ $isText = ( $tableid == 'smw_text2' );
 118+ $isCoords = ( $tableid == 'smw_coords' );
 119+
 120+ if ( $isRelation ) {
 121+ if ( method_exists( 'SMWDIWikiPage', 'getSubobjectName' ) ) {
 122+ // SMW 1.6
 123+ $mainPageID = $this->makeSMWPageID( $value->getDBkey(), $value->getNamespace(), $value->getInterwiki(), '' );
 124+ } else {
 125+ $mainPageID = $this->makeSMWPageID( $value->getDBkey(), $value->getNamespace(), $value->getInterwiki() );
 126+ }
 127+ $upRels2[] = array(
 128+ 's_id' => $ioID,
 129+ 'p_id' => $this->makeSMWPropertyID( $property ),
 130+ 'o_id' => $mainPageID
 131+ );
 132+ } elseif ( $isAttribute ) {
 133+ if ( class_exists( 'SMWCompatibilityHelpers' ) ) {
 134+ // SMW 1.6
 135+ $dataItem = $value->getDataItem();
 136+ $keys = SMWCompatibilityHelpers::getDBkeysFromDataItem( $dataItem );
 137+ $valueNum = $dataItem->getSortKey();
 138+ } else {
 139+ $keys = $value->getDBkeys();
 140+ if ( method_exists( $value, 'getValueKey' ) ) {
 141+ $valueNum = $value->getValueKey();
 142+ } else {
 143+ $valueNum = $value->getNumericValue();
 144+ }
 145+ }
 146+
 147+ $upAttr = array(
 148+ 's_id' => $ioID,
 149+ 'p_id' => $this->makeSMWPropertyID( $property ),
 150+ 'value_xsd' => $keys[0],
 151+ 'value_num' => $valueNum
 152+ );
 153+
 154+ // 'value_unit' DB field was removed in SMW 1.6
 155+ if ( version_compare( SMW_VERSION, '1.6 alpha', '<' ) ) {
 156+ $upAttr['value_unit'] = $value->getUnit();
 157+ }
 158+
 159+ $upAtts2[] = $upAttr;
 160+ } elseif ( $isText ) {
 161+ if ( method_exists( $value, 'getShortWikiText' ) ) {
 162+ // SMW 1.6
 163+ $key = $value->getShortWikiText();
 164+ } else {
 165+ $keys = $value->getDBkeys();
 166+ $key = $keys[0];
 167+ }
 168+ $upText2[] = array(
 169+ 's_id' => $ioID,
 170+ 'p_id' => $this->makeSMWPropertyID( $property ),
 171+ 'value_blob' => $key
 172+ );
 173+ } elseif ( $isCoords ) {
 174+ $keys = $value->getDBkeys();
 175+ $upCoords[] = array(
 176+ 's_id' => $ioID,
 177+ 'p_id' => $this->makeSMWPropertyID( $property ),
 178+ 'lat' => $keys[0],
 179+ 'lon' => $keys[1],
 180+ );
 181+ }
 182+ }
 183+
 184+ return array( $upRels2, $upAtts2, $upText2, $upCoords );
 185+ }
 186+
 187+ static function createRDF( $title, $rdfDataArray, $fullexport = true, $backlinks = false ) {
 188+ // if it's not a full export, don't add internal object data
 189+ if ( !$fullexport ) {
 190+ return true;
 191+ }
 192+
 193+ $pageName = $title->getDBkey();
 194+ $namespace = $title->getNamespace();
 195+
 196+ // Go through all SIOs for the current page, create RDF for
 197+ // each one, and add it to the general array.
 198+ $iw = '';
 199+ $db = wfGetDB( DB_SLAVE );
 200+ $res = $db->select(
 201+ 'smw_ids',
 202+ array( 'smw_id', 'smw_namespace', 'smw_title' ),
 203+ 'smw_title LIKE ' . $db->addQuotes( $pageName . '#%' ) . ' AND ' . 'smw_namespace=' . $db->addQuotes( $namespace ) . ' AND smw_iw=' . $db->addQuotes( $iw ),
 204+ 'SIO::getSMWPageObjectIDs'
 205+ );
 206+
 207+ while ( $row = $db->fetchObject( $res ) ) {
 208+ $value = new SIOInternalObjectValue( $row->smw_title, intval( $row->smw_namespace ) );
 209+ if ( class_exists( 'SMWSqlStubSemanticData' ) ) {
 210+ // SMW >= 1.6
 211+ $semdata = new SMWSqlStubSemanticData( $value, false );
 212+ } else {
 213+ $semdata = new SMWSemanticData( $value, false );
 214+ }
 215+ $propertyTables = SMWSQLStore2::getPropertyTables();
 216+ foreach ( $propertyTables as $tableName => $propertyTable ) {
 217+ $data = smwfGetStore()->fetchSemanticData( $row->smw_id, null, $propertyTable );
 218+ foreach ( $data as $d ) {
 219+ $semdata->addPropertyStubValue( reset( $d ), end( $d ) );
 220+ }
 221+ }
 222+
 223+ $rdfDataArray[] = SMWExporter::makeExportData( $semdata, null );
 224+ }
 225+
 226+ return true;
 227+ }
 228+}
 229+
 230+/**
 231+ * Class for hook functions for creating and storing information
 232+ */
 233+class SIOHandler {
 234+
 235+ static $mCurPageFullName = '';
 236+ static $mInternalObjectIndex = 1;
 237+ static $mInternalObjects = array();
 238+ static $mHandledPages = array();
 239+
 240+ /**
 241+ * Called with the 'ParserClearState' hook, when more than one page
 242+ * is parsed in a single action.
 243+ */
 244+ public static function clearState( &$parser ) {
 245+ // For some reason, the #set_internal calls on a page are
 246+ // sometimes called twice (or more?). Ideally, there would
 247+ // be a way to prevent that, but until then, we use the
 248+ // $mHandledPages array to store pages whose internal objects
 249+ // have already been created - if doSetInternal() is called
 250+ // on a page whose name is already is in this array, the
 251+ // page is ignored.
 252+ if ( ! empty( self::$mCurPageFullName ) ) {
 253+ self::$mHandledPages[] = self::$mCurPageFullName;
 254+ }
 255+
 256+ self::$mCurPageFullName = '';
 257+ self::$mInternalObjectIndex = 1;
 258+
 259+ return true;
 260+ }
 261+
 262+ /**
 263+ * Handle the #set_internal parser function.
 264+ */
 265+ public static function doSetInternal( &$parser ) {
 266+ $title = $parser->getTitle();
 267+ $mainPageFullName = $title->getText();
 268+ if ( ( $nsText = $title->getNsText() ) != '' ) {
 269+ $mainPageFullName = $nsText . ':' . $mainPageFullName;
 270+ }
 271+
 272+ if ( in_array( $mainPageFullName, self::$mHandledPages ) ) {
 273+ // The #set_internal calls for this page have already
 274+ // been processed! Skip it.
 275+ return;
 276+ }
 277+
 278+ if ( $mainPageFullName == self::$mCurPageFullName ) {
 279+ self::$mInternalObjectIndex++;
 280+ } else {
 281+ self::$mCurPageFullName = $mainPageFullName;
 282+ self::$mInternalObjectIndex = 1;
 283+ }
 284+
 285+ $curObjectNum = self::$mInternalObjectIndex;
 286+ $params = func_get_args();
 287+ array_shift( $params ); // we already know the $parser...
 288+ $internalObject = new SIOInternalObject( $title, $curObjectNum );
 289+ $objToPagePropName = array_shift( $params );
 290+ $internalObject->addPropertyAndValue( $objToPagePropName, self::$mCurPageFullName );
 291+
 292+ foreach ( $params as $param ) {
 293+ $parts = explode( '=', trim( $param ), 2 );
 294+
 295+ if ( count( $parts ) == 2 ) {
 296+ $key = $parts[0];
 297+ $value = $parts[1];
 298+ // if the property name ends with '#list', it's
 299+ // a comma-delimited group of values
 300+ if ( substr( $key, - 5 ) == '#list' ) {
 301+ $key = substr( $key, 0, strlen( $key ) - 5 );
 302+ $listValues = explode( ',', $value );
 303+
 304+ foreach ( $listValues as $listValue ) {
 305+ $internalObject->addPropertyAndValue( $key, trim( $listValue ) );
 306+ }
 307+ } else {
 308+ $internalObject->addPropertyAndValue( $key, $value );
 309+ }
 310+ }
 311+ }
 312+
 313+ self::$mInternalObjects[] = $internalObject;
 314+ }
 315+
 316+ /**
 317+ * Handle the #set_internal_recurring_event parser function.
 318+ */
 319+ public static function doSetInternalRecurringEvent( &$parser ) {
 320+ $params = func_get_args();
 321+ array_shift( $params ); // We already know the $parser ...
 322+
 323+ // First param should be a standalone property name.
 324+ $objToPagePropName = array_shift( $params );
 325+
 326+ // The location of this function changed in SMW 1.5.3
 327+ if ( class_exists( 'SMWSetRecurringEvent' ) ) {
 328+ $results = SMWSetRecurringEvent::getDatesForRecurringEvent( $params );
 329+ } else {
 330+ $results = SMWParserExtensions::getDatesForRecurringEvent( $params );
 331+ }
 332+
 333+ if ( $results == null ) {
 334+ return null;
 335+ }
 336+
 337+ list( $property, $all_date_strings, $unused_params ) = $results;
 338+
 339+ // Mimic a call to #set_internal for each date.
 340+ foreach ( $all_date_strings as $date_string ) {
 341+ $first_params = array(
 342+ $parser,
 343+ $objToPagePropName,
 344+ "$property=$date_string"
 345+ );
 346+
 347+ $cur_params = array_merge( $first_params, $unused_params );
 348+ call_user_func_array( 'SIOHandler::doSetInternal', $cur_params );
 349+ }
 350+ }
 351+
 352+ /**
 353+ * Called when a page is deleted.
 354+ */
 355+ public static function deleteData( $sqlStore, $subject ) {
 356+ SIOSQLStore::deleteDataForPage( $subject );
 357+ return true;
 358+ }
 359+
 360+ /**
 361+ * Called when a page's semantic data is updated - either it's been
 362+ * modified, or one of its templates has been modified, or an SMW
 363+ * "refresh data" action has been called.
 364+ */
 365+ public static function updateData( $sqlStore, $data ) {
 366+ $sioSQLStore = new SIOSQLStore();
 367+ // Find all "pages" in the SMW IDs table that are internal
 368+ // objects for this page, and delete their properties from
 369+ // the SMW tables.
 370+ // Then save the current contents of the $mInternalObjects
 371+ // array.
 372+ $subject = $data->getSubject();
 373+ SIOSQLStore::deleteDataForPage( $subject );
 374+
 375+ $allRels2Inserts = array();
 376+ $allAtts2Inserts = array();
 377+ $allText2Inserts = array();
 378+ $allCoordsInserts = array();
 379+
 380+ foreach ( self::$mInternalObjects as $internalObject ) {
 381+ list( $upRels2, $upAtts2, $upText2, $upCoords ) = $sioSQLStore->getStorageSQL( $internalObject );
 382+ $allRels2Inserts = array_merge( $allRels2Inserts, $upRels2 );
 383+ $allAtts2Inserts = array_merge( $allAtts2Inserts, $upAtts2 );
 384+ $allText2Inserts = array_merge( $allText2Inserts, $upText2 );
 385+ $allCoordsInserts = array_merge( $allCoordsInserts, $upCoords );
 386+ wfRunHooks( 'SIOHandler::updateData', array( $internalObject ) );
 387+ }
 388+
 389+ // now save everything to the database, in a single transaction
 390+ $db = wfGetDB( DB_MASTER );
 391+ $db->begin( 'SIO::updatePageData' );
 392+
 393+ if ( count( $allRels2Inserts ) > 0 ) {
 394+ $db->insert( 'smw_rels2', $allRels2Inserts, 'SIO::updateRels2Data' );
 395+ }
 396+ if ( count( $allAtts2Inserts ) > 0 ) {
 397+ $db->insert( 'smw_atts2', $allAtts2Inserts, 'SIO::updateAtts2Data' );
 398+ }
 399+ if ( count( $allText2Inserts ) > 0 ) {
 400+ $db->insert( 'smw_text2', $allText2Inserts, 'SIO::updateText2Data' );
 401+ }
 402+ if ( count( $allCoordsInserts ) > 0 ) {
 403+ $db->insert( 'sm_coords', $allCoordsInserts, 'SIO::updateCoordsData' );
 404+ }
 405+
 406+ // end transaction
 407+ $db->commit( 'SIO::updatePageData' );
 408+ self::$mInternalObjects = array();
 409+
 410+ return true;
 411+ }
 412+
 413+ /**
 414+ * Called after a page is moved - renames all the internal objects
 415+ * named "Old page#x" to "New page#x".
 416+ */
 417+ static public function handlePageMove( &$old_title, &$new_title, &$user, $page_id, $redir_id ) {
 418+ $oldPageName = $old_title->getDBkey();
 419+ $oldNamespace = $old_title->getNamespace();
 420+ $newPageName = $new_title->getDBkey();
 421+ $newNamespace = $new_title->getNamespace();
 422+ $iw = '';
 423+ $sioNames = array();
 424+ $db = wfGetDB( DB_SLAVE );
 425+ // Unfortunately, there's no foolproof way to do the replacement
 426+ // with a single SQL call, using regexps and wildcards -
 427+ // instead, we first get the set of all matching entries in
 428+ // the 'smw_ids' table, then call an explicit update on each
 429+ // one.
 430+ $res = $db->select(
 431+ 'smw_ids',
 432+ array( 'smw_title' ),
 433+ 'smw_title LIKE ' . $db->addQuotes( $oldPageName . '#%' ) . ' AND ' . 'smw_namespace=' . $db->addQuotes( $oldNamespace ) . ' AND smw_iw=' . $db->addQuotes( $iw ),
 434+ 'SIO::getTitlesForPageMove'
 435+ );
 436+
 437+ while ( $row = $db->fetchObject( $res ) ) {
 438+ $sioNames[] = $row->smw_title;
 439+ }
 440+
 441+ foreach ( $sioNames as $sioName ) {
 442+ // update the name, and possibly the namespace as well
 443+ $newSIOName = str_replace( $oldPageName, $newPageName, $sioName );
 444+ $db->update(
 445+ 'smw_ids',
 446+ array( 'smw_title' => $newSIOName, 'smw_namespace' => $newNamespace ),
 447+ array( 'smw_title' => $sioName, 'smw_namespace' => $oldNamespace ),
 448+ 'SIO::updateTitlesForPageMove'
 449+ );
 450+ }
 451+
 452+ return true;
 453+ }
 454+
 455+ /**
 456+ * Takes a set of SMW "update jobs", and keeps only the unique, actual
 457+ * titles among them - this is useful if there are any internal objects
 458+ * among the group; a set of names like "Page name#1", "Page name#2"
 459+ * etc. should be turned into just "Page name".
 460+ */
 461+ static function handleUpdatingOfInternalObjects( &$jobs ) {
 462+ $uniqueTitles = array();
 463+
 464+ foreach ( $jobs as $i => $job ) {
 465+ $title = Title::makeTitleSafe( $job->title->getNamespace(), $job->title->getText() );
 466+ $id = $title->getArticleID();
 467+ $uniqueTitles[$id] = $title;
 468+ }
 469+
 470+ $jobs = array();
 471+
 472+ foreach ( $uniqueTitles as $id => $title ) {
 473+ $jobs[] = new SMWUpdateJob( $title );
 474+ }
 475+
 476+ return true;
 477+ }
 478+
 479+ /**
 480+ * Takes a set of SMW "update jobs" generated by refresh data and removes
 481+ * any job with a fragment (in other words a job trying to update a SIO object)
 482+ * We aren't guaranteed that all the jobs related to a single page using SIO
 483+ * will be in a single one of these batches so we remove everything updating
 484+ * a SIO object instead of filtering them down to unique titles.
 485+ */
 486+ static function handleRefreshingOfInternalObjects( &$jobs ) {
 487+ $allJobs = $jobs;
 488+ $jobs = array();
 489+
 490+ foreach ( $allJobs as $job ) {
 491+ if ( strpos( $job->title->getText(), '#' ) === false ) {
 492+ $jobs[] = $job;
 493+ }
 494+ }
 495+
 496+ return true;
 497+ }
 498+
 499+}
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects_body.php
___________________________________________________________________
Added: svn:eol-style
1500 + native
Index: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.i18n.php
@@ -0,0 +1,335 @@
 2+<?php
 3+/**
 4+ * Internationalization file for Semantic Internal Objects
 5+ *
 6+ * @file
 7+ * @ingroup Language
 8+ * @ingroup I18n
 9+ * @ingroup SemanticInternalObjects
 10+ */
 11+
 12+// FIXME: Can be enabled when new style magic words are used (introduced in r52503)
 13+// require_once( dirname( __FILE__ ) . '/SemanticInternalObjects.i18n.magic.php' );
 14+
 15+$messages = array();
 16+
 17+/** English
 18+ * @author Yaron Koren
 19+ */
 20+$messages['en'] = array(
 21+ 'semanticinternalobjects-desc' => 'Setting of internal objects in Semantic MediaWiki',
 22+ 'semanticinternalobjects-internalproperty' => 'Internal property',
 23+);
 24+
 25+/** Message documentation (Message documentation)
 26+ * @author Yaron Koren
 27+ */
 28+$messages['qqq'] = array(
 29+ 'semanticinternalobjects-desc' => '{{desc}}',
 30+ 'semanticinternalobjects-internalproperty' => 'A semantic property stored internally in the page'
 31+);
 32+
 33+/** Gheg Albanian (Gegë)
 34+ * @author Mdupont
 35+ */
 36+$messages['aln'] = array(
 37+ 'semanticinternalobjects-desc' => 'Vendosja e objekteve të brendshëm në Semantic MediaWiki',
 38+);
 39+
 40+/** Arabic (العربية)
 41+ * @author Meno25
 42+ */
 43+$messages['ar'] = array(
 44+ 'semanticinternalobjects-desc' => 'ضبط الأشياء الداخلية في ميدياويكي الدلالي',
 45+);
 46+
 47+/** Belarusian (Taraškievica orthography) (‪Беларуская (тарашкевіца)‬)
 48+ * @author EugeneZelenko
 49+ * @author Zedlik
 50+ */
 51+$messages['be-tarask'] = array(
 52+ 'semanticinternalobjects-desc' => "Налады ўнутраных аб'ектаў у Semantic MediaWiki",
 53+);
 54+
 55+/** Breton (Brezhoneg)
 56+ * @author Fulup
 57+ */
 58+$messages['br'] = array(
 59+ 'semanticinternalobjects-desc' => 'Kefluniadur traezoù diabarzh e Semanctic MediaWiki',
 60+);
 61+
 62+/** Bosnian (Bosanski)
 63+ * @author CERminator
 64+ */
 65+$messages['bs'] = array(
 66+ 'semanticinternalobjects-desc' => 'Postavljanje unutrašnjih objekata u Semantic MediaWiki',
 67+);
 68+
 69+/** Catalan (Català)
 70+ * @author Toniher
 71+ */
 72+$messages['ca'] = array(
 73+ 'semanticinternalobjects-desc' => "Definició d'objectes interns en el Semantic MediaWiki",
 74+);
 75+
 76+/** German (Deutsch)
 77+ * @author Imre
 78+ * @author Kghbln
 79+ */
 80+$messages['de'] = array(
 81+ 'semanticinternalobjects-desc' => 'Ermöglicht das Definieren interner semantischer Datenobjekte',
 82+ 'semanticinternalobjects-internalproperty' => 'Internes Attribut',
 83+);
 84+
 85+/** Lower Sorbian (Dolnoserbski)
 86+ * @author Michawiki
 87+ */
 88+$messages['dsb'] = array(
 89+ 'semanticinternalobjects-desc' => 'Nastajenje internych objektow w Semantic MediaWiki',
 90+);
 91+
 92+/** Greek (Ελληνικά)
 93+ * @author Omnipaedista
 94+ */
 95+$messages['el'] = array(
 96+ 'semanticinternalobjects-desc' => 'Ρυθμίσεις εσωτερικών αντικειμένων στη Σημασιολογική MediaWiki',
 97+);
 98+
 99+/** Spanish (Español)
 100+ * @author Crazymadlover
 101+ */
 102+$messages['es'] = array(
 103+ 'semanticinternalobjects-desc' => 'Configuración de objetos internos en Semantic MediaWiki',
 104+);
 105+
 106+/** Finnish (Suomi)
 107+ * @author Centerlink
 108+ * @author Crt
 109+ */
 110+$messages['fi'] = array(
 111+ 'semanticinternalobjects-desc' => 'Sisäisten objektien asetukset semanttisessa MediaWikissä.',
 112+);
 113+
 114+/** French (Français)
 115+ * @author Crochet.david
 116+ * @author Gomoko
 117+ */
 118+$messages['fr'] = array(
 119+ 'semanticinternalobjects-desc' => 'Réglage des objets internes dans Semantic MediaWiki',
 120+ 'semanticinternalobjects-internalproperty' => 'Propriété interne',
 121+);
 122+
 123+/** Galician (Galego)
 124+ * @author Toliño
 125+ */
 126+$messages['gl'] = array(
 127+ 'semanticinternalobjects-desc' => 'Configuracións de obxectos internos en Semantic MediaWiki',
 128+ 'semanticinternalobjects-internalproperty' => 'Propiedade interna',
 129+);
 130+
 131+/** Swiss German (Alemannisch)
 132+ * @author Als-Holder
 133+ */
 134+$messages['gsw'] = array(
 135+ 'semanticinternalobjects-desc' => 'Intärni Objäkt in Semantic MediaWiki yysetze',
 136+);
 137+
 138+/** Hebrew (עברית)
 139+ * @author Rotemliss
 140+ * @author YaronSh
 141+ */
 142+$messages['he'] = array(
 143+ 'semanticinternalobjects-desc' => 'הגדרות העצמים הפנימיים במדיה־ויקי הסמנטי',
 144+);
 145+
 146+/** Hiligaynon (Ilonggo)
 147+ * @author Tagimata
 148+ */
 149+$messages['hil'] = array(
 150+ 'semanticinternalobjects-desc' => 'Pagplastar sang internal na mga bagay sa Semantik MedyaWiki',
 151+);
 152+
 153+/** Upper Sorbian (Hornjoserbsce)
 154+ * @author Michawiki
 155+ */
 156+$messages['hsb'] = array(
 157+ 'semanticinternalobjects-desc' => 'Nastajenje internych objektow w Semantic MediaWiki',
 158+);
 159+
 160+/** Hungarian (Magyar)
 161+ * @author Glanthor Reviol
 162+ */
 163+$messages['hu'] = array(
 164+ 'semanticinternalobjects-desc' => 'Belső objektumok beállítása a szemantikus MediaWikiben',
 165+);
 166+
 167+/** Interlingua (Interlingua)
 168+ * @author McDutchie
 169+ */
 170+$messages['ia'] = array(
 171+ 'semanticinternalobjects-desc' => 'Configuration de objectos interne in Semantic MediaWiki',
 172+);
 173+
 174+/** Indonesian (Bahasa Indonesia)
 175+ * @author Bennylin
 176+ */
 177+$messages['id'] = array(
 178+ 'semanticinternalobjects-desc' => 'Seting untuk objek internal pada Semantic MediaWiki',
 179+);
 180+
 181+/** Italian (Italiano)
 182+ * @author Gianfranco
 183+ */
 184+$messages['it'] = array(
 185+ 'semanticinternalobjects-desc' => 'Configurazione degli oggetti interni in Semantic MediaWiki',
 186+);
 187+
 188+/** Japanese (日本語)
 189+ * @author Fryed-peach
 190+ */
 191+$messages['ja'] = array(
 192+ 'semanticinternalobjects-desc' => 'Semantic MediaWiki の内部オブジェクトの設定',
 193+);
 194+
 195+/** Colognian (Ripoarisch)
 196+ * @author Purodha
 197+ */
 198+$messages['ksh'] = array(
 199+ 'semanticinternalobjects-desc' => 'De ennere Objäkte vum Semantesch MedijaWiki enschtälle.',
 200+);
 201+
 202+/** Luxembourgish (Lëtzebuergesch)
 203+ * @author Robby
 204+ */
 205+$messages['lb'] = array(
 206+ 'semanticinternalobjects-desc' => 'Astellung vun internen Objeten a Semantic MediaWiki',
 207+);
 208+
 209+/** Macedonian (Македонски)
 210+ * @author Bjankuloski06
 211+ */
 212+$messages['mk'] = array(
 213+ 'semanticinternalobjects-desc' => 'Задавање на внатрешни објекти во Семантички МедијаВики',
 214+ 'semanticinternalobjects-internalproperty' => 'Внатрешно својство',
 215+);
 216+
 217+/** Malay (Bahasa Melayu)
 218+ * @author Anakmalaysia
 219+ */
 220+$messages['ms'] = array(
 221+ 'semanticinternalobjects-desc' => 'Penetapan objek dalaman di Semantic MediaWiki',
 222+);
 223+
 224+/** Dutch (Nederlands)
 225+ * @author Siebrand
 226+ */
 227+$messages['nl'] = array(
 228+ 'semanticinternalobjects-desc' => 'Interne objecten in Semantic MediaWiki instellen',
 229+);
 230+
 231+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 232+ * @author Nghtwlkr
 233+ */
 234+$messages['no'] = array(
 235+ 'semanticinternalobjects-desc' => 'Innstilling for interne objekt i Semantic MediaWiki',
 236+);
 237+
 238+/** Occitan (Occitan)
 239+ * @author Cedric31
 240+ */
 241+$messages['oc'] = array(
 242+ 'semanticinternalobjects-desc' => 'Reglatge dels objèctes intèrnes dins Semantic MediaWiki',
 243+);
 244+
 245+/** Polish (Polski)
 246+ * @author Sp5uhe
 247+ */
 248+$messages['pl'] = array(
 249+ 'semanticinternalobjects-desc' => 'Ustawianie wewnętrznych obiektów Semantic MediaWiki.',
 250+);
 251+
 252+/** Piedmontese (Piemontèis)
 253+ * @author Dragonòt
 254+ */
 255+$messages['pms'] = array(
 256+ 'semanticinternalobjects-desc' => "Ampostassion d'oget intern an drinta a Semantic MediaWiki",
 257+);
 258+
 259+/** Portuguese (Português)
 260+ * @author Hamilton Abreu
 261+ * @author Indech
 262+ */
 263+$messages['pt'] = array(
 264+ 'semanticinternalobjects-desc' => 'Configuração de objetos internos no MediaWiki Semântico',
 265+);
 266+
 267+/** Brazilian Portuguese (Português do Brasil)
 268+ * @author Eduardo.mps
 269+ */
 270+$messages['pt-br'] = array(
 271+ 'semanticinternalobjects-desc' => 'Definição de objetos internos no Semantic MediaWiki',
 272+);
 273+
 274+/** Tarandíne (Tarandíne)
 275+ * @author Joetaras
 276+ */
 277+$messages['roa-tara'] = array(
 278+ 'semanticinternalobjects-desc' => "'Mboste le oggette inderne jndr'à MediaUicchi Semandiche",
 279+);
 280+
 281+/** Russian (Русский)
 282+ * @author Александр Сигачёв
 283+ */
 284+$messages['ru'] = array(
 285+ 'semanticinternalobjects-desc' => 'Установка внутренних объектов в Semantic MediaWiki',
 286+);
 287+
 288+/** Slovak (Slovenčina)
 289+ * @author Helix84
 290+ */
 291+$messages['sk'] = array(
 292+ 'semanticinternalobjects-desc' => 'Nastavenie vnútorných objektov v Semantic MediaWiki',
 293+);
 294+
 295+/** Slovenian (Slovenščina)
 296+ * @author Lesko987
 297+ */
 298+$messages['sl'] = array(
 299+ 'semanticinternalobjects-desc' => 'Nastavitev internih predmetov v Semantic MediaWiki',
 300+);
 301+
 302+/** Swedish (Svenska)
 303+ * @author Per
 304+ */
 305+$messages['sv'] = array(
 306+ 'semanticinternalobjects-desc' => 'Inställning för interna objekt i Semantic MediaWiki',
 307+);
 308+
 309+/** Tagalog (Tagalog)
 310+ * @author AnakngAraw
 311+ */
 312+$messages['tl'] = array(
 313+ 'semanticinternalobjects-desc' => 'Pagtatakda ng panloob na mga bagay sa Semantic MediaWiki',
 314+);
 315+
 316+/** Turkish (Türkçe)
 317+ * @author Vito Genovese
 318+ */
 319+$messages['tr'] = array(
 320+ 'semanticinternalobjects-desc' => "Anlamsal MediaWiki'deki iç nesnelerin ayarlanması",
 321+);
 322+
 323+/** Vietnamese (Tiếng Việt)
 324+ * @author Minh Nguyen
 325+ */
 326+$messages['vi'] = array(
 327+ 'semanticinternalobjects-desc' => 'Thiết kế các đối tượng nội bộ trong Semantic MediaWiki',
 328+);
 329+
 330+/** Simplified Chinese (‪中文(简体)‬)
 331+ * @author Liangent
 332+ */
 333+$messages['zh-hans'] = array(
 334+ 'semanticinternalobjects-desc' => '在语义MediaWiki中设置内部对象',
 335+);
 336+
Property changes on: tags/extensions/SemanticInternalObjects/REL_0_6_7/SemanticInternalObjects.i18n.php
___________________________________________________________________
Added: svn:eol-style
1337 + native