50 · "By", slider buttons and navigation labels are hard-coded in English¶
| Project | Vartheme BS5 (theme vartheme_bs5, used by the Varbase site templates) |
| Component | Code |
| Category | Bug report |
| Priority | Normal |
| Status | Draft, not filed on drupal.org yet |
Problem/Motivation¶
A few interface texts of the theme are written into the component templates without |t, so they stay English on a site in another language:
hero-blog.twig: the author prefix "By".hero-slider-container.twig: the hidden button labels "Previous" and "Next".navbar.twig:aria-label="Toggle navigation".user.twig:aria-label="User actions".
Steps to reproduce¶
- Install Drupal CMS with Varbase in a language other than English (e.g. German).
- Inspect the hero slider on the home page and the navigation toggle with a screen reader or the browser's accessibility tree.
Proposed resolution¶
Wrap the texts in t(), e.g.
{{ 'By'|t }}
{{ 'Previous'|t }}
aria-label="{{ 'Toggle navigation'|t }}"
Workaround: the German installer dcgi rewrites the templates this way before the content import; Drupal core already has translations for all but "User actions", which dcle ships.
Additional information¶
Found with Vartheme BS5 on Drupal CMS 2.2.1 and Canvas 1.12.0 (October 2026). The themes of The Rightup, Educare and Horizon Aid (vartheme_bs5_rightup, vartheme_bs5_educare, vartheme_bs5_horizonaid) are copies and have the same texts.
Copy to drupal.org
Issue title:
"By", slider buttons and navigation labels are hard-coded in English
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>A few interface texts of the theme are written into the component templates without <code>|t</code>, so they stay English on a site in another language:</p>
<ul>
<li><code>hero-blog.twig</code>: the author prefix "By".</li>
<li><code>hero-slider-container.twig</code>: the hidden button labels "Previous" and "Next".</li>
<li><code>navbar.twig</code>: <code>aria-label="Toggle navigation"</code>.</li>
<li><code>user.twig</code>: <code>aria-label="User actions"</code>.</li>
</ul>
<h3 id="summary-steps-reproduce">Steps to reproduce</h3>
<ol>
<li>Install Drupal CMS with Varbase in a language other than English (e.g. German).</li>
<li>Inspect the hero slider on the home page and the navigation toggle with a screen reader or the browser's accessibility tree.</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Wrap the texts in <code>t()</code>, e.g.</p>
<code>{{ 'By'|t }}
{{ 'Previous'|t }}
aria-label="{{ 'Toggle navigation'|t }}"</code>
<p>Workaround: the German installer <a href="https://www.drupal.org/project/dcgi">dcgi</a> rewrites the templates this way before the content import; Drupal core already has translations for all but "User actions", which <a href="https://www.drupal.org/project/dcle">dcle</a> ships.</p>
<h3>Additional information</h3>
<p>Found with Vartheme BS5 on Drupal CMS 2.2.1 and Canvas 1.12.0 (October 2026). The themes of The Rightup, Educare and Horizon Aid (<code>vartheme_bs5_rightup</code>, <code>vartheme_bs5_educare</code>, <code>vartheme_bs5_horizonaid</code>) are copies and have the same texts.</p>