contrast added

This commit is contained in:
Priec
2026-05-16 17:40:15 +02:00
parent 70920ede87
commit 08884536d7
2 changed files with 19 additions and 3 deletions

View File

@@ -93,12 +93,13 @@ pub struct CalendarPage {
pub rows: Vec<Row>,
}
/// Resolves the UI language from the `lang` cookie (`sk` or `en`, default `en`).
/// Resolves the UI language from the `lang` cookie. Slovak is the default;
/// English applies only when the cookie explicitly asks for it.
#[must_use]
pub fn current_lang(jar: &CookieJar) -> String {
match jar.get("lang").map(|c| c.value().to_string()) {
Some(ref l) if l == "sk" => "sk".to_string(),
_ => "en".to_string(),
Some(ref l) if l == "en" => "en".to_string(),
_ => "sk".to_string(),
}
}