Migrate interpolated service messages to the t! macro (8 modules)
This commit is contained in:
parent
b462d37bd5
commit
d207c3d60d
133 changed files with 782 additions and 702 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use echo_api::{Sender, ServiceCtx, Store};
|
||||
use echo_api::{t, Sender, ServiceCtx, Store};
|
||||
|
||||
// ON: activate the vhost assigned to your account.
|
||||
pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
|
||||
|
|
@ -9,7 +9,7 @@ pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
|
|||
match db.vhost(account) {
|
||||
Some(v) => {
|
||||
ctx.apply_vhost(from.uid, &v.host);
|
||||
ctx.notice(me, from.uid, format!("Your vhost \x02{}\x02 is now active.", v.host));
|
||||
ctx.notice(me, from.uid, t!(ctx, "Your vhost \x02{host}\x02 is now active.", host = v.host));
|
||||
}
|
||||
None => ctx.notice(me, from.uid, "You have no vhost assigned."),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue