i18n: translate mail subjects

This commit is contained in:
Vincent Breitmoser 2019-09-02 22:48:13 +02:00
parent 77e9c13b5b
commit 331ef566ef
No known key found for this signature in database
GPG Key ID: 7BD18320DEADFA11
1 changed files with 6 additions and 8 deletions

View File

@ -9,11 +9,12 @@ use serde::Serialize;
use uuid::Uuid;
use crate::counters;
use rocket_i18n::I18n;
use gettext_macros::i18n;
use crate::database::types::Email;
use crate::Result;
use rocket_i18n::I18n;
mod context {
#[derive(Serialize, Clone)]
pub struct Verification {
@ -94,8 +95,7 @@ impl Service {
self.send(
&vec![userid],
// i18n!(i18n.catalog, "Verify {} for your key on {}"; userid, self.domain),
&format!("Verify {} for your key on {}", userid, self.domain),
&i18n!(i18n.catalog, "Verify {} for your key on {}"; userid, self.domain),
"verify",
i18n.lang,
ctx,
@ -121,8 +121,7 @@ impl Service {
self.send(
&[recipient],
// i18n!(i18n.catalog, "Manage your key on {}"; self.domain),
&format!("Manage your key on {}", self.domain),
&i18n!(i18n.catalog, "Manage your key on {}"; self.domain),
"manage",
i18n.lang,
ctx,
@ -148,8 +147,7 @@ impl Service {
self.send(
&vec![userid],
// i18n!(i18n.catalog, "Your key upload on {}"; self.domain),
&format!("Your key upload on {}", self.domain),
&i18n!(i18n.catalog, "Your key upload on {}"; self.domain),
"welcome",
i18n.lang,
ctx,