Mercurial > pidgin
changeset 18807:b9a0b1bd321b
Improve a bunch of strings in QQ
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 06 Aug 2007 00:14:47 +0000 |
parents | abb9aac69507 |
children | f15bdcc44fc1 |
files | libpurple/protocols/qq/buddy_opt.c libpurple/protocols/qq/group.c libpurple/protocols/qq/group_im.c libpurple/protocols/qq/group_internal.c libpurple/protocols/qq/group_join.c libpurple/protocols/qq/group_opt.c libpurple/protocols/qq/im.c libpurple/protocols/qq/keep_alive.c libpurple/protocols/qq/login_logout.c libpurple/protocols/qq/qq.c libpurple/protocols/qq/qq_proxy.c libpurple/protocols/qq/sys_msg.c |
diffstat | 12 files changed, 52 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/qq/buddy_opt.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/buddy_opt.c Mon Aug 06 00:14:47 2007 +0000 @@ -270,11 +270,11 @@ if (qq_crypt(DECRYPT, buf, buf_len, qd->session_key, data, &len)) { read_packet_b(data, &cursor, len, &reply); if (reply != QQ_ADD_BUDDY_AUTH_REPLY_OK) { - purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Add buddy with auth request fails\n"); + purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Add buddy with auth request failed\n"); if (NULL == (segments = split_data(data, len, "\x1f", 2))) return; msg_utf8 = qq_to_utf8(segments[1], QQ_CHARSET_DEFAULT); - purple_notify_error(gc, NULL, _("Add buddy with auth request fails"), msg_utf8); + purple_notify_error(gc, NULL, _("Add buddy with auth request failed"), msg_utf8); g_free(msg_utf8); } else { purple_debug(PURPLE_DEBUG_INFO, "QQ", "Add buddy with auth request OK\n"); @@ -305,6 +305,7 @@ purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Remove buddy fails\n"); } else { /* if reply */ purple_debug(PURPLE_DEBUG_INFO, "QQ", "Remove buddy OK\n"); + /* TODO: We don't really need to notify the user about this, do we? */ purple_notify_info(gc, NULL, _("You have successfully removed a buddy"), NULL); } } else { @@ -333,7 +334,8 @@ purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Remove self fails\n"); else { /* if reply */ purple_debug(PURPLE_DEBUG_INFO, "QQ", "Remove self from a buddy OK\n"); - purple_notify_info(gc, NULL, _("You have successfully removed yourself from a buddy"), NULL); + /* TODO: Does the user really need to be notified about this? */ + purple_notify_info(gc, NULL, _("You have successfully removed yourself from your friend's buddy list"), NULL); } } else { purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Error decrypt remove self reply\n"); @@ -413,7 +415,7 @@ g_free(nombre); } else { /* add OK */ qq_add_buddy_by_recv_packet(gc, for_uid, TRUE, TRUE); - msg = g_strdup_printf(_("You have added %d in buddy list"), for_uid); + msg = g_strdup_printf(_("You have added %d to buddy list"), for_uid); purple_notify_info(gc, NULL, msg, NULL); g_free(msg); }
--- a/libpurple/protocols/qq/group.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/group.c Mon Aug 06 00:14:47 2007 +0000 @@ -117,7 +117,7 @@ purple_roomlist_set_in_progress(qd->roomlist, TRUE); purple_request_input(gc, _("QQ Qun"), - _("Please input external group ID"), + _("Please enter external group ID"), _("You can only search for permanent QQ groups\n"), NULL, FALSE, FALSE, NULL, _("Search"), G_CALLBACK(_qq_group_search_callback),
--- a/libpurple/protocols/qq/group_im.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/group_im.c Mon Aug 06 00:14:47 2007 +0000 @@ -123,7 +123,7 @@ convert_as_pascal_string(*cursor, &reason_utf8, QQ_CHARSET_DEFAULT); - msg = g_strdup_printf(_("User %d applied to join group %d"), user_uid, external_group_id); + msg = g_strdup_printf(_("User %d requested to join group %d"), user_uid, external_group_id); reason = g_strdup_printf(_("Reason: %s"), reason_utf8); g = g_new0(group_member_opt, 1); @@ -177,7 +177,7 @@ convert_as_pascal_string(*cursor, &reason_utf8, QQ_CHARSET_DEFAULT); msg = g_strdup_printf - (_("You request to join group %d has been rejected by admin %d"), external_group_id, admin_uid); + (_("Your request to join group %d has been rejected by admin %d"), external_group_id, admin_uid); reason = g_strdup_printf(_("Reason: %s"), reason_utf8); purple_notify_warning(gc, _("QQ Qun Operation"), msg, reason); @@ -218,7 +218,7 @@ convert_as_pascal_string(*cursor, &reason_utf8, QQ_CHARSET_DEFAULT); msg = g_strdup_printf - (_("You request to join group %d has been approved by admin %d"), external_group_id, admin_uid); + (_("Your request to join group %d has been approved by admin %d"), external_group_id, admin_uid); purple_notify_warning(gc, _("QQ Qun Operation"), msg, NULL); @@ -254,7 +254,7 @@ g_return_if_fail(external_group_id > 0 && uid > 0); - msg = g_strdup_printf(_("You [%d] has exit group \"%d\""), uid, external_group_id); + msg = g_strdup_printf(_("You [%d] have left group \"%d\""), uid, external_group_id); purple_notify_info(gc, _("QQ Qun Operation"), msg, NULL); group = qq_group_find_by_id(gc, internal_group_id, QQ_INTERNAL_ID); @@ -288,7 +288,7 @@ g_return_if_fail(external_group_id > 0 && uid > 0); - msg = g_strdup_printf(_("You [%d] has been added by group \"%d\""), uid, external_group_id); + msg = g_strdup_printf(_("You [%d] have been added to group \"%d\""), uid, external_group_id); purple_notify_info(gc, _("QQ Qun Operation"), msg, _("This group has been added to your buddy list")); group = qq_group_find_by_id(gc, internal_group_id, QQ_INTERNAL_ID);
--- a/libpurple/protocols/qq/group_internal.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/group_internal.c Mon Aug 06 00:14:47 2007 +0000 @@ -38,7 +38,7 @@ switch (group->my_status) { case QQ_GROUP_MEMBER_STATUS_NOT_MEMBER: - status_desc = _("I am not member"); + status_desc = _("I am not a member"); break; case QQ_GROUP_MEMBER_STATUS_IS_MEMBER: status_desc = _("I am a member");
--- a/libpurple/protocols/qq/group_join.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/group_join.c Mon Aug 06 00:14:47 2007 +0000 @@ -230,7 +230,7 @@ purple_blist_remove_chat(chat); qq_group_delete_internal_record(qd, internal_group_id); } - purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully exited the group"), NULL); + purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully left the group"), NULL); } else { purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Invalid exit group reply, expect %d bytes, read %d bytes\n", expected_bytes, bytes); @@ -254,8 +254,8 @@ if (bytes == expected_bytes) purple_notify_info - (gc, _("QQ Group Auth"), - _("Your authorization operation has been accepted by the QQ server"), NULL); + (gc, _("QQ Group Auth"), + _("Your authorization request has been accepted by the QQ server"), NULL); else purple_debug(PURPLE_DEBUG_ERROR, "QQ", "Invalid join group reply, expect %d bytes, read %d bytes\n", expected_bytes, bytes); @@ -325,8 +325,8 @@ errno = 0; external_group_id = strtol(external_group_id_ptr, NULL, 10); if (errno != 0) { - purple_notify_error(gc, _("Error"), - _("You inputted a group id outside the acceptable range"), NULL); + purple_notify_error(gc, _("Error"), + _("You entered a group ID outside the acceptable range"), NULL); return; } @@ -357,12 +357,12 @@ g->uid = internal_group_id; purple_request_action(gc, _("QQ Qun Operation"), - _("Are you sure to exit this Qun?"), + _("Are you sure you want to leave this Qun?"), _ ("Note, if you are the creator, \nthis operation will eventually remove this Qun."), 1, purple_connection_get_account(gc), NULL, NULL, g, 2, _("Cancel"), G_CALLBACK(qq_do_nothing_with_gc_and_uid), - _("Go ahead"), G_CALLBACK(_qq_group_exit_with_gc_and_id)); + _("Continue"), G_CALLBACK(_qq_group_exit_with_gc_and_id)); }
--- a/libpurple/protocols/qq/group_opt.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/group_opt.c Mon Aug 06 00:14:47 2007 +0000 @@ -120,8 +120,8 @@ { g_return_if_fail(g != NULL && g->gc != NULL && g->member > 0); - qq_send_packet_get_info(g->gc, g->member, TRUE); /* we wanna see window */ - purple_request_action(g->gc, NULL, _("Do you wanna approve the request?"), "", 2, + qq_send_packet_get_info(g->gc, g->member, TRUE); /* we want to see window */ + purple_request_action(g->gc, NULL, _("Do you want to approve the request?"), "", 2, purple_connection_get_account(g->gc), NULL, NULL, g, 2, _("Reject"), G_CALLBACK(qq_group_reject_application_with_struct), @@ -134,7 +134,7 @@ g_return_if_fail(g != NULL && g->gc != NULL && g->member > 0); msg1 = g_strdup_printf(_("You rejected %d's request"), g->member); - msg2 = g_strdup(_("Input your reason:")); + msg2 = g_strdup(_("Enter your reason:")); nombre = uid_to_purple_name(g->member); purple_request_input(g->gc, /* title */ NULL, msg1, msg2, @@ -232,7 +232,7 @@ purple_debug(PURPLE_DEBUG_INFO, "QQ", "Succeed in modify members for Qun %d\n", group->external_group_id); - purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully modify Qun member"), NULL); + purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully modified Qun member"), NULL); } void qq_group_modify_info(PurpleConnection *gc, qq_group *group) @@ -302,7 +302,7 @@ purple_debug(PURPLE_DEBUG_INFO, "QQ", "Succeed in modify info for Qun %d\n", group->external_group_id); qq_group_refresh(gc, group); - purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully modify Qun information"), NULL); + purple_notify_info(gc, _("QQ Qun Operation"), _("You have successfully modified Qun information"), NULL); } /* we create a very simple group first, and then let the user to modify */
--- a/libpurple/protocols/qq/im.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/im.c Mon Aug 06 00:14:47 2007 +0000 @@ -573,7 +573,7 @@ read_packet_b(data, &cursor, len, &reply); if (reply != QQ_SEND_IM_REPLY_OK) { purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Send IM fail\n"); - purple_notify_error(gc, _("Server ACK"), _("Failed to send IM."), NULL); + purple_notify_error(gc, _("Error"), _("Failed to send IM."), NULL); } else purple_debug(PURPLE_DEBUG_INFO, "QQ", "IM ACK OK\n");
--- a/libpurple/protocols/qq/keep_alive.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/keep_alive.c Mon Aug 06 00:14:47 2007 +0000 @@ -84,7 +84,7 @@ /* segments[0] and segment[1] are all 0x30 ("0") */ qd->all_online = strtol(segments[2], NULL, 10); if(0 == qd->all_online) - purple_connection_error(gc, _("Keep alive error, seems connection lost!")); + purple_connection_error(gc, _("Keep alive error")); g_free(qd->my_ip); qd->my_ip = g_strdup(segments[3]); qd->my_port = strtol(segments[4], NULL, 10);
--- a/libpurple/protocols/qq/login_logout.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/login_logout.c Mon Aug 06 00:14:47 2007 +0000 @@ -405,7 +405,7 @@ ">>> %d bytes -> [default] decrypt and dump\n%s", buf_len, hex_dump); try_dump_as_gbk(buf, buf_len); - purple_connection_error(gc, _("Request login token error!")); + purple_connection_error(gc, _("Error requesting login token")); } g_free(hex_dump); }
--- a/libpurple/protocols/qq/qq.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Mon Aug 06 00:14:47 2007 +0000 @@ -195,7 +195,8 @@ { qq_buddy *q_bud; gchar *ip_str; - char *tmp, *tmp2; + const char *tmp; + char *tmp2; g_return_if_fail(b != NULL); @@ -206,12 +207,13 @@ { ip_str = gen_ip_str(q_bud->ip); if (strlen(ip_str) != 0) { - tmp = g_strdup_printf(_("%s Address"), - ((q_bud->comm_flag & QQ_COMM_FLAG_TCP_MODE) ? "TCP" : "UDP")); + if (q_bud->comm_flag & QQ_COMM_FLAG_TCP_MODE) + tmp = _("TCP Address"); + else + tmp = _("UDP Address"); tmp2 = g_strdup_printf("%s:%d", ip_str, q_bud->port); purple_notify_user_info_add_pair(user_info, tmp, tmp2); g_free(tmp2); - g_free(tmp); } g_free(ip_str); @@ -238,7 +240,7 @@ if (q_bud->level) { tmp = g_strdup_printf("%d", q_bud->level); purple_notify_user_info_add_pair(user_info, _("Level"), tmp); - g_free(tmp); + g_free(tmp); } /* For debugging */ /* @@ -275,19 +277,19 @@ GList *types = NULL; status = purple_status_type_new_full(PURPLE_STATUS_AVAILABLE, - "available", _("QQ: Available"), FALSE, TRUE, FALSE); + "available", _("Available"), FALSE, TRUE, FALSE); types = g_list_append(types, status); status = purple_status_type_new_full(PURPLE_STATUS_AWAY, - "away", _("QQ: Away"), FALSE, TRUE, FALSE); + "away", _("Away"), FALSE, TRUE, FALSE); types = g_list_append(types, status); status = purple_status_type_new_full(PURPLE_STATUS_INVISIBLE, - "invisible", _("QQ: Invisible"), FALSE, TRUE, FALSE); + "invisible", _("Invisible"), FALSE, TRUE, FALSE); types = g_list_append(types, status); status = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, - "offline", _("QQ: Offline"), FALSE, TRUE, FALSE); + "offline", _("Offline"), FALSE, TRUE, FALSE); types = g_list_append(types, status); status = purple_status_type_new_full(PURPLE_STATUS_MOBILE, @@ -416,7 +418,7 @@ g->uid = uid; purple_request_action(gc, _("Block Buddy"), - _("Are you sure to block this buddy?"), NULL, + _("Are you sure you want to block this buddy?"), NULL, 1, g, 2, _("Cancel"), G_CALLBACK(qq_do_nothing_with_gc_and_uid), @@ -470,7 +472,7 @@ PurpleConnection *gc = (PurpleConnection *) action->context; purple_request_input(gc, _("Create QQ Qun"), _("Input Qun name here"), - _("Only QQ member can create permanent Qun"), + _("Only QQ members can create permanent Qun"), "OpenQ", FALSE, FALSE, NULL, _("Create"), G_CALLBACK(qq_group_create_with_name), _("Cancel"), NULL, gc); } @@ -528,7 +530,7 @@ PurplePluginAction *act; m = NULL; - act = purple_plugin_action_new(_("Modify My Information"), _qq_menu_modify_my_info); + act = purple_plugin_action_new(_("Set My Information"), _qq_menu_modify_my_info); m = g_list_append(m, act); act = purple_plugin_action_new(_("Change Password"), _qq_menu_change_password); @@ -555,7 +557,7 @@ PurpleMenuAction *act; m = NULL; - act = purple_menu_action_new(_("Exit this QQ Qun"), PURPLE_CALLBACK(_qq_menu_unsubscribe_group), NULL, NULL); + act = purple_menu_action_new(_("Leave this QQ Qun"), PURPLE_CALLBACK(_qq_menu_unsubscribe_group), NULL, NULL); m = g_list_append(m, act); /* TODO: enable this
--- a/libpurple/protocols/qq/qq_proxy.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/qq_proxy.c Mon Aug 06 00:14:47 2007 +0000 @@ -493,13 +493,8 @@ errno = 0; ret = send(qd->fd, data, len, 0); } - if (ret == -1) { - purple_connection_error(qd->gc, _("Socket send error")); - return ret; - } else if (errno == ECONNREFUSED) { - purple_connection_error(qd->gc, _("Connection refused")); - return ret; - } + if (ret == -1) + purple_connection_error(qd->gc, strerror(errno)); return ret; }
--- a/libpurple/protocols/qq/sys_msg.c Sun Aug 05 19:42:29 2007 +0000 +++ b/libpurple/protocols/qq/sys_msg.c Mon Aug 06 00:14:47 2007 +0000 @@ -80,12 +80,11 @@ uid = g->uid; g_return_if_fail(gc != 0 && uid != 0); - qq_send_packet_get_info(gc, uid, TRUE); /* we wanna see window */ + qq_send_packet_get_info(gc, uid, TRUE); /* we want to see window */ nombre = uid_to_purple_name(uid); - /* TODO: 'wanna' is not an appropriate word for this string. Fix after string freeze. */ purple_request_action - (gc, NULL, _("Do you wanna approve the request?"), "", 2, + (gc, NULL, _("Do you want to approve the request?"), "", 2, purple_connection_get_account(gc), nombre, NULL, g, 2, _("Reject"), G_CALLBACK(qq_reject_add_request_with_gc_and_uid), @@ -105,11 +104,10 @@ uid = g->uid; g_return_if_fail(gc != 0 && uid != 0); - qq_send_packet_get_info(gc, uid, TRUE); /* we wanna see window */ - /* TODO: 'wanna' is not an appropriate word for this string. Fix after string freeze. */ + qq_send_packet_get_info(gc, uid, TRUE); /* we want to see window */ nombre = uid_to_purple_name(uid); purple_request_action - (gc, NULL, _("Do you wanna add this buddy?"), "", 2, + (gc, NULL, _("Do you want to add this buddy?"), "", 2, purple_connection_get_account(gc), nombre, NULL, g, 2, _("Cancel"), NULL, @@ -175,7 +173,7 @@ _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); } else { - message = g_strdup_printf(_("%s has added you [%s]"), from, to); + message = g_strdup_printf(_("%s has added you [%s] to his or her buddy list"), from, to); _qq_sys_msg_log_write(gc, message, from); purple_notify_info(gc, NULL, message, NULL); } @@ -211,7 +209,7 @@ qd = (qq_data *) gc->proto_data; qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE); - message = g_strdup_printf(_("User %s has approved your request"), from); + message = g_strdup_printf(_("User %s approved your request"), from); _qq_sys_msg_log_write(gc, message, from); purple_notify_info(gc, NULL, message, NULL); @@ -236,9 +234,8 @@ name = uid_to_purple_name(uid); - /* TODO: 'wanna' is not an appropriate word for this string. Fix after string freeze */ /* TODO: this should go through purple_account_request_authorization() */ - message = g_strdup_printf(_("%s wanna add you [%s] as friends"), from, to); + message = g_strdup_printf(_("%s wants to add you [%s] as a friend"), from, to); reason = g_strdup_printf(_("Message: %s"), msg_utf8); _qq_sys_msg_log_write(gc, message, from);