From 6127dcedd6ab2ebbdcfd547261c2e542c6889c5a Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Tue, 5 Oct 2010 18:31:07 +0200 Subject: [PATCH] More strings internationalized --- res/values-fr/strings.xml | 5 +++++ res/values/strings.xml | 5 +++++ src/org/yaaic/activity/ConversationActivity.java | 2 +- src/org/yaaic/command/handler/NamesHandler.java | 3 +-- src/org/yaaic/irc/IRCService.java | 6 +++--- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index a70b37a..972802b 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -85,6 +85,9 @@ Vous ne pouvez pas ouvrir une discussion privée vers un canal Cette discussion privée existe déjà Ligne est absente + Le pseudo %1$s est déjà utilisé + Impossible de s\'identifier auprès du serveur %1$s:%1$d + Impossible de se connecter à %1$s:%1$d Envoie un message vers tous les canaux Vous marque absent @@ -146,6 +149,8 @@ %1$s modère le canal %1$s retire le statut modéré du canal Déconnecté + Non connecté + Utilisateurs sur %1$s : Op DeOp diff --git a/res/values/strings.xml b/res/values/strings.xml index 62b10f9..bb97756 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -85,6 +85,9 @@ You cannot open queries to channels Query already exists Line is missing + Nickname %1$s already in use + Could not log into the IRC server %1$s:%1$d + Could not connect to %1$s:%1$d Send a message to all channels Sets you away @@ -146,6 +149,8 @@ %1$s sets moderated %1$s removes moderated Disconnected + Not connected + Users on %1$s: Op DeOp diff --git a/src/org/yaaic/activity/ConversationActivity.java b/src/org/yaaic/activity/ConversationActivity.java index 3087430..cd39b43 100644 --- a/src/org/yaaic/activity/ConversationActivity.java +++ b/src/org/yaaic/activity/ConversationActivity.java @@ -504,7 +504,7 @@ public class ConversationActivity extends Activity implements ServiceConnection, if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN) { if (!server.isConnected()) { - Message message = new Message("Not connected"); + Message message = new Message(getString(R.string.message_not_connected)); message.setColor(Message.COLOR_RED); message.setIcon(R.drawable.error); server.getConversation(server.getSelectedConversation()).addMessage(message); diff --git a/src/org/yaaic/command/handler/NamesHandler.java b/src/org/yaaic/command/handler/NamesHandler.java index f3c5241..6d67fb8 100644 --- a/src/org/yaaic/command/handler/NamesHandler.java +++ b/src/org/yaaic/command/handler/NamesHandler.java @@ -51,8 +51,7 @@ public class NamesHandler extends BaseHandler throw new CommandException(service.getString(R.string.only_usable_from_channel)); } - // XXX:I18N - Translation needed! - StringBuffer userList = new StringBuffer("Users " + conversation.getName() + ":"); + StringBuffer userList = new StringBuffer(service.getString(R.string.message_users_on_chan, conversation.getName())); User[] mUsers = service.getConnection(server.getId()).getUsers(conversation.getName()); int mSize = mUsers.length; diff --git a/src/org/yaaic/irc/IRCService.java b/src/org/yaaic/irc/IRCService.java index 7772924..0f48a2b 100644 --- a/src/org/yaaic/irc/IRCService.java +++ b/src/org/yaaic/irc/IRCService.java @@ -282,11 +282,11 @@ public class IRCService extends Service Message message; if (e instanceof NickAlreadyInUseException) { - message = new Message("Nickname " + connection.getNick() + " already in use"); + message = new Message(getString(R.string.nickname_in_use, connection.getNick())); } else if (e instanceof IrcException) { - message = new Message("Could not log into the IRC server " + server.getHost() + ":" + server.getPort()); + message = new Message(getString(R.string.irc_login_error, server.getHost(), server.getPort())); } else { - message = new Message("Could not connect to " + server.getHost() + ":" + server.getPort()); + message = new Message(getString(R.string.could_not_connect, server.getHost(), server.getPort())); } message.setColor(Message.COLOR_RED);