Page MenuHomePhabricator

Add a nbsp before colon in the comment of page move
Closed, ResolvedPublic

Description

In view of bug 11810 and bug 13273, is it possible to localize the colon in the comment of a page move (see url).

The change should be in the class Title, function moveToNewTitle, at the beginning of the function.

Thank you


Version: 1.13.x
Severity: enhancement
URL: http://fr.wikipedia.org/w/index.php?title=Bernard_Brunhes_%28homme_d%27affaires%29&diff=prev&oldid=28089283

Details

Reference
bz13815

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:10 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz13815.

I've tried to resolve this bug, but when I introduce wfMsgExt( 'colon-separator', array( 'escapenoentities', 'content' ) ) all   and   are displayed inline in the comment. I haven't found the good options to replace the nbsp by a true non-breaking space, it is a sort of reverse parsing (nbsp to inline) and I don't know if it exist a such parsing method.

There is some other occurrences where it would be better to use the colon-separator message (I founded two in the file Article.php), perhaps we could open a tracking bug.

Simetrical, I added you to the CC list because you propose it in the bug 13273.

ayg wrote:

What was your patch that didn't work? What exactly was wrong with it? What does "displayed inline in the comment" mean?

Yes, sorry. My patch is

Index: includes/Title.php

  • includes/Title.php (révision 37636)

+++ includes/Title.php (copie de travail)
@@ -2718,7 +2718,7 @@

		$fname = 'MovePageForm::moveToNewTitle';
		$comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
		if ( $reason ) {
  • $comment .= ": $reason";

+ $comment .= wfMsgExt( 'colon-separator', array( 'escapenoentities', 'content' ) ) . $reason;

		}

		$newid = $nt->getArticleID();

I have used the same function as you in r31805, but the result in the history is
(actu) (diff) 14 juillet 2008 à 10:34 Seb35 (Discuter | Contributions | Bloquer) m (a renommé Accueil en Accueillit : essai3) (défaire)

ayg wrote:

Fixed in r37663. It was being escaped a second time in Linker::formatComment; that needed to be fixed as well.

ayg wrote:

This was reverted in r37714. I'm waiting for the okay to recommit it.

Assigned: Simetrical. May be easy to overlook the waiting part if this issue is not assigned.

ayg wrote:

Re-committed in r39600, which is *not* right before a release.