Page MenuHomePhabricator

Convert Translate to use extension registration
Open, LowPublic

Description

The Translate extension needs to be converted to use the new extension registration system. More details are available on T87875. From the duplicate task:

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-wip.json with extension info, add an unconditional wfLoadExtension( 'Translate', __DIR__ . /extension-wip.json' ) to Translate.php.
  2. Move data to extension.json in smaller steps: e.g. one patch for resource loader modules, one patch for autoload and so on.

Special notes:

  • extension.json name cannot be used before it is ready (Jenkins test fails)
  • i18n things cannot be removed from Translate.php before extension.json is ready

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

The plan suggested in T204019 sounds good to me.

Change 471703 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Add minimal extension.json

https://gerrit.wikimedia.org/r/471703

Change 471704 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] Move i18n files to extension.json

https://gerrit.wikimedia.org/r/471704

Change 471703 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add minimal extension.json

https://gerrit.wikimedia.org/r/471703

Change 471704 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Move i18n files to extension.json

https://gerrit.wikimedia.org/r/471704

Nikerabbit updated the task description. (Show Details)

Change 472112 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] extension.json: Remove $wgParserTestFiles

https://gerrit.wikimedia.org/r/472112

Change 472114 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] extension.json: port jobs

https://gerrit.wikimedia.org/r/472114

Change 472116 had a related patch set uploaded (by Nikerabbit; owner: Nikerabbit):
[mediawiki/extensions/Translate@master] extension.json: port rights and grants

https://gerrit.wikimedia.org/r/472116

Change 472112 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] extension.json: Remove $wgParserTestFiles

https://gerrit.wikimedia.org/r/472112

Change 472114 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] extension.json: port jobs

https://gerrit.wikimedia.org/r/472114

Change 472116 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] extension.json: port rights and grants

https://gerrit.wikimedia.org/r/472116

awight added a subscriber: awight.Jan 16 2019, 5:22 PM

Change 484818 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Autoload using extension registration

https://gerrit.wikimedia.org/r/484818

Change 484819 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Load ResourceLoader modules using extension registration

https://gerrit.wikimedia.org/r/484819

Change 484821 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Register hooks using extension.json

https://gerrit.wikimedia.org/r/484821

Change 484826 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Extension registration for special pages

https://gerrit.wikimedia.org/r/484826

Change 484827 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] extension registration for API modules

https://gerrit.wikimedia.org/r/484827

Change 484829 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] extension registration for default user options

https://gerrit.wikimedia.org/r/484829

Change 484830 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] extension registration for default configuration

https://gerrit.wikimedia.org/r/484830

Change 484833 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration for translation message dirs

https://gerrit.wikimedia.org/r/484833

Change 484821 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Register hooks using extension.json

https://gerrit.wikimedia.org/r/484821

@Nikerabbit Hi, are we unblocked now that MLEB 2019.01 is released?

Change 484818 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Autoload using extension registration

https://gerrit.wikimedia.org/r/484818

Change 484826 merged by Nikerabbit:
[mediawiki/extensions/Translate@master] Extension registration for special pages

https://gerrit.wikimedia.org/r/484826

Change 484827 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Extension registration for API modules

https://gerrit.wikimedia.org/r/484827

Change 484819 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Load ResourceLoader modules using extension registration

https://gerrit.wikimedia.org/r/484819

Change 484829 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Extension registration for default user options

https://gerrit.wikimedia.org/r/484829

Change 391645 abandoned by Jforrester:
Convert to static extension loading

Reason:
Finalised with I3b90a9d587.

https://gerrit.wikimedia.org/r/391645

Change 490117 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Translate@master] Hard-deprecate loading the extension via Translate.php

https://gerrit.wikimedia.org/r/490117

Change 490118 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Translate@master] Remove PHP entry point

https://gerrit.wikimedia.org/r/490118

awight removed a subscriber: awight.Mar 21 2019, 4:07 PM

Change 484830 had a related patch set uploaded (by Jforrester; owner: Adam Wight):
[mediawiki/extensions/Translate@master] extension registration for default configuration

https://gerrit.wikimedia.org/r/484830

Change 484833 had a related patch set uploaded (by Jforrester; owner: Adam Wight):
[mediawiki/extensions/Translate@master] Cleanups for extension registration work

https://gerrit.wikimedia.org/r/484833

Change 490117 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Translate@master] Hard-deprecate loading the extension via Translate.php

https://gerrit.wikimedia.org/r/490117

Change 490118 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/Translate@master] Remove PHP entry point

https://gerrit.wikimedia.org/r/490118

Change 513078 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: translation service config

https://gerrit.wikimedia.org/r/513078

Change 513079 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: language code config

https://gerrit.wikimedia.org/r/513079

Change 513080 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: fuzzy config

https://gerrit.wikimedia.org/r/513080

Change 513081 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: page translation config

https://gerrit.wikimedia.org/r/513081

Change 513082 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: YAML library config

https://gerrit.wikimedia.org/r/513082

Change 513083 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: message group config

https://gerrit.wikimedia.org/r/513083

Change 513084 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: PHPlot config

https://gerrit.wikimedia.org/r/513084

Change 513085 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: sandbox config

https://gerrit.wikimedia.org/r/513085

Change 513086 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: system setup config

https://gerrit.wikimedia.org/r/513086

Change 513087 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: basic config

https://gerrit.wikimedia.org/r/513087

Change 513088 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Translate@master] Registration: unsorted config

https://gerrit.wikimedia.org/r/513088

Change 484830 abandoned by Awight:
extension registration for default configuration

Reason:
This has been split into bites.

https://gerrit.wikimedia.org/r/484830

Change 513079 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: language code config

https://gerrit.wikimedia.org/r/513079

Change 513080 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: fuzzy config

https://gerrit.wikimedia.org/r/513080

Change 513081 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: page translation config

https://gerrit.wikimedia.org/r/513081

Change 513082 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: YAML library config

https://gerrit.wikimedia.org/r/513082

Change 513083 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: message group config

https://gerrit.wikimedia.org/r/513083

Change 513084 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: PHPlot config

https://gerrit.wikimedia.org/r/513084

Change 513085 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: sandbox config

https://gerrit.wikimedia.org/r/513085

Change 513086 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: system setup config

https://gerrit.wikimedia.org/r/513086

Change 513087 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: basic config

https://gerrit.wikimedia.org/r/513087

Change 513088 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: unsorted config

https://gerrit.wikimedia.org/r/513088

Change 517933 had a related patch set uploaded (by Awight; owner: Awight):
[operations/mediawiki-config@master] Configuration migration for Translate

https://gerrit.wikimedia.org/r/517933

Currently waiting https://gerrit.wikimedia.org/r/517933 to be deployed. After that can continue merging conversion patches.

Change 517933 merged by jenkins-bot:
[operations/mediawiki-config@master] Configuration migration for Translate

https://gerrit.wikimedia.org/r/517933

Mentioned in SAL (#wikimedia-operations) [2019-07-09T11:09:51Z] <urbanecm@deploy1001> Synchronized wmf-config/CommonSettings.php: SWAT: [[:gerrit:517933|Configuration migration for Translate]] (T87985) (duration: 00m 49s)

Change 513078 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Registration: translation service config

https://gerrit.wikimedia.org/r/513078

Nikerabbit added a subscriber: awight.

I'm assigning to myself for tracking purposes, but bulk of the work has been done by others such as @awight, @Jdforrester-WMF and @Reedy.

Currently we are only a few patches away from "hard deprecation" phase. Before that can happen, we need to give time for people to migrate the configurations. At least one MLEB release, maybe two.

Change 484833 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Cleanups for extension registration work

https://gerrit.wikimedia.org/r/484833

Jpita added a subscriber: Jpita.Jul 18 2019, 10:25 PM

@Nikerabbit how can I test this?