[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Refactor ContentTranslation backend codebase to properly use dependency injection
Open, LowPublic

Description

Several services inside ContentTranslation extension do not follow best practices for dependency injection, leading to code smells. Although, there is no immediate need for these services to change, since they have been there for a long time, it is important to remove these bad patterns and properly use dependency injection in hook runner, API modules and other places.

To support this need, the following services should be refactored:

  • ContentTranslation/CategoriesStorageManager
  • ContentTranslation/CorporaLookup
  • ContentTranslation/LoadBalancer
  • ContentTranslation/PreferenceHelper
  • ContentTranslation/SiteMapper
  • ContentTranslation/SuggestionListManager
  • ContentTranslation/Translation
  • ContentTranslation/TranslationStorageManager
  • ContentTranslation/Translator

Event Timeline

Change 777845 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Backend: Create TranslationStore service

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

Moving to current sprint/quarter since there are efforts on this ticket these days. - For visibility.

@ngkountas Perhaps patches like https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/763181 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/763182/5 can be linked to this ticket?

Change 763181 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Dependency Injection: add Wikibase SiteLinkLookup service

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

Change 763182 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Dependency Injection: add Wikibase SettingsArray service

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

Change 763181 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Dependency Injection: add Wikibase SiteLinkLookup service

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

Change 763182 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Dependency Injection: add Wikibase SettingsArray service

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

Change 784087 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Rename and refactor TranslationStorageManager

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

Change 784088 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Create service for RestbaseClient

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

Change 784089 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Rename and create service for AbuseFilterCheck

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

Change 791566 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Create TranslationUnitValidator service

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

Change 784087 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Rename and refactor TranslationStorageManager

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

Change 784088 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Create service for RestbaseClient

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

Change 784089 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Rename and create service for AbuseFilterCheck

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

Change 791566 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Refactoring: Create TranslationUnitValidator service

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

Change 799295 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX: Refactor ApiSectionTranslationPublish class

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

Change 799295 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Refactor ApiSectionTranslationPublish class

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

Change #777845 abandoned by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] CX Backend: Create TranslationStore service

Reason:

This patch is pending for review for over 2 years, and given its size I don't expect it to be reviewed at all, since it's not a priority for the Language Team.

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