localize list of startup pages in Settings

This commit is contained in:
Drew Weymouth
2024-07-24 07:55:43 -07:00
parent 26c3bd8012
commit ff6a204284
4 changed files with 17 additions and 9 deletions
+5
View File
@@ -18,6 +18,7 @@ import (
"fyne.io/fyne/v2/widget"
"github.com/dweymouth/supersonic/backend/mediaprovider"
"github.com/dweymouth/supersonic/res"
"github.com/dweymouth/supersonic/sharedutil"
myTheme "github.com/dweymouth/supersonic/ui/theme"
"golang.org/x/net/html"
)
@@ -264,6 +265,10 @@ func SaveWindowSize(w fyne.Window, wPtr, hPtr *int) {
*hPtr = int(math.RoundToEven(float64(w.Canvas().Size().Height)))
}
func LocalizeSlice(s []string) []string {
return sharedutil.MapSlice(s, func(s string) string { return lang.L(s) })
}
type HSpace struct {
widget.BaseWidget