08 · link_text is not translatable (schema type string instead of label)¶
| Project | Smart Menu Links |
| Component | Code |
| Category | Bug report |
| Priority | Normal |
| Status | Reported upstream as #3603175 |
Problem/Motivation¶
The text shown for a smart menu link is link_text. In the config schema (smart_menu_links.smart_menu_link.*), link_text is declared as type: string, so it is not translatable – only label is. On a translated site the menu keeps showing the source text (e.g. "News", "Sponsors" in the Summit site template on a German site), even when label is translated.
Steps to reproduce¶
- Install Drupal CMS with Summit in German (or add a second language).
- Translate the smart menu link "News".
- The main menu still shows "News".
Proposed resolution¶
Declare link_text as type: label.
Remaining tasks¶
Patch + update path not required (schema only).
Additional information¶
Workaround in dcle (hook_config_schema_info_alter()).
Copy to drupal.org
Issue title:
link_text is not translatable (schema type string instead of label)
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>The text shown for a smart menu link is <code>link_text</code>. In the config schema (<code>smart_menu_links.smart_menu_link.*</code>), <code>link_text</code> is declared as <code>type: string</code>, so it is not translatable – only <code>label</code> is. On a translated site the menu keeps showing the source text (e.g. "News", "Sponsors" in the Summit site template on a German site), even when <code>label</code> is translated.</p>
<h3 id="summary-steps-reproduce">Steps to reproduce</h3>
<ol>
<li>Install Drupal CMS with Summit in German (or add a second language).</li>
<li>Translate the smart menu link "News".</li>
<li>The main menu still shows "News".</li>
</ol>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Declare <code>link_text</code> as <code>type: label</code>.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Patch + update path not required (schema only).</p>
<h3>Additional information</h3>
<p>Workaround in <code>dcle</code> (<code>hook_config_schema_info_alter()</code>).</p>