Compare commits

...

2 Enmetoj

2 changed files with 56 additions and 0 deletions

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

View File

@ -0,0 +1,24 @@
From f866b98d8340e561f1ae6428fb9577d0e2479941 Mon Sep 17 00:00:00 2001
From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com>
Date: Wed, 31 Jan 2024 01:21:36 -0600
Subject: [PATCH 2/2] Aldonas Esperanton al la lingvolisto
---
modules/setting/i18n.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/setting/i18n.go b/modules/setting/i18n.go
index c3076c0ab..8457f75bd 100644
--- a/modules/setting/i18n.go
+++ b/modules/setting/i18n.go
@@ -17,6 +17,7 @@ var defaultI18nLangNames = []string{
"uk-UA", "Українська",
"ja-JP", "日本語",
"es-ES", "Español",
+ "eo", "Esperanto",
"pt-BR", "Português do Brasil",
"pt-PT", "Português de Portugal",
"pl-PL", "Polski",
--
2.43.0