Flikas Forgejon supozi EO, se lingvo estas EN_US

This commit is contained in:
Jaidyn Ann 2024-01-31 01:26:41 -06:00
parent 3c62e18f88
commit 05c82ab425

View File

@ -0,0 +1,32 @@
From d7a96b7d02daab7dbc00e4a3c68b65e1c40ed756 Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com>
Date: Wed, 31 Jan 2024 01:20:18 -0600
Subject: [PATCH 1/2] Agordas Esperanton kiel la implicita lingvo
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Se onia la lingvo de onia retfoliumilo estas
en_US, ni supozu Esperanton anstataŭe.
Ajnan alian lingvoagordon ni obeu.
---
modules/web/middleware/locale.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/web/middleware/locale.go b/modules/web/middleware/locale.go
index 34a16f04e..f5fb1d8f0 100644
--- a/modules/web/middleware/locale.go
+++ b/modules/web/middleware/locale.go
@@ -38,6 +38,9 @@ func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale {
tags, _, _ := language.ParseAcceptLanguage(req.Header.Get("Accept-Language"))
tag := translation.Match(tags...)
lang = tag.String()
+ if lang == "en-US" {
+ lang = "eo"
+ }
}
if changeLang {
--
2.43.0