From d32fa969d62eea319fe271b50c00bf146fd455cc Mon Sep 17 00:00:00 2001 From: YoursFunny Date: Sat, 8 Aug 2026 00:07:27 +0800 Subject: [PATCH] fix: correct singular 'entry' in clear-cache replies plural() returned "" for one, rendering '1 entr.'; return "y" so the suffix composes to '1 entry' / '2 entries'. --- crates/xmedia-bot/src/handlers.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/xmedia-bot/src/handlers.rs b/crates/xmedia-bot/src/handlers.rs index 97c9de8..aee380d 100644 --- a/crates/xmedia-bot/src/handlers.rs +++ b/crates/xmedia-bot/src/handlers.rs @@ -388,9 +388,9 @@ async fn execute_command( Ok(()) } -/// `""` for one, `"ies"` for anything else — "1 entry" / "2 entries". +/// `"y"` for one, `"ies"` for anything else — "1 entry" / "2 entries". fn plural(n: usize) -> &'static str { - if n == 1 { "" } else { "ies" } + if n == 1 { "y" } else { "ies" } } /// For locally produced media (encoded ugoira MP4) the thumbnail URL is a