Page MenuHomePhabricator

OutputPage.php function output: use wfMsg( 'editthispage' ) instead of ( 'edit' )
Closed, DeclinedPublic

Description

While debugging another module (the Interwiki extension which says in the table of interwiki links "edit this page" instead of simply "edit), I found what looks to be an old message string text bug in the core OutputPage.php:

In OutputPage.php public function output line 942 seq. I found

if( $wgUniversalEditButton ) {
....
title' => wfMsg( 'edit' ),
....
'title' => wfMsg( 'edit' ),

I am pretty sure that here twice 'editthispage' was originall meant (but pls. review and correct me, if I am wrong).

Remark: compare with Skin.php function editThisPage which uses the correct message string "editthispage" is used.


Version: 1.16.x
Severity: normal
URL: http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/OutputPage.php?view=markup

Details

Reference
bz22229

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:53 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz22229.
bzimport added a subscriber: Unknown Object (MLST).

A similar change in SkinTemplate.php line 688 is needed

....
'text' => $this->mTitle->exists()

		? wfMsg( 'edit' )
		: wfMsg( 'create' ),
		'href' => $this->mTitle->getLocalUrl( $this->editUrlOptions() )

change wfMsg( 'edit' ) to wfMsg( 'editthispage' )

The original message was editthispage ("Edit this page"), edit was added on r2810 for the tal-based davinci skin.
Then on r10386 avar changed editthispage to also be "Edit"

So nuking it seems a good idea.

(In reply to comment #2)

The original message was editthispage ("Edit this page"), edit was added on
r2810 for the tal-based davinci skin.
Then on r10386 avar changed editthispage to also be "Edit"

So nuking it seems a good idea.

Further analysis enwiki:

Possible side effect and impact: all Language/Messages files need perhaps also be reviewed in their text elements for 'edit'.

sumanah wrote:

Removing the keyword "need-review" since we're using that for bugs that have patches (that need code review) attached.

matmarex subscribed.

The 'editthispage' message is no longer used in MediaWiki core (it's still defined there for historical reasons, but only used by some skins, like CologneBlue). 'edit' is the right message and it's used everywhere consistently now.