# HG changeset patch # User Mark Doliner # Date 1139800033 0 # Node ID d1088b7771d41c774694135f15ad9879a60f3034 # Parent d323a4e74753c0ffa88200367be35429fbc1f703 [gaim-migrate @ 15632] Make some strings internationalizable committer: Tailor Script diff -r d323a4e74753 -r d1088b7771d4 src/protocols/bonjour/jabber.c --- a/src/protocols/bonjour/jabber.c Mon Feb 13 02:28:44 2006 +0000 +++ b/src/protocols/bonjour/jabber.c Mon Feb 13 03:07:13 2006 +0000 @@ -354,8 +354,9 @@ /* Inform the user that the conversation has been closed */ conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, gb->name, account); - closed_conv_message = g_strconcat(gb->name, " has closed the conversation.", NULL); + closed_conv_message = g_strdup_printf(_("%s has closed the conversation."), gb->name); gaim_conversation_write(conversation, NULL, closed_conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); + g_free(closed_conv_message); } else { /* Parse the message to get the data and send to the ui */ _jabber_parse_and_write_message_to_ui(message, account->gc, gb); @@ -430,25 +431,20 @@ { struct sockaddr_in my_addr; int yes = 1; - char *error_message = NULL; /* Open a listening socket for incoming conversations */ if ((data->socket = socket(PF_INET, SOCK_STREAM, 0)) < 0) { - gaim_debug_error("bonjour", "Cannot get socket\n"); - error_message = strerror(errno); - gaim_debug_error("bonjour", "%s\n", error_message); - gaim_connection_error(data->account->gc, "Cannot open socket"); + gaim_debug_error("bonjour", "Cannot open socket: %s\n", strerror(errno)); + gaim_connection_error(data->account->gc, _("Cannot open socket")); return -1; } /* Make the socket reusable */ if (setsockopt(data->socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) != 0) { - gaim_debug_error("bonjour", "Cannot make socket reusable\n"); - error_message = strerror(errno); - gaim_debug_error("bonjour", "%s\n", error_message); - gaim_connection_error(data->account->gc, "Error setting socket options"); + gaim_debug_error("bonjour", "Error setting socket options: %s\n", strerror(errno)); + gaim_connection_error(data->account->gc, _("Error setting socket options")); return -1; } @@ -458,19 +454,15 @@ if (bind(data->socket, (struct sockaddr*)&my_addr, sizeof(struct sockaddr)) != 0) { - gaim_debug_error("bonjour", "Cannot bind socket\n"); - error_message = strerror(errno); - gaim_debug_error("bonjour", "%s\n", error_message); - gaim_connection_error(data->account->gc, "Cannot bind socket to port"); + gaim_debug_error("bonjour", "Cannot bind socket: %s\n", strerror(errno)); + gaim_connection_error(data->account->gc, _("Cannot bind socket to port")); return -1; } if (listen(data->socket, 10) != 0) { - gaim_debug_error("bonjour", "Cannot listen to socket\n"); - error_message = strerror(errno); - gaim_debug_error("bonjour", "%s\n", error_message); - gaim_connection_error(data->account->gc, "Cannot listen to socket"); + gaim_debug_error("bonjour", "Cannot listen on socket: %s\n", strerror(errno)); + gaim_connection_error(data->account->gc, _("Cannot listen on socket")); return -1; } @@ -564,7 +556,7 @@ { gaim_debug_error("bonjour", "Unable to start a conversation\n"); gaim_debug_warning("bonjour", "send error: %s\n", strerror(errno)); - conv_message = g_strdup("Unable to send the message, the conversation couldn't be started."); + conv_message = g_strdup(_("Unable to send the message, the conversation couldn't be started.")); conversation = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, bb->name, data->account); gaim_conversation_write(conversation, NULL, conv_message, GAIM_MESSAGE_SYSTEM, time(NULL)); close(bb->conversation->socket);