Translation support + french.
This commit is contained in:
parent
e9873c1943
commit
f059d3c61f
16 changed files with 380 additions and 169 deletions
|
|
@ -6,7 +6,9 @@ pub const DB_DIRECTORY: &str = "data";
|
|||
pub const DB_FILENAME: &str = "recipes.sqlite";
|
||||
pub const SQL_FILENAME: &str = "sql/version_{VERSION}.sql";
|
||||
pub const VALIDATION_TOKEN_DURATION: i64 = 60 * 60; // [s]. (1 jour).
|
||||
|
||||
pub const COOKIE_AUTH_TOKEN_NAME: &str = "auth_token";
|
||||
pub const COOKIE_LANG_NAME: &str = "lang";
|
||||
|
||||
pub const VALIDATION_PASSWORD_RESET_TOKEN_DURATION: i64 = 60 * 60; // [s]. (1 jour).
|
||||
|
||||
|
|
@ -22,6 +24,7 @@ pub const REVERSE_PROXY_IP_HTTP_FIELD: &str = "x-real-ip"; // Set by the reverse
|
|||
|
||||
pub const MAX_DB_CONNECTION: u32 = 1; // To avoid database lock.
|
||||
|
||||
// TODO: remove, should be replaced by the translation module.
|
||||
pub static LANGUAGES: LazyLock<[(&str, &str); 2]> = LazyLock::new(|| {
|
||||
let mut langs = [("Français", "fr"), ("English", "en")];
|
||||
langs.sort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue