fix: render only base language in html (#3759)

This commit is contained in:
Livio Amstutz 2022-06-01 15:32:18 +02:00 committed by GitHub
parent 32afa77b97
commit d65761f388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,12 +332,13 @@ func (l *Login) getUserData(r *http.Request, authReq *domain.AuthRequest, title
}
func (l *Login) getBaseData(r *http.Request, authReq *domain.AuthRequest, title string, errType, errMessage string) baseData {
lang, _ := l.renderer.ReqLang(l.getTranslator(r.Context(), authReq), r).Base()
baseData := baseData{
errorData: errorData{
ErrID: errType,
ErrMessage: errMessage,
},
Lang: l.renderer.ReqLang(l.getTranslator(r.Context(), authReq), r).String(),
Lang: lang.String(),
Title: title,
Theme: l.getTheme(r),
ThemeMode: l.getThemeMode(r),