Page MenuHomePhabricator

Allow excluding certain messages from validation
Closed, ResolvedPublicFeature

Description

Feature summary:
Opposite of T231705: Limit validation to certain messages

We want to be able to exclude running certain validation on certain messages

Use case(s):

The newly added NotEmptyValidator should not apply on optional messages.

Implementation details:
This could be implemented in a manner similar to the existing keymatch functionality.

Example:

keymatch:
  - 'untranslated' # Matches key untranslated directly
  - 
    type: 'wildcard'
    pattern: '*translated*' # Matches any key that has the translated in it

Other notes,

  • Exclusion list will be specific for validator.
  • Check doesKeyMatch method in ValidationRunner.php that can be reused for this.
  • For now, exclusion list will not be configurable on language basis. So it is not possible to configure validators to not run for a specific key for a specific language.
  • Migrate validation-exclusion-list.php. Create a task for this.

Event Timeline

Pginer-WMF raised the priority of this task from Medium to High.Oct 4 2021, 11:45 AM
abi_ updated the task description. (Show Details)

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

[mediawiki/extensions/Translate@master] Add option to exclude messages from validation

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

Change 730034 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add support to exclude messages from validation

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

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

[translatewiki@master] core: Move links & plural validation exclusion to group configuration

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

Change 737618 merged by jenkins-bot:

[translatewiki@master] core: Move plural validation exclusion to group configuration

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

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

[translatewiki@master] core: Move plural validation exclusion to group configuration

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

Change 737622 merged by jenkins-bot:

[translatewiki@master] core: Move plural validation exclusion to group configuration

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