Page MenuHomePhabricator

Migrate Nocc 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. Add a custom validator to Translate extension for printf check - /%(\d+\$)?[sduf]/U
  2. An insertable for - /%\d\$s/; eg: %1$s
  3. An insertable and validator for - %Y-%m-%d. Must ensure that we use only %Y-%m-%d or valid date formats
  4. An insertable (not enforced) for HTML tags. Noticed anchor, strong tags
  5. 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

Event Timeline

abi_ triaged this task as Medium priority.Dec 16 2019, 3:30 AM

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

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

Change 558021 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[translatewiki@master] Replace checkers for Nocc with validators

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

Change 557799 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add PrintfValidator

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

Change 558021 merged by jenkins-bot:
[translatewiki@master] Replace checkers for Nocc with validators

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

This is working well on translatewiki.net server.

image.png (417×1 px, 29 KB)

image.png (439×1 px, 77 KB)