i18n: Add dummy language for checking translation keys (#5785)

This commit is contained in:
xtex 2024-11-03 09:36:09 +08:00
parent cea08caea3
commit 42eed7dbea
5 changed files with 123 additions and 2 deletions

View file

@ -26,8 +26,10 @@ func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale {
}
}
// Check again in case someone changes the supported language list.
if lang != "" && !i18n.DefaultLocales.HasLang(lang) {
if lang == "dummy" {
changeLang = false
} else if lang != "" && !i18n.DefaultLocales.HasLang(lang) {
// Check again in case someone changes the supported language list.
lang = ""
changeLang = false
}