jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/365032 )
Change subject: Populate "Ask out" (modeling 1) Lexeme for demo system
......................................................................
Populate "Ask out" (modeling 1) Lexeme for demo system
Bug: T168373
Change-Id: I45f501f19a12439c3e814576394692dd9348a730
---
M src/Content/LexemeContent.php
A src/DemoData/AskOut1Populator.php
2 files changed, 27 insertions(+), 0 deletions(-)
Approvals:
WMDE-leszek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/Content/LexemeContent.php b/src/Content/LexemeContent.php
index d2e0605..c6c3af3 100644
--- a/src/Content/LexemeContent.php
+++ b/src/Content/LexemeContent.php
@@ -60,6 +60,8 @@
( new DemoData\HardLexemePopulator() )->populate(
$lexeme );
} elseif ( $id === DemoData\Id::L_LEITER ) {
( new DemoData\LeiterLexemePopulator() )->populate(
$lexeme );
+ } elseif ( $id === DemoData\Id::L_ASK_1 ) {
+ ( new DemoData\AskOut1Populator() )->populate( $lexeme
);
} else {
( new DemoData\DefaultPopulator() )->populate( $lexeme
);
}
diff --git a/src/DemoData/AskOut1Populator.php
b/src/DemoData/AskOut1Populator.php
new file mode 100644
index 0000000..15ab63b
--- /dev/null
+++ b/src/DemoData/AskOut1Populator.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Wikibase\Lexeme\DemoData;
+
+use Wikibase\Lexeme\DataModel\Lexeme;
+use Wikibase\Lexeme\Tests\DataModel\NewSense;
+
+class AskOut1Populator {
+
+ public function populate( Lexeme $lexeme ) {
+ $defaultSense = $this->buildDefaultSense();
+
+ $lexeme->setSenses( [ $defaultSense ] );
+ }
+
+ /**
+ * @return \Wikibase\Lexeme\DataModel\Sense
+ */
+ private function buildDefaultSense() {
+ return NewSense::havingId( 'S5' )
+ ->withGloss( 'en', 'To ask somebody out’: To request a
romantic date' )
+ ->build();
+ }
+
+}
--
To view, visit https://gerrit.wikimedia.org/r/365032
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I45f501f19a12439c3e814576394692dd9348a730
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits