Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Implement editing schema in multiple languages | mediawiki/extensions/WikibaseSchema | master | +177 -28 |
Details
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Lydia_Pintscher | T215387 [Story] support different languages for identifying information | |||
Resolved | Lydia_Pintscher | T216145 Edit schemas in multiple languages | |||
Resolved | noarave | T215392 Add Special:SetSchemaLabelDescriptionAliases page | |||
Resolved | Michael | T217313 Add a SchemaWriter method to allow just updating the namebadge of a Schema |
Event Timeline
Comment Actions
Parking this here, this or something like this should be added to MediaWikiRevisionSchemaWriterTest when implementing this ticket.
public function testUpdateMultiLingualSchemaNameBadgeSuccess() { $id = 'O1'; $language = 'en'; $englishLabel = 'Goat'; $englishDescription = 'This is what a goat looks like'; $englishAliases = [ 'Capra' ]; $existingContent = new WikibaseSchemaContent( json_encode( [ 'id' => $id, 'serializationVersion' => '2.0', 'labels' => [ 'en' => 'Cat', 'de' => 'Ziege', ], 'descriptions' => [ 'en' => 'This is what a cat looks like', 'de' => 'Wichtigste Eigenschaften einer Ziege' ], 'aliases' => [ 'en' => [ 'Tiger', 'Lion' ], 'de' => [ 'Capra', 'Hausziege' ] ], 'schema' => '# some schema about goats', 'type' => 'ShExC', ] ) ); $expectedContent = new WikibaseSchemaContent( json_encode( [ 'id' => $id, 'serializationVersion' => '2.0', 'labels' => [ 'en' => $englishLabel, 'de' => 'Ziege', ], 'descriptions' => [ 'en' => $englishDescription, 'de' => 'Wichtigste Eigenschaften einer Ziege' ], 'aliases' => [ 'en' => $englishAliases, 'de' => [ 'Capra', 'Hausziege' ] ], 'schema' => '# some schema about goats', 'type' => 'ShExC', ] ) ); $pageUpdaterFactory = $this ->getPageUpdaterFactoryProvidingAndExpectingContent( $expectedContent, $existingContent ); $writer = new MediaWikiRevisionSchemaWriter( $pageUpdaterFactory, $this->getMessageLocalizer(), $this->getMockWatchlistUpdater( 'optionallyWatchEditedSchema' ) ); $writer->updateSchemaNameBadge( new SchemaId( $id ), $language, $englishLabel, $englishDescription, $englishAliases ); }
Comment Actions
Change 495852 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseSchema@master] Implement editing schema in multiple languages
Comment Actions
Possible improvements to what is currently being worked on:
- Back to "item/language selection"-Button on second form
- Add simple autocomplete for the language selection field (I would suggest using <datalist>)
- Show page title in the notice of the second form in the interface language instead of the edited language
- Rename text on first form submit button to "Next" or something similar
I ordered them to how useful I think they might be. But they should be implemented in new stories.
CC @Lydia_Pintscher
Comment Actions
Change 495852 merged by jenkins-bot:
[mediawiki/extensions/WikibaseSchema@master] Implement editing schema in multiple languages
Comment Actions
Moving this back to Doing as this seems to not be done yet (also the full scope is somewhat unclear).