Closed ghost closed 4 years ago
See also this talk. :) Perhaps it will be good to make a last version for the classic mechanism and move on with @sigbert 's changes. I will do a pull request.
Are we good with this issue. Except %$@* !!! I forgot to pull in @MATsxm PR for the update to fr.json. I'm going to commit that right now.
@Hutchy68 Well there was a French translation before so this is not so decisive. Will be part of the next release. @sigbert In case you are not so familiar with GitHub you could also send the code to me and I move it in for you, otherwise just to the pull.
I got the code from @sigbert. Thanks a bunch. This one is however breaking. I am thinking of doing a backwards compatible interim version and move this on in after. Hopefully I will do it tomorrow. Disaster unfolded on a wiki yesterday so I was a bit busy.
@sigbert I am sorry that it took me so long. After @Hutchy68 merged my pull request https://github.com/Hutchy68/Purge/issues/6 I will move in your changes and make this extension breaking with pre MW 1.25 instances.
Hmm, unless I'm missing something. I don't see extension.json
or the entry point for use of wfLoadExtension
in PR #6. I would do this as a v2.0.0 and break compatibility with anything under 1.25.
Entry point would look something like this.
if ( function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'Purge' );
$wgMessagesDirs['Purge'] = __DIR__ . '/i18n';
/* wfWarn(
'Deprecated PHP entry point used for Purge extension.' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
); */
return;
} else {
die( 'This version of the Purge extension requires MediaWiki 1.25+' );
}
Could also delete Purge.i18n.php as it is only a shim to load .json
files so they appear as the old way of loading messages.
Thoughts?
Personally, I think breaking compatibility for out-of-date wikis is fine. They can always continue using an older version.
@sigbert 's proposed changes never made it to here as a pull request since I was waiting for some release still compatible with 1.23 and afterwards make the breaking change for 1.25 and later. To much time has passed in the meantime. I know however that he had a version containing the "extension.json" file.
I've created a PR for this: #19
closing as it was merged
I just adapted your code to reflect the new loading mechanism for Mediawiki extension. Shall I send you the code?