localize list of startup pages in Settings
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/dweymouth/supersonic/backend"
|
||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||
"github.com/dweymouth/supersonic/sharedutil"
|
||||
"github.com/dweymouth/supersonic/ui/controller"
|
||||
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
||||
"github.com/dweymouth/supersonic/ui/util"
|
||||
@@ -58,8 +57,7 @@ func (a *albumsPageAdapter) SortOrders() ([]string, int) {
|
||||
sortOrder = 0
|
||||
}
|
||||
|
||||
translatedOrders := sharedutil.MapSlice(orders, func(s string) string { return lang.L(s) })
|
||||
return translatedOrders, sortOrder
|
||||
return util.LocalizeSlice(orders), sortOrder
|
||||
}
|
||||
|
||||
func (a *albumsPageAdapter) SaveSortOrder(orderIdx int) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"github.com/dweymouth/supersonic/backend"
|
||||
"github.com/dweymouth/supersonic/backend/mediaprovider"
|
||||
"github.com/dweymouth/supersonic/sharedutil"
|
||||
"github.com/dweymouth/supersonic/ui/controller"
|
||||
myTheme "github.com/dweymouth/supersonic/ui/theme"
|
||||
"github.com/dweymouth/supersonic/ui/util"
|
||||
@@ -54,8 +53,7 @@ func (a *artistsPageAdapter) SortOrders() ([]string, int) {
|
||||
sortOrder = 0
|
||||
}
|
||||
|
||||
translatedOrders := sharedutil.MapSlice(orders, func(s string) string { return lang.L(s) })
|
||||
return translatedOrders, sortOrder
|
||||
return util.LocalizeSlice(orders), sortOrder
|
||||
}
|
||||
|
||||
func (a *artistsPageAdapter) SaveSortOrder(orderIdx int) {
|
||||
|
||||
Reference in New Issue
Block a user