Page MenuHomePhabricator

Enable OCR improvements on all remaining Wikisources
Closed, ResolvedPublic

Description

Enable the new OCR widget on all remaining Wikisources.

Per https://phabricator.wikimedia.org/T283898, it's already deployed on the following:

  • ta
  • bn
  • hi
  • mul

Context:
This will add the new button on the page image, with a dropdown for switching between OCR engines (Google and Tesseract). It won't change anything about the existing gadgets.

Event Timeline

If we don't need to do this in stages, then I think the best thing is to just remove the $wgWikisourceEnableOcr feature flag. That'll keep the config files cleaner. We'll still have to do a config change afterwards, to clean up the current enabling code.

Does that sound okay?

Change 701015 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Wikisource@master] Remove $wgWikisourceEnableOcr feature flag

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

Change 701016 had a related patch set uploaded (by Samwilson; author: Samwilson):

[operations/mediawiki-config@master] Remove defunct feature flag $wgWikisourceEnableOcr

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

If we don't need to do this in stages, then I think the best thing is to just remove the $wgWikisourceEnableOcr feature flag. That'll keep the config files cleaner. We'll still have to do a config change afterwards, to clean up the current enabling code.

Does that sound okay?

I disagree about the easiest way to enable it everywhere - if we remove the feature flag and have it run everywhere, and then an issue is discovered, the way to revert the enabling will be to restore the feature flag (extension master) and then backport that (relevant extension WMF weekly branch). Once that issue is resolved the feature flag will be removed, then you wait a bit for the train, then its reapplied, etc.

Or, what if its enabled and then a specific community objects? You would need to reintroduce the feature flag, and then restore the config to have it true everywhere except that wiki.

Instead, in the WMF config just set it true everywhere, and only remove the flag once its stable and clear that we do indeed want it everywhere. Its far easier to change the WMF config so that its enabled everywhere by updating InitialiseSettings.php than by changing the extension.

So, in InitialiseSettings.php, instead of

current
'wgWikisourceEnableOcr' => [
	'default' => false,
	'bnwikisource' => true,
	'hiwikisource' => true,
	'sourceswiki' => true,
	'tawikisource' => true,
],

use

proposed
'wgWikisourceEnableOcr' => [
	'default' => true,
],

Change 701225 had a related patch set uploaded (by Samwilson; author: Samwilson):

[operations/mediawiki-config@master] Enable OCR tool on all Wikisources

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

Change 701016 abandoned by Samwilson:

[operations/mediawiki-config@master] Remove defunct feature flag $wgWikisourceEnableOcr

Reason:

In favour of setting it to true for all Wikisources: Ieba67ec970c6d850699e561fb50c5c8de0185644

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

@NRodriguez this ticket still says "Decision needed" and "placeholder"; I'm pretty sure we've decided to deploy to all Wikisources didn't we? Could you update the description just to make it clearer?

Change 701225 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable OCR tool on all Wikisources

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

Mentioned in SAL (#wikimedia-operations) [2021-06-24T11:21:46Z] <tgr@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:701225|Enable OCR tool on all Wikisources (T285311)]] (duration: 01m 06s)

Probably this needs an announcement since it's a config change that's gone out between trains and taken some users by surprise:

https://en.wikisource.org/wiki/Wikisource:Scriptorium#Extract_Text_button

So something like this for Tech News?

Wikisources have a new [[<tvar name="ocr">m:Special:MyLanguage/Community Tech/OCR Improvements</tvar>|OCR tool]]. If you don't want to see the "extract text" button on Wikisource you can add <code>.ext-wikisource-ExtractTextWidget { display: none; }</code> to your [[<tvar name="commonjs">Special:MyPage/common.js</tvar>|common.js page]]. [https://phabricator.wikimedia.org/T285311]

Sounds sensible to me.

Possibly the tool could do with a toggle in the Proofreading tool bar next to the "H/V mode" and "Show header/footer" button for "formal" user control of the visibility without having to hide it with CSS.

Possibly the tool could do with a toggle in the Proofreading tool bar next to the "H/V mode" and "Show header/footer" button for "formal" user control of the visibility without having to hide it with CSS.

it would be great!

So something like this for Tech News?

When is the next Tech News? Something like this should ideally be announced ahead of time, and if after the fact it shouldn't wait too long. Possibly a separate massmessage should be considered in addition to a blurb in Tech News.

It's been delivered. With rare exceptions, it's delivered every Monday.

Adding the Tech News step to our future release plans! Thanks everyone.

Test wiki created on Patch Demo by MusikAnimal using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/dcb6b9e99e/w/

Test wiki on Patch Demo by MusikAnimal using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/dcb6b9e99e/w/

Test wiki created on Patch Demo by MusikAnimal using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/706f5f65b7/w/

Test wiki created on Patch Demo by Samwilson using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/8a479f0c15/w/

Test wiki on Patch Demo by MusikAnimal using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/706f5f65b7/w/

Test wiki created on Patch Demo by Samwilson using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/d7323d2327/w/

Test wiki on Patch Demo by Samwilson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/8a479f0c15/w/

Test wiki on Patch Demo by Samwilson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/d7323d2327/w/

Change 701015 abandoned by Samwilson:

[mediawiki/extensions/Wikisource@master] Remove $wgWikisourceEnableOcr feature flag

Reason:

There's no need to remove this config flag.

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