Create formatters for displaying a form as a statement value
Open, NormalPublic

Description

The text formatter should:

  • display the representation of the form.
  • If the representation has multiple variants, it should display all of them, separated with a translatable separator (for English forward slash).

The HTML formatter should:

  • display the link, with its text being the representation of the form, and the link target leading to the appropriate form section of the relevant lexeme page.
  • As in the case of the text formatter, if the representation has multiple variants, it should display all of them, separated with a translatable separator (for English forward slash).
WMDE-leszek triaged this task as Normal priority.
WMDE-leszek renamed this task from Create a formatter for displaying a form as a statement value to Create formatters for displaying a form as a statement value.Wed, Apr 11, 4:54 PM
Pablo-WMDE added a subscriber: Pablo-WMDE.EditedWed, Apr 18, 11:23 AM

Has to work with and without $wgArticlePath.

mw.Title.newFromText('Lexeme:L2-F1').getUrl();
// "/mediawiki/index.php?title=Lexeme:L2-F1"
mw.Title.newFromText('Lexeme:L2#F1').getUrl();
// "/mediawiki/index.php?title=Lexeme:L2#F1"

?

Addshore claimed this task.
Restricted Application added a project: User-Addshore. · View Herald TranscriptWed, Apr 18, 2:40 PM
Addshore updated the task description. (Show Details)Wed, Apr 18, 3:09 PM
Addshore moved this task from Backlog to In Progress on the User-Addshore board.

Change 427655 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Factor out NonExistingEntityIdHtmlFormatter

https://gerrit.wikimedia.org/r/427655

Change 427409 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] WIP DNM FormId formatters

https://gerrit.wikimedia.org/r/427409

Change 427895 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/WikibaseLexeme@master] When linking to form, link to form section (fragment) on the lexeme page

https://gerrit.wikimedia.org/r/427895

Change 427655 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Factor out NonExistingEntityIdHtmlFormatter

https://gerrit.wikimedia.org/r/427655

Change 427409 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] FormId formatters

https://gerrit.wikimedia.org/r/427409

I believe the requirement mention above by @Pablo-WMDE

Has to work with and without $wgArticlePath.

is actually considered here, isn't it? Not sure if I checked all what's possible, but links to forms seem to be created correctly according to wiki settings. I might be mistaken though.

Change 427895 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] When linking to form, link to form section (fragment) on the lexeme page

https://gerrit.wikimedia.org/r/427895