Skip to content

23 · "Follow us on" in the social menu is not translatable

Project Morphos (theme of Convivial Gov, Morpht)
Component Templates
Category Bug report
Priority Normal
Status Reported upstream as #3582425

Problem/Motivation

templates/navigation/menu--social.html.twig, line 28 builds the aria-label "Follow us on …" without |t. The network name is correct (item.original_link.getTitle()), but the text stays English on translated sites.

Proposed resolution

aria-label="{{ 'Follow us on @network'|t({'@network': item.original_link.getTitle()|striptags|trim}) }}"
Copy to drupal.org

Issue title:

"Follow us on" in the social menu is not translatable

Issue summary (paste it into the "Issue summary" field; project, component, category and priority are in the table above):

<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p><code>templates/navigation/menu--social.html.twig</code>, line 28 builds the aria-label "Follow us on …" without <code>|t</code>. The network name is correct (<code>item.original_link.getTitle()</code>), but the text stays English on translated sites.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<code>aria-label="{{ 'Follow us on @network'|t({'@network': item.original_link.getTitle()|striptags|trim}) }}"</code>