fix: use LANG prefix instead of full value
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
3wc
2025-09-05 17:07:04 -04:00
parent bef92d53a8
commit ced36812c5

View File

@ -36,6 +36,10 @@ func LoadLocale() *gotext.Mo {
}
locale := os.Getenv("LANG")
if lastUnderscore := strings.LastIndex(locale, "_"); lastUnderscore != -1 {
locale = locale[0:lastUnderscore]
}
if locale != "" {
if slices.Contains(linguas, locale) {
Locale = locale