File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package translation
66
77import (
88 "sort"
9+ "strings"
910
1011 "code.gitea.io/gitea/modules/log"
1112 "code.gitea.io/gitea/modules/options"
3334 supportedTags []language.Tag
3435)
3536
36- // AllLangs returns all supported langauages
37+ // AllLangs returns all supported languages sorted by name
3738func AllLangs () []LangType {
3839 return allLangs
3940}
@@ -75,9 +76,9 @@ func InitLocales() {
7576 allLangs = append (allLangs , LangType {v , names [i ]})
7677 }
7778
78- // Sort languages according to their name - needed for the user settings
79+ // Sort languages case insensitive according to their name - needed for the user settings
7980 sort .Slice (allLangs , func (i , j int ) bool {
80- return allLangs [i ].Name < allLangs [j ].Name
81+ return strings . ToLower ( allLangs [i ].Name ) < strings . ToLower ( allLangs [j ].Name )
8182 })
8283}
8384
You can’t perform that action at this time.
0 commit comments