You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-09 04:22:45 +03:00
handlers/templates: infer the language from the Accept-Language browser header
This commit is contained in:
@@ -33,6 +33,7 @@ use hyper::{
|
||||
use mas_axum_utils::{
|
||||
cookies::CookieManager, http_client_factory::HttpClientFactory, ErrorWrapper,
|
||||
};
|
||||
use mas_i18n::Translator;
|
||||
use mas_keystore::{Encrypter, JsonWebKey, JsonWebKeySet, Keystore, PrivateKey};
|
||||
use mas_matrix::{HomeserverConnection, MockHomeserverConnection};
|
||||
use mas_policy::{InstantiateError, Policy, PolicyFactory};
|
||||
@@ -319,6 +320,12 @@ impl FromRef<TestState> for Templates {
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRef<TestState> for Arc<Translator> {
|
||||
fn from_ref(input: &TestState) -> Self {
|
||||
input.templates.translator()
|
||||
}
|
||||
}
|
||||
|
||||
impl FromRef<TestState> for Keystore {
|
||||
fn from_ref(input: &TestState) -> Self {
|
||||
input.key_store.clone()
|
||||
|
Reference in New Issue
Block a user