Hi,
I'am just adapting Extension:Purge (actually taken from https://github.com/Hutchy68/Purge) to MediaWiki 1.26.2. It adds a tab which allows the user to purge a wiki page.
In the code has been written
$content_actions['actions']['purge'] = array('class' => $action === 'purge' ? 'selected' : false, 'text' => wfMsg( 'purge' ), 'href' => $title->getLocalUrl( 'action=purge' ) );
But in the tab appears <purge> rather then "Purge" from i18n/en.json. Any ideas why?
Thanks in advance
Sigbert
I'm not sure if it is because it uses wfMsg which needs to be replaced with see Manual:Messages API - Mediawiki please. | | | | | | | | | Manual:Messages API - MediaWikii18n docs | | | | View on www.mediawiki.org | Preview by Yahoo | | | | |
On Wednesday, 30 March 2016, 11:48, Sigbert Klinke sigbert@wiwi.hu-berlin.de wrote:
Hi,
I'am just adapting Extension:Purge (actually taken from https://github.com/Hutchy68/Purge) to MediaWiki 1.26.2. It adds a tab which allows the user to purge a wiki page.
In the code has been written
$content_actions['actions']['purge'] = array('class' => $action === 'purge' ? 'selected' : false, 'text' => wfMsg( 'purge' ), 'href' => $title->getLocalUrl( 'action=purge' ) );
But in the tab appears <purge> rather then "Purge" from i18n/en.json. Any ideas why?
Thanks in advance
Sigbert
Problem solved, I forgot to add
"MessagesDirs": { "Purge": [ "i18n" ] },
in extension.json
Am 30.03.2016 um 12:48 schrieb Sigbert Klinke:
Hi,
I'am just adapting Extension:Purge (actually taken from https://github.com/Hutchy68/Purge) to MediaWiki 1.26.2. It adds a tab which allows the user to purge a wiki page.
In the code has been written
$content_actions['actions']['purge'] = array('class' => $action === 'purge' ? 'selected' : false, 'text' => wfMsg( 'purge' ), 'href' => $title->getLocalUrl( 'action=purge' ) );
But in the tab appears <purge> rather then "Purge" from i18n/en.json. Any ideas why?
Thanks in advance
Sigbert
You will want to replace the deprecated message functions since there removed in mediawiki 1.27. See https://www.mediawiki.org/wiki/Manual:Messages_API#Help_with_replacing_depre... please
On Wednesday, 30 March 2016, 11:56, Sigbert Klinke sigbert@wiwi.hu-berlin.de wrote:
Problem solved, I forgot to add
"MessagesDirs": { "Purge": [ "i18n" ] },
in extension.json
Am 30.03.2016 um 12:48 schrieb Sigbert Klinke:
Hi,
I'am just adapting Extension:Purge (actually taken from https://github.com/Hutchy68/Purge) to MediaWiki 1.26.2. It adds a tab which allows the user to purge a wiki page.
In the code has been written
$content_actions['actions']['purge'] = array('class' => $action === 'purge' ? 'selected' : false, 'text' => wfMsg( 'purge' ), 'href' => $title->getLocalUrl( 'action=purge' ) );
But in the tab appears <purge> rather then "Purge" from i18n/en.json. Any ideas why?
Thanks in advance
Sigbert
mediawiki-l@lists.wikimedia.org