Skip to content

Hide lang switch separator if only a single lang is used#9

Open
wrobelda wants to merge 1 commit intoWonderfall:masterfrom
wrobelda:lang_separator_fix
Open

Hide lang switch separator if only a single lang is used#9
wrobelda wants to merge 1 commit intoWonderfall:masterfrom
wrobelda:lang_separator_fix

Conversation

@wrobelda
Copy link
Copy Markdown

@wrobelda wrobelda commented Apr 25, 2024

What does this PR change? What problem does it solve?

A language switch separator is displayed even if a website has a single language only. This fixes it by checking for AllTranslations size before adding the <ul class="lang-switch"> element.

Before:
Screenshot 2024-04-25 at 6 05 45 PM

After:
Screenshot 2024-04-25 at 6 05 35 PM

Note that I have absolutely no experience with Golang, hopefully the is up to the standards.

PR Checklist

  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.

@wrobelda wrobelda changed the title Hide lang switch seprator if only a single lang is used Hide lang switch separator if only a single lang is used Apr 25, 2024
@wrobelda wrobelda force-pushed the lang_separator_fix branch from a435b2d to 5dc09b9 Compare April 25, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant