class Command
{
-
var $user = null;
function __construct($user=null)
}
}
-
/**
* Override this with the meat!
*
// TRANS: Text shown when a notice has been marked as favourite successfully.
$channel->output($this->user, _('Notice marked as fave.'));
}
-
}
class JoinCommand extends Command
$cur->nickname,
$group->nickname));
}
-
}
+
class DropCommand extends Command
{
var $other = null;
$cur->nickname,
$group->nickname));
}
-
}
class WhoisCommand extends Command
throw $e;
}
// TRANS: Command exception text shown when trying to send a direct message to a remote user (a user not registered at the current server).
+ // TRANS: %s is a remote profile.
throw new CommandException(sprintf(_('%s is a remote profile; you can only send direct messages to users on the same server.'), $this->other));
}
if (Message::contentTooLong($this->text)) {
// XXX: i18n. Needs plural support.
- // TRANS: Message given if content is too long.
+ // TRANS: Message given if content is too long. %1$sd is used for plural.
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
- $channel->error($this->user, sprintf(_('Message too long - maximum is %1$d characters, you sent %2$d.'),
+ $channel->error($this->user, sprintf(_m('Message too long - maximum is %1$d character, you sent %2$d.',
+ 'Message too long - maximum is %1$d characters, you sent %2$d.',
+ Message::maxContent()),
Message::maxContent(), mb_strlen($this->text)));
return;
}
if (Notice::contentTooLong($this->text)) {
// XXX: i18n. Needs plural support.
- // TRANS: Message given if content of a notice for a reply is too long.
+ // TRANS: Message given if content of a notice for a reply is too long. %1$d is used for plural.
// TRANS: %1$d is the maximum number of characters, %2$d is the number of submitted characters.
- $channel->error($this->user, sprintf(_('Notice too long - maximum is %1$d characters, you sent %2$d.'),
+ $channel->error($this->user, sprintf(_m('Notice too long - maximum is %1$d character, you sent %2$d.',
+ 'Notice too long - maximum is %1$d characters, you sent %2$d.',
+ Notice::maxContent()),
Notice::maxContent(), mb_strlen($this->text)));
return;
}
class GetCommand extends Command
{
-
var $other = null;
function __construct($user, $other)
class SubCommand extends Command
{
-
var $other = null;
function __construct($user, $other)
class UnsubCommand extends Command
{
-
var $other = null;
function __construct($user, $other)
class OffCommand extends Command
{
var $other = null;
+
function __construct($user, $other=null)
{
parent::__construct($user);
$out=_('You are not subscribed to anyone.');
}else{
// TRANS: Text shown after requesting other users a user is subscribed to.
- // TRANS: This message support plural forms. This message is followed by a
+ // TRANS: This message supports plural forms. This message is followed by a
// TRANS: hard coded space and a comma separated list of subscribed users.
$out = ngettext('You are subscribed to this person:',
'You are subscribed to these people:',
$out=_('No one is subscribed to you.');
}else{
// TRANS: Text shown after requesting other users that are subscribed to a user (followers).
- // TRANS: This message support plural forms. This message is followed by a
+ // TRANS: This message supports plural forms. This message is followed by a
// TRANS: hard coded space and a comma separated list of subscribing users.
$out = ngettext('This person is subscribed to you:',
'These people are subscribed to you:',
$out=_('You are not a member of any groups.');
}else{
// TRANS: Text shown after requesting groups a user is subscribed to.
- // TRANS: This message support plural forms. This message is followed by a
+ // TRANS: This message supports plural forms. This message is followed by a
// TRANS: hard coded space and a comma separated list of subscribed groups.
$out = ngettext('You are a member of this group:',
'You are a member of these groups:',
{
function handle($channel)
{
- // TRANS: Help text for commands.
$channel->output($this->user,
+ // TRANS: Help text for commands. Do not translate the command names themselves; they are fixed strings.
_("Commands:\n".
"on - turn on notifications\n".
"off - turn off notifications\n".