Use the rocket_i18n crate

This commit is contained in:
Bat
2018-06-17 15:28:44 +01:00
parent 14c3fd5c8f
commit cafb0e2277
4 changed files with 20 additions and 133 deletions
+3 -3
View File
@@ -25,6 +25,7 @@ extern crate openssl;
extern crate reqwest;
extern crate rocket;
extern crate rocket_contrib;
extern crate rocket_i18n;
extern crate serde;
#[macro_use]
extern crate serde_derive;
@@ -40,7 +41,6 @@ use std::env;
mod activity_pub;
mod db_conn;
mod i18n;
mod models;
mod schema;
mod routes;
@@ -130,8 +130,8 @@ fn main() {
])
.manage(init_pool())
.attach(Template::custom(|engines| {
i18n::tera(&mut engines.tera);
rocket_i18n::tera(&mut engines.tera);
}))
.attach(i18n::I18n::new("plume"))
.attach(rocket_i18n::I18n::new("plume"))
.launch();
}