Missing plural translations can cause assertion failure with unclear action

Created on 16 March 2025, 20 days ago

Problem/Motivation

If a plural variant is missing in the translation. The assertion check fails without any clear step to take.
This is the case for older translation files that have been imported on localize.drupal.org without the plural fixes.

Steps to reproduce

  1. Make sure assert works
  2. Setup a Dutch or other language Drupal site
  3. Go to interface translations and search for a plural text like 'Missing or invalid module'
  4. Remove one of the plural options in the translation
  5. Run drush tex
  6. Assertion in drupal/modules/contrib/translation_bliss/src/Drush/Commands/Extraction/Gettext/Translation/Item/TranslationItem.php:32 fails

Proposed resolution

Return a clear message to the developer of the missing string, and if possible how to fix it.

Remaining tasks

  1. Create one of more possible solutions
  2. Choose one solution
  3. Create MR with tests
  4. Review

User interface changes

Drush should return a more dev-friendly message

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands tess bakker

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

Comments & Activities

Production build 0.71.5 2024