Page MenuHomePhabricator

Add new validator to validate existence of newlines in source and translation
Closed, ResolvedPublic

Description

For the Dissemin project (and probably other projects based on GetText), we will need to add a validator that verifies that,

  1. If the source translation starts / ends with a newline, the translation should too.
  2. If the source translation does not start / end with a newline, the translation should not either.

This Validator will not have any insertable.

Request - https://github.com/dissemin/dissemin/issues/792#issuecomment-524200062

Event Timeline

abi_ created this task.Aug 31 2019, 5:20 AM
abi_ updated the task description. (Show Details)Aug 31 2019, 5:29 AM

Change 533626 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Add new validator to match newlines in translations

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

Here's what the validation message looks like,

Will be adding this to the Dissemin project as part of the following task T231658: Switch to using the new validator framework for Dissemin project

Change 533627 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[translatewiki@master] Add the NewlineMatch validator to Dissemin

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

abi_ triaged this task as Medium priority.Aug 31 2019, 11:30 AM

Change 533626 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Add new validators to match newlines in translations

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

Change 537624 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] Change validator IDs for newline validators in the factory

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

Change 537624 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Change validator IDs for newline validators in the factory

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

abi_ closed this task as Resolved.Sep 18 2019, 3:15 PM

Deployed and tested this on Twn for the Dissemin project (FFS: Gettext),