Topic on Talk:Page Previews/Flow

Rendering of parenthetical text in hovercards

6
Sasuke Sarutobi (talkcontribs)

Hovercards don't appear to render text in brackets from the target page. For instance, hovercards concerning the Wikipedia page for w:RAF Hospital Wegberg state that it is "commonly abbreviated to RAFWegberg", while the page itself states that it is "commonly abbreviated RAF(H) Wegberg"; both the '(H)' and the space after it appear to be missed by the hovercard.

Vibhabamba (talkcontribs)

This is a good point. Typically parenthesis carry complicated IPA's or scripts from other languages that hinder a quick read of the hovercard. Hence we have elected to remove parenthetical content. Making a note of this case for investigation. Thank you for pointing this out.

Sasuke Sarutobi (talkcontribs)

Vibhabamba: Thank you for your answer. My first thought is that are IPAs and scripts typically not in templates? I've not worked on articles featuring these for a while, so I don't know what the general trend is these days. Secondly, being a language learner and able to (approximately) read IPA and a few other scripts, I find such content useful to have. I've not read especially many foreign-language subjects through hovercards since enabling the feature, but would it be possible for it to be optionally enabled (i.e. disabled by default).

With regards to the missing space as well; I'm guessing that in addition to the script removing parenthetical content, it removes the first found instance of a space in order that remaining text is rendered correctly (since there would be a space either side of the parentheses). I know that this is an unusual example in that the parentheses are only accompanied by one space instead of two, but might it be worth changing it so that it removes the space immediately before the parentheses?

TheDJ (talkcontribs)

Sasuke Sarutobi: I agree that it is a somewhat crude method to remove these right now. It's prone to failure (and also hides birth/death dates, that are usually enclosed in parenthesis).

The templates are not really relevant here, since hovercards deals with rendered output, not wikitext. I think we should reevaluate how to achieve this goal.

Sasuke Sarutobi (talkcontribs)

As a footnote, I've also noticed square-bracketed IPA script is displayed in hovercards; e.g. w:Audemars. I thought that might be of interest.

Quiddity (WMF) (talkcontribs)

Now filed as phab:T91344. Please edit or add details, there. Thanks.

Reply to "Rendering of parenthetical text in hovercards"