Twig_Error_Syntax: The text to be translated with "trans" can only contain references to simple variables in Twig_Extensions_TokenParser_Trans->checkTransString()
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2895187. -->
Reported by: [kenorb](https://www.drupal.org/user/191974)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>URL: /admin/structure/block/block-content</p>
<p>PHP 7.2.0alpha2</p>
<pre>The website encountered an unexpected error. Please try again later.<br><br>Twig_Error_Syntax: The text to be translated with "trans" can only contain references to simple variables in Twig_Extensions_TokenParser_Trans->checkTransString() (line 26 of core/themes/classy/templates/views/views-mini-pager.html.twig).<br>Twig_Extensions_TokenParser_Trans->parse(Object) (Line: 190)<br>Twig_Parser->subparse(Array) (Line: 36)<br>Twig_TokenParser_If->parse(Object) (Line: 190)<br>Twig_Parser->subparse(Array) (Line: 36)<br>Twig_TokenParser_If->parse(Object) (Line: 190)<br>Twig_Parser->subparse(NULL, ) (Line: 103)<br>Twig_Parser->parse(Object) (Line: 692)<br>Twig_Environment->parse(Object) (Line: 750)<br>Twig_Environment->compileSource(Object) (Line: 447)<br>Twig_Environment->loadTemplate('core/themes/classy/templates/views/views-mini-pager.html.twig') (Line: 64)<br>twig_render_template('core/themes/classy/templates/views/views-mini-pager.html.twig', Array) (Line: 384)<br>Drupal\Core\Theme\ThemeManager->render('views_mini_pager', Array) (Line: 435)<br>Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)<br>Drupal\Core\Render\Renderer->render(Array) (Line: 490)<br>Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 136)<br>__TwigTemplate_0b39505df84b691c5a3640573ee0790767231d2654971965753660bef51abd95->doDisplay(Array, Array) (Line: 432)<br>Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403)<br>Twig_Template->display(Array) (Line: 411)<br>Twig_Template->render(Array) (Line: 64)<br>twig_render_template('core/themes/classy/templates/views/views-view.html.twig', Array) (Line: 384)<br>Drupal\Core\Theme\ThemeManager->render('views_view', Array) (Line: 435)<br>Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)<br>Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)<br>Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)<br>Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)<br>Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)<br>Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)<br>Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)<br>Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)<br>Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149)<br>Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)<br>Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)<br>Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)<br>Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)<br>Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)<br>Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)<br>Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)<br>Drupal\Core\DrupalKernel->handle(Object) (Line: 19)</pre><p>Twig code:</p>
<pre> <li class="pager__item is-active"><br> {% trans %}<br> Page {{ items.current }}<br> {% endtrans %}<br> </li></pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue