Skip to content

Add option to translate the mobile menu title #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BlueFox4
Copy link

This PR introduces the option to translate the mobile menu title (which was hard-coded to 'Menu' before) by setting the $.Site.Params.menuTitle variable. If this is not done - nothing changes, nothing breaks.

Something missing? Please tell me!

@p01yak0v
Copy link

The similar variable $.Site.Params.menuMore is already defined and serves the same purpose. This variable should be used for consistency between desktop and mobile menu.

By the way, I've fixed this "issue" in earlier PR (#543), so you can upvote it to proceed with merge.

@BlueFox4
Copy link
Author

@p01yak0v

Yes, I saw this PR before, but at least for me the following strings weren't the exact same thing:

  • the title of the mobile menu (which only but always shows up on mobile)
  • the title of the "more" menu (which only shows up on desktop AND if the number of menu items exceeds the $.Site.Params.showMenuItems limit

That's why I introduced the menuTitle variable in this PR.

I guess maybe something in the middle would be perfect; what I would suggest:

  • introduce the $.Site.Params.menuTitle variable with following usage:
    • mobile: as the title of the mobile menu
    • desktop: as the title of the submenu, appearing on desktop when the maximum limit is exceeded (as described above), but if and only if $.Site.Params.showMenuItems is set to 0 (also, a button saying "Show more" is kind of confusing when there's nothing to extend (some menu item already shown), at least for me)
  • keep the $.Site.Params.menuMore with following usage:
    • desktop: in all cases different from the one described above (aka $.Site.Params.showMenuItems > 0

Would that make sense to you?

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.

2 participants