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,5 +1,6 @@
use echo_api::Store;
use echo_api::{Sender, ServiceCtx};
use echo_api::t;
// GLIST: list the nicks grouped to your account.
pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
@ -9,9 +10,9 @@ pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
};
let mut nicks = db.grouped_nicks(account);
nicks.sort();
ctx.notice(me, from.uid, format!("Nicks grouped to \x02{account}\x02:"));
ctx.notice(me, from.uid, format!(" \x02{account}\x02 (main)"));
ctx.notice(me, from.uid, t!(ctx, "Nicks grouped to \x02{account}\x02:", account = account));
ctx.notice(me, from.uid, t!(ctx, " \x02{account}\x02 (main)", account = account));
for n in nicks {
ctx.notice(me, from.uid, format!(" \x02{n}\x02"));
ctx.notice(me, from.uid, t!(ctx, " \x02{n}\x02", n = n));
}
}