Visibility mode icons not displaying

Created on 26 December 2022, over 2 years ago
Updated 23 February 2023, about 2 years ago

Problem/Motivation

The visibility mode icons aren't displayed anymore when you translate your OS website.
i.e. "Public", "Community" or "Group members" icons in the visibility dropdown.

The reason is the icons' HTML xlink:href value gets translated.
For example : instead of xlink:href="#icon-community" in english, you'll get xlink:href="#icon-communauté" on your french-translated website.

Switching back to english and your icons are displayed again.

Steps to reproduce

Set a second language (i.e. French) on your OS website
Switch to that language
Translate strings as you'd normally do.

Note: all translation-related modules are enabled except Social Language - Content Translation.

🐛 Bug report
Status

Active

Version

11.5

Component

Translations

Created by

🇧🇪Belgium Axael

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇦Ukraine v.koval

    Yes, this is the main problem. And I have no idea how to translate the values in the code back to the default English language. I will try to solve this somehow, if I have any success, I will report here

  • 🇳🇱Netherlands godseeshears@gmail.com

    godseeshears@gmail.com made their first commit to this issue’s fork.

  • 🇪🇸Spain magulaiz

    I solved this issue editing /sites/default/themes/contrib/socialbase/assets/icons/icons.svg adding the path div for translation (in this case for spanish):

      [...]
      <symbol id="icon-public" viewBox="0 0 24 24">
        <path
          d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" />
      </symbol>
      <symbol id="icon-público" viewBox="0 0 24 24">
        <path
            d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" />
      </symbol>
      [...]
    
Production build 0.71.5 2024