Page MenuHomePhabricator

Move code to mark page for translation from PageTranslationSpecialPage to a service
Closed, ResolvedPublic8 Estimated Story Points

Description

The logic to mark translatable pages for translation lives in the PageTranslationSpecialPage. This makes it difficult for it to be used from elsewhere such as a command line script or API.

Move this code to a separate service.

Details

Other Assignee
Tacsipacsi
SubjectRepoBranchLines +/-
mediawiki/extensions/Translatemaster+882 -431
mediawiki/extensions/Translatemaster+53 -37
mediawiki/extensions/Translatemaster+209 -0
mediawiki/extensions/Translatemaster+94 -77
mediawiki/extensions/Translatemaster+1 -1
mediawiki/extensions/Translatemaster+28 -29
mediawiki/extensions/Translatemaster+44 -40
mediawiki/extensions/Translatemaster+188 -155
mediawiki/extensions/Translatemaster+102 -50
mediawiki/extensions/Translatemaster+35 -22
mediawiki/extensions/Translatemaster+146 -105
mediawiki/extensions/Translatemaster+127 -92
mediawiki/extensions/Translatemaster+90 -20
mediawiki/extensions/Translatemaster+103 -50
mediawiki/extensions/Translatemaster+53 -55
mediawiki/extensions/Translatemaster+69 -72
mediawiki/extensions/Translatemaster+272 -221
Show related patches Customize query in gerrit

Event Timeline

Change 960183 had a related patch set uploaded (by Abijeet Patro; author: Tacsipacsi):

[mediawiki/extensions/Translate@master] Create TranslatablePageMarker service

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

Change 963017 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Add service TranslatablePageMarker

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

Change 964413 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TransaltablePageMarker: Move validateUnitIds to service

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

Change 964414 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move prepareTranslationUnits to service

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

Change 964423 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Add TranslatablePageMarker service

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

Change 963017 abandoned by Abijeet Patro:

[mediawiki/extensions/Translate@master] Add service TranslatablePageMarker

Reason:

Went in the wrong direction.

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

Change 964413 abandoned by Abijeet Patro:

[mediawiki/extensions/Translate@master] TransaltablePageMarker: Move validateUnitIds to service

Reason:

Went in the wrong direction.

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

Change 964414 abandoned by Abijeet Patro:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move prepareTranslationUnits to service

Reason:

Went in the wrong direction.

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

Change 964884 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Introduce TranslatablePageMarkOperation

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

Nikerabbit changed the task status from Open to In Progress.Oct 10 2023, 11:17 AM
Nikerabbit triaged this task as Low priority.

Change 964922 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarkOperation: Add method to identify translation units

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

Change 964967 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarkOperation: Move method to validate unit names

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

Change 965710 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarkOperation: Add priority language information

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

Change 965738 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move method to handle priority languages

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

Change 965859 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move method to mark page for translation

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

Change 965864 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Extract code to a add log entry method

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

Change 966128 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Refactor method to save section markers

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

Change 969072 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageStore: Move title cache invalidation into store

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

Change 964423 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add TranslatablePageMarker service

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

Change 964884 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Introduce TranslatablePageMarkOperation

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

Change 964922 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Add method to identify translation units

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

Change 964967 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move method to validate unit names

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

Change 970651 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Introduce TranslatablePageSettings

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

Change 965864 abandoned by Abijeet Patro:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Extract code to a add log entry method

Reason:

Makes code more difficult to follow.

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

Change 965710 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarkOperation: Add priority language information

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

Change 965738 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move method to handle priority languages

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

Change 965859 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Move method to mark page for translation

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

Change 970911 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] Add tests for TranslatablePageMarker

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

Change 966128 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Refactor method to save section markers

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

Change 969072 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageStore: Move title cache invalidation into store

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

Change 971193 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Some more tweaks

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

Change 970651 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Introduce TranslatablePageSettings

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

Change 970911 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add tests for TranslatablePageMarker

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

Change 971193 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] TranslatablePageMarker: Some more tweaks

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

The refactored code has been deployed on translatewiki.net. I tested by marking a page for translation with priority languages, and various other options. It appears to work as expected.

Thanks to @Tacsipacsi for initiating work on this.

Leaving it open until the patches ride the train next week.

There was one issue identified as part of this refactoring which has been fixed. Now marking this as resolved.

Change 960183 abandoned by Nikerabbit:

[mediawiki/extensions/Translate@master] Create TranslatablePageMarker service

Reason:

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