@@ -41,6 +41,17 @@ public function transChoice($id, $number, array $parameters = array(), $domain =
if(!isset($ids[1])){
thrownew\InvalidArgumentException(sprintf('The message "%s" cannot be pluralized, because it is missing a plural (e.g. "There is one apple|There are @count apples").',$id));
}
// Normally, calls to formatPlural() need to use literal strings, like
// formatPlural($count, '1 item', '@count items')
// so that the Drupal project POTX string extractor will correctly
// extract the strings for translation and save them in a format that
// formatPlural() can work with. However, this is a special case, because
// Drupal is supporting a constraint message format from Symfony. So
// although $id looks like a variable here, it is actually coming from a
// static string in a constraint class that the POTX extractor knows about
// and has processed to work with formatPlural(), so this specific call to