Page MenuHomePhabricator

Using number sign as first symbol causes message to render as numbered list item
Closed, ResolvedPublicBUG REPORT

Description

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

  • Create message that starts with # (number sign) (example)

image.png (211×391 px, 14 KB)

  • Check the output message

In this case, this is MediaWiki:Missing-revision-permission and revision of deleted page

What happens?:
Message is rendered as numbered list item

image.png (121×367 px, 3 KB)

What should have happened instead?:
It should display # sign

Event Timeline

# at begin of the line is a list, put nowiki tags around it to avoid this. Maybe a wiki want to use a list here. It seems not possible to define for each message if list is allowed or not.

A bit like T14974: The newline added to a template, magic word, variable, or parser function that returns line-start wikicode formatting (*#:; {|) causes unexpected parsing, but not the same

matmarex subscribed.

Agreed, this seems like the expected behavior for any message that allows wikitext (and this message has wikitext links in it).

I added a translator note to the three messages where this is likely to be an issue:

If your translation would start with #, use <nowiki>#</nowiki> instead, so that the message does not display as a numbered list.

We could also use <nowiki>#</nowiki> in the English-language text, but this seems more likely to be confusing than helpful, in the languages where this workaround is not needed.

Thank you for reporting this anyway!

Same issue in CommunityConfiguration messages

image.png (139×934 px, 23 KB)
image.png (207×646 px, 13 KB)

Updated the message documentation: link