Add a series of new translations

This commit is contained in:
md_5 2013-05-12 13:39:02 +10:00
parent 202dab5c98
commit 1ea53f01aa
11 changed files with 30 additions and 20 deletions

View File

@ -85,7 +85,7 @@ public class PluginManager
String permission = command.getPermission(); String permission = command.getPermission();
if ( permission != null && !permission.isEmpty() && !sender.hasPermission( permission ) ) if ( permission != null && !permission.isEmpty() && !sender.hasPermission( permission ) )
{ {
sender.sendMessage( ChatColor.RED + "You do not have permission to execute this command!" ); sender.sendMessage( proxy.getTranslation( "no_permission" ) );
return true; return true;
} }

View File

@ -155,7 +155,7 @@ public class BungeeCord extends ProxyServer
public static void main(String[] args) throws Exception public static void main(String[] args) throws Exception
{ {
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();
deadline.set( 2013, 5, 26 ); // year, month, date deadline.set( 2013, 6, 14 ); // year, month, date
if ( Calendar.getInstance().after( deadline ) ) if ( Calendar.getInstance().after( deadline ) )
{ {
System.err.println( "*** Warning, this build is outdated ***" ); System.err.println( "*** Warning, this build is outdated ***" );
@ -295,7 +295,7 @@ public class BungeeCord extends ProxyServer
getScheduler().cancel( plugin ); getScheduler().cancel( plugin );
} }
getLogger().info( getTranslation( "end" ) ); getLogger().info( "Thankyou and goodbye" );
System.exit( 0 ); System.exit( 0 );
} }

View File

@ -252,7 +252,7 @@ public class ServerConnector extends PacketHandler
return; return;
} }
String message = ChatColor.RED + "Kicked whilst connecting to " + target.getName() + ": " + kick.message; String message = bungee.getTranslation( "connect_kick") + target.getName() + ": " + kick.message;
if ( user.getServer() == null ) if ( user.getServer() == null )
{ {
user.disconnect( message ); user.disconnect( message );

View File

@ -188,16 +188,16 @@ public final class UserConnection implements ProxiedPlayer
ServerInfo def = ProxyServer.getInstance().getServers().get( getPendingConnection().getListener().getFallbackServer() ); ServerInfo def = ProxyServer.getInstance().getServers().get( getPendingConnection().getListener().getFallbackServer() );
if ( retry & target != def && ( getServer() == null || def != getServer().getInfo() ) ) if ( retry & target != def && ( getServer() == null || def != getServer().getInfo() ) )
{ {
sendMessage( ChatColor.RED + "Could not connect to target server, you have been moved to the lobby server" ); sendMessage( bungee.getTranslation( "fallback_lobby" ) );
connect( def, false ); connect( def, false );
} else } else
{ {
if ( server == null ) if ( server == null )
{ {
disconnect( "Could not connect to default server, please try again later: " + future.cause().getClass().getName() ); disconnect( bungee.getTranslation( "fallback_kick" ) + future.cause().getClass().getName() );
} else } else
{ {
sendMessage( ChatColor.RED + "Could not connect to selected server, please try again later: " + future.cause().getClass().getName() ); sendMessage( bungee.getTranslation( "fallback_kick" ) + future.cause().getClass().getName() );
} }
} }
} }

View File

@ -29,8 +29,7 @@ public class CommandAlert extends Command
args[0] = args[0].substring( 2, args[0].length() ); args[0] = args[0].substring( 2, args[0].length() );
} else } else
{ {
builder.append( ChatColor.DARK_PURPLE ); builder.append( ProxyServer.getInstance().getTranslation( "alert" ) );
builder.append( "[Alert] " );
} }
for ( String s : args ) for ( String s : args )

View File

@ -58,6 +58,6 @@ public class CommandList extends Command
sender.sendMessage( message.toString() ); sender.sendMessage( message.toString() );
} }
sender.sendMessage( "Total players online: " + ProxyServer.getInstance().getPlayers().size() ); sender.sendMessage( ProxyServer.getInstance().getTranslation( "total_players" ) + ProxyServer.getInstance().getPlayers().size() );
} }
} }

View File

@ -26,7 +26,7 @@ public class CommandSend extends Command
ServerInfo target = ProxyServer.getInstance().getServerInfo( args[1] ); ServerInfo target = ProxyServer.getInstance().getServerInfo( args[1] );
if ( target == null ) if ( target == null )
{ {
sender.sendMessage( ChatColor.RED + "Target server does not exist" ); sender.sendMessage( ProxyServer.getInstance().getTranslation( "no_server") );
return; return;
} }

View File

@ -43,16 +43,16 @@ public class CommandServer extends Command
{ {
serverList.setLength( serverList.length() - 2 ); serverList.setLength( serverList.length() - 2 );
} }
player.sendMessage( ChatColor.GOLD + "You may connect to the following servers at this time: " + serverList.toString() ); player.sendMessage( ProxyServer.getInstance().getTranslation( "server_list") + serverList.toString() );
} else } else
{ {
ServerInfo server = servers.get( args[0] ); ServerInfo server = servers.get( args[0] );
if ( server == null ) if ( server == null )
{ {
player.sendMessage( ChatColor.RED + "The specified server does not exist" ); player.sendMessage( ProxyServer.getInstance().getTranslation( "no_server") );
} else if ( !server.canAccess( player ) ) } else if ( !server.canAccess( player ) )
{ {
player.sendMessage( ChatColor.RED + "You don't have permission to access this server" ); player.sendMessage( ProxyServer.getInstance().getTranslation( "no_server_permission") );
} else } else
{ {
player.connect( server ); player.connect( server );

View File

@ -64,7 +64,7 @@ public class DownstreamBridge extends PacketHandler
if ( !server.isObsolete() ) if ( !server.isObsolete() )
{ {
con.disconnect( bungee.getTranslation( "lost_connection ") ); con.disconnect( bungee.getTranslation( "lost_connection " ) );
} }
} }
@ -334,7 +334,7 @@ public class DownstreamBridge extends PacketHandler
con.connectNow( event.getCancelServer() ); con.connectNow( event.getCancelServer() );
} else } else
{ {
con.disconnect( "[Kicked] " + event.getKickReason() ); con.disconnect( bungee.getTranslation( "server_kick" ) + event.getKickReason() );
} }
server.setObsolete( true ); server.setObsolete( true );
throw new CancelSendSignal(); throw new CancelSendSignal();

View File

@ -132,7 +132,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
int limit = BungeeCord.getInstance().config.getPlayerLimit(); int limit = BungeeCord.getInstance().config.getPlayerLimit();
if ( limit > 0 && bungee.getPlayers().size() > limit ) if ( limit > 0 && bungee.getPlayers().size() > limit )
{ {
disconnect( "Server is full!" ); disconnect( bungee.getTranslation( "proxy_full" ) );
return; return;
} }
@ -199,7 +199,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
ProxiedPlayer old = bungee.getPlayer( handshake.username ); ProxiedPlayer old = bungee.getPlayer( handshake.username );
if ( old != null ) if ( old != null )
{ {
old.disconnect( "You are already connected to the server" ); old.disconnect( "already_connected" );
} }
Callback<LoginEvent> complete = new Callback<LoginEvent>() Callback<LoginEvent> complete = new Callback<LoginEvent>()

View File

@ -1,3 +1,14 @@
restart: [Proxy] Proxy restarting. alert: \u00a75[Alert]
already_connected: You are already connected to the server
connect_kick: \u00a7cKicked whilst connecting to
fallback_kick: \u00a7cCould not connect to default server, please try again later:
fallback_move: \u00a7cCould not connect to target server, you have been moved to the lobby server
lost_connection: [Proxy] Lost connection to server. lost_connection: [Proxy] Lost connection to server.
end: Thank you, and goodbye. no_permission: \u00a7cYou do not have permission to execute this command!
no_server: \u00a7cThe specified server does not exist
no_server_permission: \u00a7cYou don't have permission to access this server
proxy_full: Server is full
restart: [Proxy] Proxy restarting.
server_kick: [Kicked]
server_list: \u00a76You may connect to the following servers at this time:
total_players: Total players online: