Update dependencies and i18n logic

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-01-24 22:06:07 -03:00
parent 5ce3860f2c
commit dd71ac8820
3 changed files with 5 additions and 7 deletions

View file

@ -24,7 +24,7 @@ anyhow = { workspace = true }
thiserror = { workspace = true }
log = { workspace = true }
env_logger = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
chrono = { workspace = true, features = ["serde", "clock"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
uuid = { workspace = true, features = ["serde", "v4"] }
@ -35,7 +35,7 @@ tokio = { workspace = true, features = ["sync", "time"] }
diesel = { workspace = true, features = ["postgres", "uuid", "chrono", "serde_json", "r2d2"], optional = true }
# Optional: HTTP Client
reqwest = { workspace = true, features = ["json"], optional = true }
reqwest = { workspace = true, features = ["json", "rustls-tls"], optional = true }
# Optional: Validation
validator = { workspace = true, optional = true }

View file

@ -98,7 +98,7 @@ impl LocaleBundle {
let path = entry.path();
if path.extension().map_or(false, |ext| ext == "ftl") {
if path.extension().is_some_and(|ext| ext == "ftl") {
let content = fs::read_to_string(&path).map_err(|e| {
BotError::config(format!(
"failed to read translation file {}: {e}",

View file

@ -72,10 +72,8 @@ impl Locale {
) -> &'a Locale {
for req in requested {
for avail in available {
if req.language == avail.language {
if req.region == avail.region {
return avail;
}
if req.language == avail.language && req.region == avail.region {
return avail;
}
}
}