X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommand.php;h=7e98156b6679fd355e561f1839f27e1daad3e2f9;hb=69ac99ff949ab0118ff25a62471980ad0ec7a52b;hp=247ea447582a0d4d35568ad5c364aa1d1d5e5a1e;hpb=73b4d770a2551018ea17d115d980972dc5f0865a;p=quix0rs-gnu-social.git diff --git a/lib/command.php b/lib/command.php index 247ea44758..7e98156b66 100644 --- a/lib/command.php +++ b/lib/command.php @@ -617,8 +617,11 @@ class SubscriptionsCommand extends Command if(count($nicknames)==0){ $out=_('You are not subscribed to anyone.'); }else{ - $out=_('You are subscribed to these people: '); - $out.=implode(', ',$nicknames); + $out = ngettext('You are subscribed to this person:', + 'You are subscribed to these people:', + count($nicknames)); + $out .= ' '; + $out .= implode(', ',$nicknames); } $channel->output($this->user,$out); } @@ -636,8 +639,32 @@ class SubscribersCommand extends Command if(count($nicknames)==0){ $out=_('No one is subscribed to you.'); }else{ - $out=_('These people are subscribed to you: '); - $out.=implode(', ',$nicknames); + $out = ngettext('This person is subscribed to you:', + 'These people are subscribed to you:', + count($nicknames)); + $out .= ' '; + $out .= implode(', ',$nicknames); + } + $channel->output($this->user,$out); + } +} + +class GroupsCommand extends Command +{ + function execute($channel) + { + $group = $this->user->getGroups(); + $groups=array(); + while ($group->fetch()) { + $groups[]=$group->nickname; + } + if(count($groups)==0){ + $out=_('You are not a member of any groups.'); + }else{ + $out = ngettext('You are a member of this group:', + 'You are a member of these groups:', + count($nicknames)); + $out.=implode(', ',$groups); } $channel->output($this->user,$out); } @@ -653,6 +680,7 @@ class HelpCommand extends Command "off - turn off notifications\n". "help - show this help\n". "follow - subscribe to user\n". + "groups - lists the groups you have joined\n". "subscriptions - list the people you follow\n". "subscribers - list the people that follow you\n". "leave - unsubscribe from user\n".