1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

templates: translate a lot more stuff

This commit is contained in:
Quentin Gliech
2023-10-05 17:20:02 +02:00
parent 6ff549f5df
commit b2cd8d83f7
32 changed files with 385 additions and 97 deletions

View File

@ -239,6 +239,7 @@ mod jobs {
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct VerifyEmailJob {
user_email_id: Ulid,
language: Option<String>,
}
impl VerifyEmailJob {
@ -247,9 +248,23 @@ mod jobs {
pub fn new(user_email: &UserEmail) -> Self {
Self {
user_email_id: user_email.id,
language: None,
}
}
/// Set the language to use for the email.
#[must_use]
pub fn with_language(mut self, language: String) -> Self {
self.language = Some(language);
self
}
/// The language to use for the email.
#[must_use]
pub fn language(&self) -> Option<&str> {
self.language.as_deref()
}
/// The ID of the email address to verify.
#[must_use]
pub fn user_email_id(&self) -> Ulid {