Missing translations for constraints

Created on 7 June 2017, over 7 years ago
Updated 21 October 2024, 2 months ago

Some translations are missing on localize.drupal.org and can't be translated, for example:

  • UserNameUnique: The username %name is already taken.
  • UserMailUnique: The email address %value is already taken.

See https://localize.drupal.org/translate/languages/nl/translate?project=dru...

POTX can extract them but then the filename has to end with Constraint and the message variable has to be named "%message":

  if (substr($name_parts['filename'], -10) == 'Constraint' && $api_version > POTX_API_7) {
    $constraint_extract = TRUE;
  }

Proposed solution:

I suggest to rename the constraints in core to end with "Constraint".
Alternative solution would be to test if the class extends "Constraint".

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇪Belgium mpp

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024