aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 00:37:48 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 00:37:48 +0800
commit84e30dab1428affe335ef904377d07f8b5fdeb66 (patch)
treefee9c8ec124a2b5804f6bb4ee31772db56a6e374 /libempathy-gtk/empathy-chat.c
parentfd8e9c5dc2584055177c7a79021cdd53ca431c22 (diff)
parent3803736b4326d4bc00d58ccd25f910907f0b4521 (diff)
downloadgsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.gz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.bz2
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.lz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.xz
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.tar.zst
gsoc2013-empathy-84e30dab1428affe335ef904377d07f8b5fdeb66.zip
Merge back from master
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index d52d7af93..9096beeae 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -401,9 +401,18 @@ chat_send (EmpathyChat *chat,
if (msg[0] == '/' &&
!g_str_has_prefix (msg, "/me") &&
!g_str_has_prefix (msg, "/say")) {
- empathy_chat_view_append_event (chat->view,
- _("Unsupported command"));
- return;
+ /* Also allow messages with two slashes before the first space,
+ * so it is possible to send an /unix/path */
+ int slash_count = 0, i;
+ for (i = 0; msg[i] && msg[i] != ' ' && slash_count < 2; i++) {
+ if (msg[i] == '/')
+ slash_count++;
+ }
+ if (slash_count == 1) {
+ empathy_chat_view_append_event (chat->view,
+ _("Unsupported command"));
+ return;
+ }
}
/* We can send the message */
@@ -1183,7 +1192,10 @@ build_part_message (guint reason,
break;
case TP_CHANNEL_GROUP_CHANGE_REASON_KICKED:
if (actor_name != NULL) {
- g_string_append_printf (s, _("%s was kicked by %s"),
+ /* translators: reverse the order of these arguments
+ * if the kicked should come before the kicker in your locale.
+ */
+ g_string_append_printf (s, _("%1$s was kicked by %2$s"),
name, actor_name);
} else {
g_string_append_printf (s, _("%s was kicked"), name);
@@ -1191,7 +1203,10 @@ build_part_message (guint reason,
break;
case TP_CHANNEL_GROUP_CHANGE_REASON_BANNED:
if (actor_name != NULL) {
- g_string_append_printf (s, _("%s was banned by %s"),
+ /* translators: reverse the order of these arguments
+ * if the banned should come before the banner in your locale.
+ */
+ g_string_append_printf (s, _("%1$s was banned by %2$s"),
name, actor_name);
} else {
g_string_append_printf (s, _("%s was banned"), name);