Locales
This commit is contained in:
parent
c11c8f24f1
commit
9882b575de
@ -14,6 +14,7 @@ members = [
|
|||||||
"actors/search_manager",
|
"actors/search_manager",
|
||||||
"actors/token_manager",
|
"actors/token_manager",
|
||||||
"actors/fs_manager",
|
"actors/fs_manager",
|
||||||
|
"actors/lang_provider",
|
||||||
# artifacts
|
# artifacts
|
||||||
"db-seed",
|
"db-seed",
|
||||||
"api",
|
"api",
|
||||||
|
@ -14,8 +14,5 @@ actix-rt = { version = "2.7", features = [] }
|
|||||||
|
|
||||||
thiserror = { version = "1.0.31" }
|
thiserror = { version = "1.0.31" }
|
||||||
|
|
||||||
uuid = { version = "0.8", features = ["serde"] }
|
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
|
||||||
|
|
||||||
log = { version = "0.4", features = [] }
|
log = { version = "0.4", features = [] }
|
||||||
pretty_env_logger = { version = "0.4", features = [] }
|
pretty_env_logger = { version = "0.4", features = [] }
|
||||||
|
@ -14,6 +14,8 @@ actix-rt = { version = "2.7", features = [] }
|
|||||||
|
|
||||||
thiserror = { version = "1.0.31" }
|
thiserror = { version = "1.0.31" }
|
||||||
|
|
||||||
|
serde = { version = "1.0.137", features = ["derive"] }
|
||||||
|
|
||||||
uuid = { version = "0.8", features = ["serde"] }
|
uuid = { version = "0.8", features = ["serde"] }
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ use std::collections::HashSet;
|
|||||||
|
|
||||||
use database_manager::{query_db, Database};
|
use database_manager::{query_db, Database};
|
||||||
use model::{PaymentMethod, ShoppingCartId};
|
use model::{PaymentMethod, ShoppingCartId};
|
||||||
|
use serde::Serialize;
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! cart_async_handler {
|
macro_rules! cart_async_handler {
|
||||||
@ -55,7 +56,8 @@ macro_rules! query_cart {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error, Serialize)]
|
||||||
|
#[serde(rename_all = "kebab-case")]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
#[error("System can't ensure shopping cart existence")]
|
#[error("System can't ensure shopping cart existence")]
|
||||||
ShoppingCartFailed,
|
ShoppingCartFailed,
|
||||||
@ -69,10 +71,6 @@ pub enum Error {
|
|||||||
Db(#[from] database_manager::Error),
|
Db(#[from] database_manager::Error),
|
||||||
#[error("Unable to update cart item")]
|
#[error("Unable to update cart item")]
|
||||||
UpdateFailed,
|
UpdateFailed,
|
||||||
#[error("Failed to change quantity")]
|
|
||||||
ChangeQuantity,
|
|
||||||
#[error("Shopping cart item {0} does not exists")]
|
|
||||||
NotExists(model::ShoppingCartItemId),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
0
actors/lang_provider/locales/en/cart.ftl
Normal file
0
actors/lang_provider/locales/en/cart.ftl
Normal file
0
actors/lang_provider/locales/pl/cart.ftl
Normal file
0
actors/lang_provider/locales/pl/cart.ftl
Normal file
1
actors/lang_provider/src/lib.rs
Normal file
1
actors/lang_provider/src/lib.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub struct LangProvider;
|
Loading…
Reference in New Issue
Block a user