wip translation system

This commit is contained in:
2021-10-06 01:09:20 +02:00
parent 881411ebd3
commit bd47a004bf
9 changed files with 221 additions and 97 deletions
+6
View File
@@ -1,3 +1,6 @@
use std::collections::HashMap;
use crate::tr::TranslationTable;
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(default, deny_unknown_fields)]
pub struct CommonConfig {
@@ -21,6 +24,8 @@ pub struct CommonConfig {
/// Time after which a socket is always closed, even if seemingly alive.
/// This is a work-around for servers that stop sending notifs after a while.
pub socket_retire_time_s: f64,
#[serde(skip)]
pub tr : HashMap<String, TranslationTable>,
}
impl Default for CommonConfig {
@@ -34,6 +39,7 @@ impl Default for CommonConfig {
delay_reopen_error_s: 5.0,
socket_alive_timeout_s: 30.0,
socket_retire_time_s: 120.0,
tr: Default::default(),
}
}
}