Page MenuHomePhabricator

Migrate Pywikibot to the new validator framework
Closed, ResolvedPublic

Description

Migrate the existing checker / suggester code to instead use the new validator framework. We need to add,

  1. A validator to replicate - pythonInterpolationCheck. We can add a custom validator and use that instead of defining a regex everytime. Add this as enforced and insertable.
  2. Replace braceBalanceCheck with BraceBalanceValidator

We'll need to update the YAML configuration file located here - https://phabricator.wikimedia.org/diffusion/GTWN/browse/master/groups/

Documentation: https://www.mediawiki.org/wiki/Help:Extension:Translate/Validators
Example patch: https://gerrit.wikimedia.org/r/c/translatewiki/+/549930

Details

Related Gerrit Patches:
translatewiki : masterUpdate Pywikibot to the new validator framework
mediawiki/extensions/Translate : masterAdd Python interpolation validator

Event Timeline

abi_ created this task.Nov 11 2019, 8:34 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 11 2019, 8:34 AM

I assume you will mentor this (and other similar tasks) in Google Code-In 2019. I've invited you into Google Code-In mentor interface, please create the tasks there as well. Thanks!

abi_ added a comment.Nov 11 2019, 10:57 AM

@Urbanecm - Got the invite, but while registering, the UI stops responding after accepting the terms of service.

Request to PUT https://codein.withgoogle.com/api/program/current/organization_membership/<<XYZ>>/accept/ returns a 403 Forbidden error. The body of the request has an invitation token.

@Urbanecm - Got the invite, but while registering, the UI stops responding after accepting the terms of service.
Request to PUT https://codein.withgoogle.com/api/program/current/organization_membership/<<XYZ>>/accept/ returns a 403 Forbidden error. The body of the request has an invitation token.

Could you please try it again in an inkognito window? If that fails, please let Google know via gci-support@google.com. Thanks!

abi_ added a comment.Nov 11 2019, 1:21 PM

I just revisited the Google Code-In page, and I have access. The redirection was probably failing earlier. I'll create the tasks in Google Code-In later today.

Great, thanks @abi_! Let me know if you have any issues with the tasks.

abi_ updated the task description. (Show Details)Nov 11 2019, 4:16 PM

I've raised the time available for the task from 3 to 5, and published the task. Thanks for volutneering, @abi_!

Change 568863 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add Python interpolation validator

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

Change 568875 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[translatewiki@master] Update Pywikibot to the new validator framework

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

abi_ claimed this task.Thu, Jan 30, 7:56 AM
abi_ triaged this task as Medium priority.

Change 568863 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add Python interpolation validator

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

Change 568875 merged by jenkins-bot:
[translatewiki@master] Update Pywikibot to the new validator framework

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

Zoranzoki21 closed this task as Resolved.Mon, Feb 10, 11:57 AM