From 798b3e6dd7df7b9f3a02143edb631845a711cb0b Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Mon, 13 Mar 2023 02:26:19 +0200 Subject: [PATCH] Fix lint error on macOS (#3533) --- internal/desktop/systray_nonlinux.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/desktop/systray_nonlinux.go b/internal/desktop/systray_nonlinux.go index 78ccfbebc..a565a930c 100644 --- a/internal/desktop/systray_nonlinux.go +++ b/internal/desktop/systray_nonlinux.go @@ -9,6 +9,8 @@ import ( "github.com/kermieisinthehouse/systray" "github.com/stashapp/stash/internal/manager/config" "github.com/stashapp/stash/pkg/logger" + "golang.org/x/text/cases" + "golang.org/x/text/language" ) // MUST be run on the main goroutine or will have no effect on macOS @@ -55,7 +57,8 @@ func systrayInitialize(shutdownHandler ShutdownHandler, faviconProvider FaviconP if !c.IsNewSystem() { menuItems = c.GetMenuItems() for _, item := range menuItems { - titleCaseItem := strings.Title(strings.ToLower(item)) + c := cases.Title(language.Und) + titleCaseItem := c.String(strings.ToLower(item)) curr := systray.AddMenuItem(titleCaseItem, "Open to "+titleCaseItem) go func(item string) { for {