Page MenuHomePhabricator

[wmf.13 - regression] hewiki - "suggested-edits-pager" displays markup
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce

  • Login to hewiki and go to Special:Homepage
  • The counter for suggested tasks ("suggested-edits-pager") displays the markup.

Screen Shot 2021-12-16 at 11.09.51 AM.png (1×2 px, 317 KB)

Note:

  • growthexperiments-homepage-suggestededits-pager on translatewiki.net has parentheses around the whole message.

Event Timeline

Must be a side effect of <strong> being inside {{PLURAL}}. The PHP-based message implementation supports that, the JS-based apparently doesn't.

The same issue is also present in the task count in the suggested edit filters.

Screen Shot 2021-12-16 at 11.49.08 AM.png (120×1 px, 17 KB)

The Messsages API docs say The doc-jqueryMsg template can be used to document such messages, to let translators know which wikitext restrictions apply. We should probably get in the habit of doing that.

Updated the Messages API docs to mention this edge case.

Thanks for the mention.

I've tried changing <strong> to ''', and I see an odd thing when I try to open Special:Homepage: it's initially loaded with correct formatting, and after a moment it changes to show the <strong> tags again. Not sure if it's a bug in the extension code or a caching issue.

... OK, it's a caching issue. I'm now trying again, and it shows me apostrophes instead of proper bold formatting.

I removed the formatting entirely.

Per https://www.mediawiki.org/wiki/Manual:Messages_API#Feature_support_in_JavaScript ''' is not supported either (and even if it would be, the nesting would probably still break). I think you should just omit the special-casing for when there's a single result (which should be very rare anyway).

Although I guess we could also just apply the formatting on the software side.

FTR, I cannot reproduce this now. Was this fixed on-wiki already?

I seem to recall translatewiki i18n changes being updated daily nowadays, so probably yes.

Re-checked on hewiki - aside from not displaying numbers in bold, the issue is not present anymore:

Numbers should be bolded
Screen Shot 2021-12-17 at 4.53.20 PM.png (932×1 px, 545 KB)
testwiki
Screen Shot 2021-12-17 at 4.56.08 PM.png (652×1 px, 186 KB)

The issue that @mewoph mentioned is not present anymore:

Screen Shot 2021-12-17 at 4.52.57 PM.png (970×1 px, 155 KB)

I see it now on the Hebrew Wikipedia. It may have been fixed for some time, but the screenshot in the original description is what I see now, June 2023: the same message with <strong> tags.

Screen Shot 2021-12-16 at 11.09.51 AM.png (1×2 px, 317 KB)

I can confirm this with my interface language set to Hebrew: https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%93%D7%A3_%D7%94%D7%91%D7%99%D7%AA&source=personaltoolslink&namespace=0&uselang=he; I cannot reproduce this with uselang=en. This is also reproducible locally.

I restored the local message in the Hebrew Wikipedia as a workaround, so now the bug is invisible there. You can still easily see the bug if you open the English Wikipedia with Hebrew user interface:

https://en.wikipedia.org/wiki/special:Homepage?uselang=he

I restored the local message in the Hebrew Wikipedia as a workaround, so now the bug is invisible there. You can still easily see the bug if you open the English Wikipedia with Hebrew user interface:

https://en.wikipedia.org/wiki/special:Homepage?uselang=he

Thank you, @Amire80! Should we keep this task open to follow up with a proper fix (if there is a proper fix) ? The message is displayed without markup now, but the numbers are not bolded, e.g. in enwiki:

Screen Shot 2023-06-08 at 10.03.03 AM.png (536×1 px, 88 KB)
Screen Shot 2023-06-08 at 10.03.11 AM.png (548×1 px, 44 KB)

I checked arwiki and fawiki - the message looks correct. And uselang=he will display the issue.

Should we keep this task open to follow up with a proper fix (if there is a proper fix) ?

IMO not worth it, this task is already generating more bureaucratic overhead than it is worth. There is T249892: mw.message.parse() should not escape HTML returned from magic words (e.g. {{PLURAL}}) for tracking the underlying issue.

Cyndymediawiksim changed the task status from Open to Stalled.Jul 24 2023, 12:56 PM

I'm trying to clean up Growth's sprint board. I'm moving this out of current sprint since it seems like work has stalled on this and it might be more work than it's worth. But feel free to reclaim and move back to the current sprint if I'm mistaken.

Etonkovidova claimed this task.

Checked in hewiki wmf.27 - the issue is not present anymore; marking as Resolved.

Screen Shot 2023-09-22 at 10.46.46 AM.png (976×1 px, 182 KB)

Note: The bold formatting is missing (could be addressed in a different task)
The bold formatting is present in LTR and RTL:

arwiki wmf.27enwiki wmf.27
Screen Shot 2023-09-22 at 10.48.50 AM.png (890×1 px, 100 KB)
Screen Shot 2023-09-22 at 10.49.39 AM.png (734×2 px, 321 KB)