1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 19:43:14 +02:00

Add some helper methods to CommandSource for translation.

This commit is contained in:
Sadie Powell
2026-04-26 18:07:56 +01:00
parent 7eb710a009
commit e2dc77641a
21 changed files with 74 additions and 51 deletions
+3 -3
View File
@@ -281,7 +281,7 @@ public:
if (u2)
onlinestatus = ".";
else
onlinestatus = Anope::Format(Language::Translate(source.nc, _(" but %s mysteriously dematerialized.")), target.c_str());
onlinestatus = Anope::Format(source.Translate(_(" but %s mysteriously dematerialized.")), target.c_str());
Anope::string timebuf = Anope::Duration(Anope::CurTime - info->last, source.nc);
Anope::string timebuf2 = Anope::strftime(info->last, source.nc, true);
@@ -295,9 +295,9 @@ public:
{
u2 = User::Find(info->nick2, true);
if (u2)
onlinestatus = Anope::Format(Language::Translate(source.nc, _(". %s is still online.")), u2->nick.c_str());
onlinestatus = Anope::Format(source.Translate(_(". %s is still online.")), u2->nick.c_str());
else
onlinestatus = Anope::Format(Language::Translate(source.nc, _(", but %s mysteriously dematerialized.")), info->nick2.c_str());
onlinestatus = Anope::Format(source.Translate(_(", but %s mysteriously dematerialized.")), info->nick2.c_str());
source.Reply(_("%s (%s) was last seen changing nick to %s %s ago%s"),
target.c_str(), info->vhost.c_str(), info->nick2.c_str(), timebuf.c_str(), onlinestatus.c_str());