Page MenuHomePhabricator

hewiki: Homepage SE module displays <strong> in article counter
Open, HighPublicBUG REPORT

Assigned To
None
Authored By
Etonkovidova
Sep 28 2022, 10:52 PM
Referenced Files
F36898665: hewiki_markup.gif
Mar 9 2023, 2:04 AM
Restricted File
Nov 7 2022, 3:28 PM
F35704942: Screen Shot 2022-11-03 at 6.23.38 PM.png
Nov 4 2022, 1:41 AM
F35704940: Screen Shot 2022-11-03 at 6.31.05 PM.png
Nov 4 2022, 1:41 AM
F35704938: Screen Shot 2022-11-03 at 6.31.14 PM.png
Nov 4 2022, 1:41 AM
F35538602: Screen Shot 2022-09-28 at 3.38.49 PM.png
Sep 28 2022, 10:52 PM

Description

Steps to replicate the issue (include links if applicable):

  • Login to hewiki wmf.3 and go to Special:Homepage, or any wiki using ?uselang=he
  • SE module will display the article counter (growthexperiments-homepage-suggestededits-pager) with <strong> attribute in it

Screen Shot 2022-09-28 at 3.38.49 PM.png (886×1 px, 155 KB)

Note: when Special:Homepage loads, the correct format growthexperiments-homepage-suggestededits-pager is displayed:
(click on the animated gif below):
hewiki_markup.gif (546×782 px, 135 KB)

MediaWiki:growthexperiments-homepage-suggestededits-page has the label format as the following:

{{PLURAL:$2|הצעה <strong>אחת</strong>|הצעה <strong>$1</strong> מתוך <strong>$2</strong>}}

Event Timeline

That string hasn't changed in a while. Noting that the HTML renders correctly on the server-side, I do see in the Manual:Messages_API this line about JavaScript message parsing:

Notable wikitext syntax that is not supported:

Some types of nesting (e.g. {{PLURAL:$1|<strong>$1</strong>}})

It's odd that this works for other languages but seems to break specifically for Hebrew.

Note that this isn't related to wmf.3, you can see the regression on e.g. enwiki (wmf.2) using ?uselang=he.

@Raymond @Amire80 do you know if the string for this message ({{PLURAL:$2|הצעה <strong>אחת</strong>|הצעה <strong>$1</strong> מתוך <strong>$2</strong>}}) is problematic? Have you seen this type of bug before?

kostajh renamed this task from [wmf.3 - regression] hewiki: Homepage SE module displays <strong> in article counter to hewiki: Homepage SE module displays <strong> in article counter .Sep 29 2022, 10:49 AM
kostajh updated the task description. (Show Details)

English is <strong>$1</strong> of <strong>$2</strong> {{PLURAL:$2|suggestion|suggestions}} so it's not affected.

That string hasn't changed in a while.

That part was wrong. @Tgr pointed out that the string did change; @Amire80 deleted the override on hewiki https://he.wikipedia.org/wiki/%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:Growthexperiments-homepage-suggestededits-pager?uselang=en on September 22. The override contents were {{PLURAL:$2|הצעה אחת|הצעה $1 מתוֹך $2}}

So I would suggest changing it back to that, @Amire80. Does that sound OK?

The longer term fix is to support nested template expressions in mediawiki.jqueryMsg.js. @Tgr wrote:

It does not seem that hard to support nested template expressions. You just need to define a "without pipe" version of all the structures that can occur as a template parameter (specifically, nowiki, html and expression).

The same issue is on be-x-old wiki and bewikifor growthexperiments-homepage-suggestededits-difficulty-filters-article-count

Screen Shot 2022-11-03 at 6.31.14 PM.png (679×711 px, 88 KB)
Screen Shot 2022-11-03 at 6.31.05 PM.png (704×713 px, 91 KB)
Screen Shot 2022-11-03 at 6.23.38 PM.png (896×506 px, 107 KB)

I suppose we need an override for that wikis as well, then.

I'm wondering if we should consider reworking this string, though, to simplify things. We could have a pagination string like:

1 / 5,427
2 / 5,427

{F35714875}

Then we'd have one less i18n string. @RHo @KStoller-WMF what do you think?

I'm wondering if we should consider reworking this string, though, to simplify things. We could have a pagination string like:

1 / 5,427
2 / 5,427

Then we'd have one less i18n string. @RHo @KStoller-WMF what do you think?

I'm OK with it for i18n and simplification; but at the same time wonder if it would be nice to maintain what IMO is the slightly more "human" tone of 1 of 335 suggestions count, but maybe I am overthinking it.

I'm wondering if we should consider reworking this string, though, to simplify things. We could have a pagination string like:

1 / 5,427
2 / 5,427

Then we'd have one less i18n string. @RHo @KStoller-WMF what do you think?

I'm OK with it for i18n and simplification; but at the same time wonder if it would be nice to maintain what IMO is the slightly more "human" tone of 1 of 335 suggestions count, but maybe I am overthinking it.

Fair enough. So the options I see are:

  1. The jquery.Msg fix proposed by @Tgr in T318876#8303954. Pros: more versatile, allows us to recreate the desired markup in hewiki and be_x_old wiki. Cons: More time-consuming to implement. (Not sure exactly how much time.)
  2. Add back the message override used by hewiki, and come up with a similar override for be_x_old. Pros: Takes a couple of minutes. Cons: It's a hack, and can be undone.
  3. Rework the pagination widget to use numeric only markup (T318876#8374628). Pros: Fairly easy to implement (caveat about flipping the display for RTL). Cons: Not as "human" / friendly as the longer message.

Maybe option 2 is the way to go for now, as a stopgap, and then we could consider options 1 or 3 in follow-up tasks, though I doubt we'd get to them given our current priorities and workload 🤷🏻‍♂️

Let's do option 2, since Gergo's patch for jQuery.msg (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/884099) doesn't work, and we're not sure how long it would take to fix it.

Let's do option 2, since Gergo's patch for jQuery.msg (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/884099) doesn't work, and we're not sure how long it would take to fix it.

@Amire80 per the above, could you please undelete the page that had the override? https://he.wikipedia.org/wiki/%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:Growthexperiments-homepage-suggestededits-pager

Let's do option 2, since Gergo's patch for jQuery.msg (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/884099) doesn't work, and we're not sure how long it would take to fix it.

@Amire80 per the above, could you please undelete the page that had the override? https://he.wikipedia.org/wiki/%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:Growthexperiments-homepage-suggestededits-pager

@Amire80 pinging you about the request above, please let me know if that would work for you.

@Amire80 , pinging you to make sure you saw @kostajh 's previous comment.

KStoller-WMF moved this task from Inbox to Triaged on the Growth-Team board.