Problem/Motivation

String arguments to StringTranslationTrait::formatPlural (and PluralTranslatableMarkup) should be checked to be literal like the string argument to t (and TranslatableMarkup).

Steps to reproduce

Proposed resolution

Add a “Drupal.Semantics.FunctionPluralTranslation”, say, sniff building on Drupal.Semantics.FunctionT (Drupal/Sniffs/Semantics/FunctionTSniff.php) to check the arguments to formatPlural and report warnings if non-literal strings are passed.

Remaining tasks

Implement the proposed solution.

Issue fork coder-3565676

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 3565676-plural-checks Comparecompare
  • 9.x Comparecompare

Comments

rimi@aarhus.dk created an issue.