Skip to content

Commit

Permalink
DefaultLanguage is now case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Sep 28, 2022
1 parent ba28e9a commit bfeb8ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/serve_index.go
Expand Up @@ -38,7 +38,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"enableFavourites": conf.Server.EnableFavourites,
"enableStarRating": conf.Server.EnableStarRating,
"defaultTheme": conf.Server.DefaultTheme,
"defaultLanguage": conf.Server.DefaultLanguage,
"defaultLanguage": strings.ToLower(conf.Server.DefaultLanguage),
"enableCoverAnimation": conf.Server.EnableCoverAnimation,
"gaTrackingId": conf.Server.GATrackingID,
"losslessFormats": strings.ToUpper(strings.Join(consts.LosslessFormats, ",")),
Expand Down
2 changes: 1 addition & 1 deletion server/serve_index_test.go
Expand Up @@ -160,7 +160,7 @@ var _ = Describe("serveIndex", func() {
})

It("sets the defaultLanguage", func() {
conf.Server.DefaultLanguage = "pt"
conf.Server.DefaultLanguage = "PT"
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()

Expand Down

0 comments on commit bfeb8ef

Please sign in to comment.