Page MenuHomePhabricator

Make it possible to customize the default signature format per wiki
Closed, ResolvedPublic

Description

Reported by User:ネイ at https://www.mediawiki.org/wiki/Topic:Vk5r8qy9o799ucnw


Context

Some editors, and some wikis, have strong views about the "correct" way to sign a comment. Early Wikipedia conventions were similar to USENET e-mail conventions, with a pair of hyper-minus characters indicating the separation point between content and signature. These often map with how (in)convenient typing tildes are on their keyboard, because the signature button in the 2006 and 2010 wikitext editors includes the pair of hyphen-minuses, while people who type the tildes directly don't bother typing the hyphen-minuses.

As a result, there are at least three common signature styles:

Most editors at most wikis:  ~~~~
Some editors at most wikis:  --~~~~
Most editors at some wikis, especially jawiki and cswiki: --~~~~ (no space; the "period" is U+3002 and contains the space.)

It might be good, at least at wikis where a convention is strong, to be able to set the default.

Open questions

  • How should this configuration be implemented? As a core message? Something else?

Requirements

  • Configurations that prevent the comment parser from being able to identify a signature should be disallowed.

Done

  • Individual wikis are able to customize what signature syntax the DiscussionTools output automatically

Event Timeline

Typographic conventions change language to language. Hungarian, for example, uses a single en dash () instead of the --, and a non-breaking space to separate it from the signature.

There should really be a core message to customize this, instead of a dozen different extensions trying to reimplement it by hand.

Notes from this week's team meeting
There are two key benefits of enabling wikis to customize the signature syntax DiscussionTools
outputs:

  1. Primary: making DT signature outputs customizable honors local conventions
  2. Secondary: codifying signature prefixes (e.g. -- or ) would enable the comment parser to different between a comment's signature and body with more certainty. This will be helpful when we think about the following:

Typographic conventions change language to language. Hungarian, for example, uses a single en dash () instead of the --, and a non-breaking space to separate it from the signature.

Good call. Thank you for adding this context, @Tgr.

There should really be a core message to customize this, instead of a dozen different extensions trying to reimplement it by hand.

This sounds like a consideration for how this functionality gets implemented. Assuming this to be true, I've tried to represent it as an "Open question" in the task description; please let me know if you think it needs to be adjusted or if I've assumed incorrectly.

Change 597533 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Make signature prefix customisable

https://gerrit.wikimedia.org/r/597533

There should really be a core message to customize this, instead of a dozen different extensions trying to reimplement it by hand.

That would be nice but there are a lot of use cases there, and I wouldn't want our work tied up with a config change that could affect dozens of other extensions. We can create a separate task for that and migrate our implementation to a core variable later.

Change 597533 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Make signature prefix customisable

https://gerrit.wikimedia.org/r/597533

In case anyone wants to use this feature, you need to create a page called "MediaWiki:Discussiontools-signature-prefix" that contains your 'thing' (e.g., an endash, a non-breaking space, etc.).

Is there a way that the Discussions Tool will use the signature setting set up in the user preferences?
https://meta.wikimedia.org/wiki/Special:Preferences#mw-prefsection-personal

Does it make sense?

Is there a way that the Discussions Tool will use the signature setting set up in the user preferences?

As far as I know, it does use it. It appends ~~~~ to the message (which is processed by MediaWiki core); this task is about using something like --~~~~ instead of ~~~~.

Yes, you should get your custom signature already. But it's just the custom signature, and some wikis want a dash or a particular kind of space. If you do nothing, then the default is ~~~~ (a single normal space followed by your custom signature and the timestamp).