mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-11 11:44:59 -05:00
I18N: Added all command descriptions to the strings ressource
This commit is contained in:
parent
943b4635dc
commit
72301331f2
@ -25,6 +25,8 @@ import org.yaaic.irc.IRCService;
|
|||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for commands
|
* Base class for commands
|
||||||
*
|
*
|
||||||
@ -53,9 +55,10 @@ public abstract class BaseHandler
|
|||||||
/**
|
/**
|
||||||
* Get the description for this command
|
* Get the description for this command
|
||||||
*
|
*
|
||||||
|
* @param context The current context. Needed for getting string resources
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public abstract String getDescription();
|
public abstract String getDescription(Context context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merge params to a string
|
* Merge params to a string
|
||||||
|
@ -22,6 +22,7 @@ package org.yaaic.command.handler;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -30,6 +31,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,7 +71,7 @@ public class AMsgHandler extends BaseHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new CommandException("Invalid number of params");
|
throw new CommandException(service.getString(R.string.invalid_number_of_params));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,8 +88,8 @@ public class AMsgHandler extends BaseHandler
|
|||||||
* Description of /amsg
|
* Description of /amsg
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Send a message to all channels";
|
return context.getString(R.string.command_desc_amsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /away [<reason>]
|
* Command: /away [<reason>]
|
||||||
*
|
*
|
||||||
@ -48,9 +51,9 @@ public class AwayHandler extends BaseHandler
|
|||||||
* Get description of /away
|
* Get description of /away
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Sets you away";
|
return context.getString(R.string.command_desc_away);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +20,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -27,6 +28,7 @@ import org.yaaic.model.Broadcast;
|
|||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,8 +80,8 @@ public class CloseHandler extends BaseHandler
|
|||||||
* Description of /close
|
* Description of /close
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Closes the current window";
|
return context.getString(R.string.command_desc_close);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ package org.yaaic.command.handler;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -30,6 +31,8 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /dcc SEND <nickname> <file>
|
* Command: /dcc SEND <nickname> <file>
|
||||||
*
|
*
|
||||||
@ -81,8 +84,8 @@ public class DCCHandler extends BaseHandler
|
|||||||
* Description of /dcc
|
* Description of /dcc
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Send a file to a user";
|
return context.getString(R.string.command_desc_dcc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,21 +20,24 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /voice <nickname>
|
* Command: /deop <nickname>
|
||||||
*
|
*
|
||||||
* @author Sebastian Kaspari <sebastian@yaaic.org>
|
* @author Sebastian Kaspari <sebastian@yaaic.org>
|
||||||
*/
|
*/
|
||||||
public class DeopHandler extends BaseHandler
|
public class DeopHandler extends BaseHandler
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Execute /voice
|
* Execute /deop
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void execute(String[] params, Server server, Conversation conversation, IRCService service) throws CommandException
|
public void execute(String[] params, Server server, Conversation conversation, IRCService service) throws CommandException
|
||||||
@ -51,20 +54,20 @@ public class DeopHandler extends BaseHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Usage of /voice
|
* Usage of /deop
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getUsage()
|
public String getUsage()
|
||||||
{
|
{
|
||||||
return "/voice <nickname>";
|
return "/deop <nickname>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of /voice
|
* Description of /deop
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Give a user voice status";
|
return context.getString(R.string.command_desc_deop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /devoice <nickname>
|
* Command: /devoice <nickname>
|
||||||
*
|
*
|
||||||
@ -63,8 +66,8 @@ public class DevoiceHandler extends BaseHandler
|
|||||||
* Description of /devoice
|
* Description of /devoice
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Remove voice status from a user";
|
return context.getString(R.string.command_desc_devoice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -28,6 +29,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,8 +73,8 @@ public class EchoHandler extends BaseHandler
|
|||||||
* Description of /echo
|
* Description of /echo
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Print text to window";
|
return context.getString(R.string.command_desc_echo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ package org.yaaic.command.handler;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.command.CommandParser;
|
import org.yaaic.command.CommandParser;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
@ -32,6 +33,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,7 +85,7 @@ public class HelpHandler extends BaseHandler
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
commandList.append("/" + command.toString() + alias + " - "+commands.get(command).getDescription() + "\n");
|
commandList.append("/" + command.toString() + alias + " - "+commands.get(command).getDescription(service) + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Message message = new Message(commandList.toString());
|
Message message = new Message(commandList.toString());
|
||||||
@ -114,7 +116,7 @@ public class HelpHandler extends BaseHandler
|
|||||||
HashMap<String, BaseHandler> commands = cp.getCommands();
|
HashMap<String, BaseHandler> commands = cp.getCommands();
|
||||||
|
|
||||||
if (commands.containsKey(command)) {
|
if (commands.containsKey(command)) {
|
||||||
Message message = new Message("Help of /" + command + "\n" + commands.get(command).getUsage() + "\n" + commands.get(command).getDescription() + "\n");
|
Message message = new Message("Help of /" + command + "\n" + commands.get(command).getUsage() + "\n" + commands.get(command).getDescription(service) + "\n");
|
||||||
message.setColor(Message.COLOR_YELLOW);
|
message.setColor(Message.COLOR_YELLOW);
|
||||||
conversation.addMessage(message);
|
conversation.addMessage(message);
|
||||||
|
|
||||||
@ -143,8 +145,8 @@ public class HelpHandler extends BaseHandler
|
|||||||
* Description of /help
|
* Description of /help
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Lists all available commands";
|
return context.getString(R.string.command_desc_help);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /join <channel> [<key>]
|
* Command: /join <channel> [<key>]
|
||||||
*
|
*
|
||||||
@ -61,8 +64,8 @@ public class JoinHandler extends BaseHandler
|
|||||||
* Description of /join
|
* Description of /join
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Join a channel";
|
return context.getString(R.string.command_desc_join);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /kick <nickname>
|
* Command: /kick <nickname>
|
||||||
*
|
*
|
||||||
@ -65,8 +68,8 @@ public class KickHandler extends BaseHandler
|
|||||||
* Description of /kick
|
* Description of /kick
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Kicks a user";
|
return context.getString(R.string.command_desc_kick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,8 +83,8 @@ public class MeHandler extends BaseHandler
|
|||||||
* Description of /me
|
* Description of /me
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Perform an action";
|
return context.getString(R.string.command_desc_me);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /mode <channel> <mode>
|
* Command: /mode <channel> <mode>
|
||||||
*
|
*
|
||||||
@ -63,8 +66,8 @@ public class ModeHandler extends BaseHandler
|
|||||||
* Description of /mode
|
* Description of /mode
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Change channel modes";
|
return context.getString(R.string.command_desc_mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -28,6 +29,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,8 +83,8 @@ public class MsgHandler extends BaseHandler
|
|||||||
* Description of /msg
|
* Description of /msg
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Send a message to a channel or user";
|
return context.getString(R.string.command_desc_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
import org.jibble.pircbot.User;
|
import org.jibble.pircbot.User;
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -29,6 +30,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,8 +86,8 @@ public class NamesHandler extends BaseHandler
|
|||||||
* Description of /names
|
* Description of /names
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "lists all users in channel";
|
return context.getString(R.string.command_desc_names);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /nick <nickname>
|
* Command: /nick <nickname>
|
||||||
*
|
*
|
||||||
@ -59,8 +62,8 @@ public class NickHandler extends BaseHandler
|
|||||||
* Description of /nick
|
* Description of /nick
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "change own nickname";
|
return context.getString(R.string.command_desc_nick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Message;
|
import org.yaaic.model.Message;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,8 +80,8 @@ public class NoticeHandler extends BaseHandler
|
|||||||
* Description of /notice
|
* Description of /notice
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Send a notice to an other user";
|
return context.getString(R.string.command_desc_notice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /deop <nickname>
|
* Command: /deop <nickname>
|
||||||
*
|
*
|
||||||
@ -63,8 +66,8 @@ public class OpHandler extends BaseHandler
|
|||||||
* Description of /deop
|
* Description of /deop
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Give a user operator status";
|
return context.getString(R.string.command_desc_op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /part [<channel>]
|
* Command: /part [<channel>]
|
||||||
*
|
*
|
||||||
@ -67,8 +70,8 @@ public class PartHandler extends BaseHandler
|
|||||||
* Description of /part
|
* Description of /part
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "leave the current channel";
|
return context.getString(R.string.command_desc_part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -28,6 +29,7 @@ import org.yaaic.model.Conversation;
|
|||||||
import org.yaaic.model.Query;
|
import org.yaaic.model.Query;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -84,8 +86,8 @@ public class QueryHandler extends BaseHandler
|
|||||||
* Description of /query
|
* Description of /query
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "opens a private chat with a user";
|
return context.getString(R.string.command_desc_query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /quit [<reason>]
|
* Command: /quit [<reason>]
|
||||||
*
|
*
|
||||||
@ -59,8 +62,8 @@ public class QuitHandler extends BaseHandler
|
|||||||
* Description of /quit
|
* Description of /quit
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "disconnect from server";
|
return context.getString(R.string.command_desc_quit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /raw <line>
|
* Command: /raw <line>
|
||||||
*
|
*
|
||||||
@ -62,8 +65,8 @@ public class RawHandler extends BaseHandler
|
|||||||
* Description of /raw
|
* Description of /raw
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Send a raw line to the server";
|
return context.getString(R.string.command_desc_raw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
@ -27,6 +28,8 @@ import org.yaaic.model.Channel;
|
|||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /topic [<topic>]
|
* Command: /topic [<topic>]
|
||||||
*
|
*
|
||||||
@ -70,8 +73,8 @@ public class TopicHandler extends BaseHandler
|
|||||||
* Description of /topic
|
* Description of /topic
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "show or change the current topic";
|
return context.getString(R.string.command_desc_topic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /voice <nickname>
|
* Command: /voice <nickname>
|
||||||
*
|
*
|
||||||
@ -63,8 +66,8 @@ public class VoiceHandler extends BaseHandler
|
|||||||
* Description of /voice
|
* Description of /voice
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Give a user voice status";
|
return context.getString(R.string.command_desc_voice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,15 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
package org.yaaic.command.handler;
|
package org.yaaic.command.handler;
|
||||||
|
|
||||||
|
import org.yaaic.R;
|
||||||
import org.yaaic.command.BaseHandler;
|
import org.yaaic.command.BaseHandler;
|
||||||
import org.yaaic.exception.CommandException;
|
import org.yaaic.exception.CommandException;
|
||||||
import org.yaaic.irc.IRCService;
|
import org.yaaic.irc.IRCService;
|
||||||
import org.yaaic.model.Conversation;
|
import org.yaaic.model.Conversation;
|
||||||
import org.yaaic.model.Server;
|
import org.yaaic.model.Server;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command: /whois <nickname>
|
* Command: /whois <nickname>
|
||||||
*
|
*
|
||||||
@ -52,9 +55,9 @@ public class WhoisHandler extends BaseHandler
|
|||||||
* Get description of /whois
|
* Get description of /whois
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription(Context context)
|
||||||
{
|
{
|
||||||
return "Get information about a user";
|
return context.getString(R.string.command_desc_whois);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user