WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365223 )

Change subject: Fix demo page populators
......................................................................

Fix demo page populators

Use item ids in item reference statements.
Set random GUID for statements, so they don't render in edit mode.

Change-Id: Ia276256e122a27eebca4a3c5887ead00ab4f6f1a
---
M src/DemoData/HardLexemePopulator.php
M src/DemoData/LeiterLexemePopulator.php
2 files changed, 18 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseLexeme 
refs/changes/23/365223/1

diff --git a/src/DemoData/HardLexemePopulator.php 
b/src/DemoData/HardLexemePopulator.php
index c294c11..19d81f5 100644
--- a/src/DemoData/HardLexemePopulator.php
+++ b/src/DemoData/HardLexemePopulator.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lexeme\DemoData;
 
+use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Lexeme\DataModel\Lexeme;
 use Wikibase\Lexeme\Tests\DataModel\NewForm;
 use Wikibase\Lexeme\Tests\DataModel\NewSense;
@@ -30,12 +31,15 @@
                        ->andStatement(
                                NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
                                        ->withValue( '/hɑːd/' )
+                                       ->withSomeGuid()
                        )->andStatement(
                                NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
                                        ->withValue( '/hɑɹd/' )
+                                       ->withSomeGuid()
                        )->andStatement(
                                NewStatement::forProperty( 
Id::P_PRONUNCIATION_AUDIO )
                                        ->withValue( 'hard.ogg' )
+                                       ->withSomeGuid()
                        )->build();
        }
 
@@ -59,14 +63,17 @@
 //                     ->withStatement(
 //                             NewStatement::forProperty(Id::P_SYNONYM_OF)
 //                             ->withValue(Id::___difficult)
+//                             ->withSomeGuid()
 //                     )
                        ->withStatement(
                                NewStatement::forProperty( Id::P_REGISTER )
-                                       ->withValue( Id::Q_COLLOQUIALISM )
+                                       ->withValue( new ItemId( 
Id::Q_COLLOQUIALISM ) )
+                                       ->withSomeGuid()
                        )
 //                     ->withStatement(
 //                             NewStatement::forProperty(Id::P_Translation)
 //                             ->withValue(Id::S_schwierig)
+//                             ->withSomeGuid()
 //                     )
                        ->build();
        }
@@ -81,22 +88,27 @@
 //                     ->withStatement(
 //                             NewStatement::forProperty(Id::P_SYNONYM_OF)
 //                             ->withValue(Id::___difficult)
+//                             ->withSomeGuid()
 //                     )
                        ->withStatement(
                                NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-                                       ->withValue( Id::Q_ELASTICITY )
+                                       ->withValue( new ItemId( 
Id::Q_ELASTICITY ) )
+                                       ->withSomeGuid()
                        )
                        ->withStatement(
                                NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-                                       ->withValue( Id::Q_DUCTILITY )
+                                       ->withValue( new ItemId( 
Id::Q_DUCTILITY ) )
+                                       ->withSomeGuid()
                        )
                        ->withStatement(
                                NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-                                       ->withValue( Id::Q_HARDNESS )
+                                       ->withValue( new ItemId( Id::Q_HARDNESS 
) )
+                                       ->withSomeGuid()
                        )
 //                     ->withStatement(
 //                             NewStatement::forProperty(Id::P_Translation)
 //                             ->withValue(Id::S_schwierig)
+//                             ->withSomeGuid()
 //                     )
                        ->build();
        }
diff --git a/src/DemoData/LeiterLexemePopulator.php 
b/src/DemoData/LeiterLexemePopulator.php
index f0447db..923dadb 100644
--- a/src/DemoData/LeiterLexemePopulator.php
+++ b/src/DemoData/LeiterLexemePopulator.php
@@ -32,9 +32,11 @@
                        ->andStatement(
                                NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
                                        ->withValue( '/.../' )
+                                       ->withSomeGuid()
                        )->andStatement(
                                NewStatement::forProperty( 
Id::P_SYLLABIFICATION )
                                        ->withValue( 'Lei-ter' )
+                                       ->withSomeGuid()
                        )->build();
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/365223
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia276256e122a27eebca4a3c5887ead00ab4f6f1a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek <leszek.mani...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to