mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-09-23 23:32:05 +00:00
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'.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user