Migrate interpolated service messages to the t! macro (8 modules)

This commit is contained in:
Jean Chevronnet 2026-07-19 23:22:56 +00:00
parent b462d37bd5
commit d207c3d60d
No known key found for this signature in database
133 changed files with 782 additions and 702 deletions

View file

@ -1,4 +1,4 @@
use echo_api::{Priv, Sender, ServiceCtx};
use echo_api::{t, Priv, Sender, ServiceCtx};
// REDACT <#channel|nick> <msgid> [reason]: delete a message by its IRCv3 msgid.
// The msgid comes from the reporting oper's client (which saw the tagged message);
@ -15,5 +15,5 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx) {
};
let reason = if args.len() > 3 { args[3..].join(" ") } else { String::new() };
ctx.redact(me, target, msgid, &reason);
ctx.notice(me, from.uid, format!("Redacted message \x02{msgid}\x02 in \x02{target}\x02."));
ctx.notice(me, from.uid, t!(ctx, "Redacted message \x02{msgid}\x02 in \x02{target}\x02.", msgid = msgid, target = target));
}