Page MenuHomePhabricator

Create formatters for displaying a form as a statement value
Closed, ResolvedPublic

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).

Related Objects

Event Timeline

WMDE-leszek created this task.
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.Apr 11 2018, 4:54 PM

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"

?

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

It looks fine on the Form-level but I'm not marking this as accepted yet because of T192766.

Problem with statement on property is tracked as T192766. If there is any other issue, could you please @Lydia_Pintscher describe it at least here as a comment, so we know it?

As far as I can tell the formatting is all okay.

Multiple representations:

Single representation:

Once T192766 is fixed I guess this will end up being closed

Addshore added a subscriber: Addshore.