Problem/Motivation

We have following in custom_block_delete_form() after #1994146-11: WSOD after deleting a custom block content entity

  $form['message'] = array(
    '#type' => 'markup',
    '#markup' => format_plural(count($instances), 'This will also remove 1 placed block instance.', 'This will also remove @count placed block instances.'),
    '#access' => !empty($instances),
  );

Do the language injected to theme|template layer

Proposed resolution

Provide a format_plural analog in twig to properly theme form

#1927584: Add support for the Twig {% trans %} tag extension

Comments

Gábor Hojtsy’s picture

I did not read in #1994146: WSOD after deleting a custom block content entity that the format_plural aware render element was suggested. There is not even a t-aware render element?! Also depending on how is this resolved, sounds like this would make parsing out those strings that so much harder :/

Gábor Hojtsy’s picture

Issue summary: View changes

Updated issue summary.

thedavidmeister’s picture

Title: Decide on a language-aware renderable element » Decide on a language-aware renderable element in Twig templates

Just making the title a little clearer.

thedavidmeister’s picture

Issue summary: View changes

added

joelpittet’s picture

Issue summary: View changes

I may be wrong at the purpose of this issue but I think it may be covered in the trans block:
@see https://drupal.org/node/2047135

Cottser’s picture

Status: Active » Closed (duplicate)
Related issues: +#1927584: Add support for the Twig {% trans %} tag extension

Yes, I think trans covers this, and handles plural as well. If you disagree please reopen and update the issue summary with more details based on the current situation :)