Page MenuHomePhabricator

Make Translate extension to use extension.json
Closed, DuplicatePublic


Most extensions have been converted to use extension.json by now. Translate, with it's lengthy setup file has eluded this conversion despite multiple attempts. I think the reasons for this are:

  • Fully automatic conversion is not possible with Translate
  • The patch is huge and difficult to review manually
  • The patch gets stale because it doesn't get reviewed in time

And the cycle repeats. My proposal to stop this cycle is to do it in smaller steps:

  1. Add a minimal extension.json with extension info, add an unconditional define( 'TRANSLATE_LOADED', 1 ); wfLoadExtension( 'Translate' ) to Translate.php. Add a callback to extension.json that checks presence of TRANSLATE_LOADED. This is to guard from anyone calling wfLoadExtension( 'Translate' ) directly before it is ready.
  2. Move data to extension.json in smaller steps: e.g. one patch for resource loader modules, one patch for autoload and so on.

I propose we should try to finish the migration between MLEB releases. Next one is at the end of October, so we would have about seven weeks if we start now. Can this work?