diff options
Diffstat (limited to 'ui/src/format.rs')
| -rw-r--r-- | ui/src/format.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/src/format.rs b/ui/src/format.rs index 138589f..3b49695 100644 --- a/ui/src/format.rs +++ b/ui/src/format.rs @@ -4,7 +4,9 @@ Copyright (C) 2026 metamuffin <metamuffin.org> */ -use crate::locale::{Language, TrString, tr, trs}; +use jellycommon::LANG_ENG; + +use crate::locale::{TrString, tr, trs}; use std::fmt::Write; pub fn format_duration(d: f64) -> String { @@ -53,15 +55,15 @@ fn test_duration_short() { #[test] fn test_duration_long() { assert_eq!( - format_duration_long(61., Language::English).as_str(), + format_duration_long(61., LANG_ENG).as_str(), "1 minute and 1 second" ); assert_eq!( - format_duration_long(121., Language::English).as_str(), + format_duration_long(121., LANG_ENG).as_str(), "2 minutes and 1 second" ); assert_eq!( - format_duration_long(3661., Language::English).as_str(), + format_duration_long(3661., LANG_ENG).as_str(), "1 hour, 1 minute and 1 second" ); } |