فهرست منبع

fix(yay): give priority to LC_MESSAGES. fixes #1442

jguer 4 سال پیش
والد
کامیت
c221d5ebbd
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      main.go

+ 5 - 1
main.go

@@ -19,7 +19,11 @@ func initGotext() {
 		localePath = envLocalePath
 	}
 
-	gotext.Configure(localePath, os.Getenv("LANG"), "yay")
+	if os.Getenv("LC_MESSAGES") != "" {
+		gotext.Configure(localePath, os.Getenv("LC_MESSAGES"), "yay")
+	} else {
+		gotext.Configure(localePath, os.Getenv("LANG"), "yay")
+	}
 }
 
 func initAlpm(cmdArgs *settings.Arguments, pacmanConfigPath string) (*pacmanconf.Config, bool, error) {