🇸🇮Slovenia @MrMiso

Account created on 3 September 2015, about 9 years ago
#

Recent comments

🇸🇮Slovenia MrMiso

I checked the code and I also used the bootstrap theme and I found the following.

If code removes url (unset($links[$langcode]['url'])) then at least in bootstrap theme the link doesn't get generated as one of links available to links.html.twig through links variable. It is a bit dirty hack but I removed unset of url and overrided the links twig for language block as following:

links--language-block.html.twig

{% if links -%}
  {%- if heading -%}
    {%- if heading.level -%}
      <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
    {%- else -%}
      <h2{{ heading.attributes }}>{{ heading.text }}</h2>
    {%- endif -%}
  {%- endif -%}
  {%- if attributes.hasClass('inline') -%}
  <ul{{ attributes.addClass('list-inline') }}>
  {%- else -%}
  <ul{{ attributes }}>
  {%- endif -%}
    {%- for key, item in links -%}
      <li{{ item.attributes.addClass(key|clean_class) }}>
        {%- if item.link and not item.text_attributes.hasClass('language-link--untranslated') -%}
          {{ item.link }}
        {%- elseif item.text_attributes -%}
          <span{{ item.text_attributes }}><s>{{ item.text }}</s></span>
        {%- else -%}
          <s>{{ item.text }}</s>
        {%- endif -%}
      </li>
    {%- endfor -%}
  </ul>
{%- endif %}

Basically if it has untranslated class output it as a text instead of link.

🇸🇮Slovenia MrMiso

Same problem. If you select Select language without link the whole language gets remove instead of just removing the link.

Production build 0.71.5 2024