From 709a9ad6590524102c09d771b49bf3c944434e9a Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 5 Sep 2025 17:07:04 -0400 Subject: [PATCH] fix: use LANG prefix instead of full value --- pkg/i18n/i18n.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index 43fefbca..be7bec95 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -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