pidgin: e75b094f: String changes (a few of which I had alr...
markdoliner at pidgin.im
markdoliner at pidgin.im
Thu Dec 11 02:21:05 EST 2008
-----------------------------------------------------------------
Revision: e75b094fb3636667360c46a4eb03b6974912d0ac
Ancestor: 2b3429067be9bc2eb9be9e8deeeac9c35001f61d
Author: markdoliner at pidgin.im
Date: 2008-12-11T07:17:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e75b094fb3636667360c46a4eb03b6974912d0ac
Modified files:
libpurple/protocols/myspace/myspace.c
libpurple/protocols/qq/buddy_info.c
libpurple/protocols/qq/buddy_opt.c
libpurple/protocols/qq/group.c
libpurple/protocols/qq/group_join.c
libpurple/protocols/qq/group_opt.c
libpurple/protocols/qq/qq.c libpurple/protocols/qq/qq_base.c
libpurple/protocols/qq/qq_network.c
libpurple/protocols/qq/qq_process.c
ChangeLog:
String changes (a few of which I had already made, grumble grumble).
I tried to re-use strings that exist in other protocols as much as
possible. When calling purple_connection_update_progress() the strings
should not have ellipsis. When calling purple_connection_error_reason()
due to a keep alive timeout, do not include the number of seconds,
because there shouldn't be a reason for users to care
-------------- next part --------------
============================================================
--- libpurple/protocols/myspace/myspace.c 2c366e3edc4f6c56a00b1574ca991dbab42b7336
+++ libpurple/protocols/myspace/myspace.c 53e991fd71717ecc3d025854d2635039c5ed5696
@@ -1334,29 +1334,22 @@ msim_check_alive(gpointer data)
{
MsimSession *session;
time_t delta;
- gchar *errmsg;
session = (MsimSession *)data;
g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE);
delta = time(NULL) - session->last_comm;
+
/* purple_debug_info("msim", "msim_check_alive: delta=%d\n", delta); */
if (delta >= MSIM_KEEPALIVE_INTERVAL) {
- errmsg = g_strdup_printf(ngettext("Connection to server lost (no data received within %d second)",
- "Connection to server lost (no data received within %d seconds)",
- (int)delta),
- (int)delta);
-
- purple_debug_info("msim", "msim_check_alive: %s > interval of %d, presumed dead\n",
- errmsg, MSIM_KEEPALIVE_INTERVAL);
+ purple_debug_info("msim",
+ "msim_check_alive: %zu > interval of %d, presumed dead\n",
+ delta, MSIM_KEEPALIVE_INTERVAL);
purple_connection_error_reason(session->gc,
- PURPLE_CONNECTION_ERROR_NETWORK_ERROR, errmsg);
+ PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
+ _("Lost connection with server"));
- purple_notify_error(session->gc, NULL, errmsg, NULL);
-
- g_free(errmsg);
-
return FALSE;
}
============================================================
--- libpurple/protocols/qq/buddy_info.c fce59f01b3c6f9bde0bfe3cb2631f297a0e1a42f
+++ libpurple/protocols/qq/buddy_info.c de4e7fcbab3f2399f16641a0d17ba2e45beb57c4
@@ -504,8 +504,6 @@ void qq_set_custom_icon(PurpleConnection
{
PurpleAccount *account = purple_connection_get_account(gc);
const gchar *icon_path = purple_account_get_buddy_icon_path(account);
- gchar **segments;
- gint index;
g_return_if_fail(icon_path != NULL);
@@ -514,12 +512,6 @@ void qq_set_custom_icon(PurpleConnection
* purple_imgstore_get_filename is always new file
* QQ buddy may set custom icon if level is over 16 */
purple_debug_info("QQ", "Change my icon to %s\n", icon_path);
- segments = g_strsplit_set(icon_path, G_DIR_SEPARATOR_S, 0);
- for (index = 0; segments[index] != NULL; index++) {
- purple_debug_info("QQ", "Split to %s\n", segments[index]);
- }
-
- g_strfreev(segments);
}
gchar *qq_get_icon_name(gint face)
============================================================
--- libpurple/protocols/qq/buddy_opt.c 14b319bd3676f50738aff98ff4d61cdba32619b7
+++ libpurple/protocols/qq/buddy_opt.c e4dd39d935ce3d818d5a618a3a9c065de0d64240
@@ -317,9 +317,9 @@ static void add_buddy_question_input(Pur
add_req->auth_len = 0;
who = uid_to_purple_name(uid);
- msg = g_strdup_printf(_("%u needs Q&A"), uid);
- purple_request_input(gc, _("Add buddy Q&A"), msg,
- _("Input answer here"),
+ msg = g_strdup_printf(_("%u requires verification"), uid);
+ purple_request_input(gc, _("Add buddy question"), msg,
+ _("Enter answer here"),
NULL,
TRUE, FALSE, NULL,
_("Send"), G_CALLBACK(add_buddy_question_cb),
@@ -616,7 +616,7 @@ static void buddy_add_deny_cb(gpointer d
qq_buddy_req *add_req = (qq_buddy_req *)data;
gchar *who = uid_to_purple_name(add_req->uid);
purple_request_input(add_req->gc, NULL, _("Authorization denied message:"),
- NULL, _("Sorry, You are not my style."), TRUE, FALSE, NULL,
+ NULL, _("Sorry, you're not my style."), TRUE, FALSE, NULL,
_("OK"), G_CALLBACK(buddy_add_deny_reason_cb),
_("Cancel"), G_CALLBACK(buddy_add_deny_noreason_cb),
purple_connection_get_account(add_req->gc), who, NULL,
@@ -661,9 +661,9 @@ void add_buddy_authorize_input(PurpleCon
}
who = uid_to_purple_name(uid);
- msg = g_strdup_printf(_("%u needs authentication"), uid);
+ msg = g_strdup_printf(_("%u needs authorization"), uid);
purple_request_input(gc, _("Add buddy authorize"), msg,
- _("Input request here"),
+ _("Enter request here"),
_("Would you be my friend?"),
TRUE, FALSE, NULL,
_("Send"), G_CALLBACK(add_buddy_auth_cb),
============================================================
--- libpurple/protocols/qq/group.c fc409d89b365ca6fbb57711ac9cde6f29633c87d
+++ libpurple/protocols/qq/group.c 6506e4ef7d48ba885e2395d390aa461cd2b74768
@@ -116,7 +116,7 @@ PurpleRoomlist *qq_roomlist_get_list(Pur
return qd->roomlist;
}
-/* free roomlist space, I have no idea when this one is called ... */
+/* free roomlist space, I have no idea when this one is called... */
void qq_roomlist_cancel(PurpleRoomlist *list)
{
qq_data *qd;
============================================================
--- libpurple/protocols/qq/group_join.c 48e2e185e1764e481acc2fbafe48a37d04f90ce8
+++ libpurple/protocols/qq/group_join.c e278906ba5f4c72de77aaa1db6cda01feba877af
@@ -219,11 +219,11 @@ void qq_process_group_cmd_join_group_aut
rmd = qq_room_data_find(gc, id);
if (rmd != NULL) {
- msg = g_strdup_printf(_("Succeeded joining Qun %s (%u)"), rmd->title_utf8, rmd->ext_id);
+ msg = g_strdup_printf(_("Successfully joined Qun %s (%u)"), rmd->title_utf8, rmd->ext_id);
qq_got_message(gc, msg);
g_free(msg);
} else {
- qq_got_message(gc, _("Succeeded joining Qun"));
+ qq_got_message(gc, _("Successfully joined Qun"));
}
}
============================================================
--- libpurple/protocols/qq/group_opt.c 3614b4e227660590c74e154ea97f47183071e90e
+++ libpurple/protocols/qq/group_opt.c ea334392f4af6ee9653c950ebb1bb58fa79a41e2
@@ -122,7 +122,7 @@ static void member_join_deny_cb(gpointer
who = uid_to_purple_name(add_req->member);
purple_request_input(add_req->gc, NULL, _("Authorization denied message:"),
- NULL, _("Sorry, you are not our style ..."), TRUE, FALSE, NULL,
+ NULL, _("Sorry, you are not our style"), TRUE, FALSE, NULL,
_("OK"), G_CALLBACK(member_join_deny_reason_cb),
_("Cancel"), G_CALLBACK(member_join_deny_noreason_cb),
purple_connection_get_account(add_req->gc), who, NULL,
@@ -204,7 +204,7 @@ void qq_group_process_modify_members_rep
purple_debug_info("QQ", "Succeed in modify members for room %u\n", rmd->ext_id);
- qq_room_got_chat_in(gc, id, 0, _("Successfully changed Qun member"), now);
+ qq_room_got_chat_in(gc, id, 0, _("Successfully changed Qun members"), now);
}
void qq_room_change_info(PurpleConnection *gc, qq_room_data *rmd)
@@ -347,7 +347,7 @@ void qq_group_process_create_group_reply
purple_request_action(gc, _("QQ Qun Operation"),
_("You have successfully created a Qun"),
- _("Would you like to set up the detail information now?"),
+ _("Would you like to set up detailed information now?"),
1,
purple_connection_get_account(gc), NULL, NULL,
add_req, 2,
@@ -519,7 +519,7 @@ void qq_process_room_buddy_approved(guin
rmd->my_role = QQ_ROOM_ROLE_YES;
}
- msg = g_strdup_printf(_("<b>Joinning Qun %u is approved by admin %u for %s</b>"),
+ msg = g_strdup_printf(_("<b>Joining Qun %u is approved by admin %u for %s</b>"),
ext_id, admin_uid, reason);
now = time(NULL);
qq_room_got_chat_in(gc, id, 0, msg, now);
============================================================
--- libpurple/protocols/qq/qq.c ac7ef0ea5e8e55e55c34a5060967944917800f3c
+++ libpurple/protocols/qq/qq.c d0fc3aed883e2dc261fc8daaa67c5eed86f21a6f
@@ -496,7 +496,7 @@ static void action_change_icon(PurplePlu
icon_path = qq_get_icon_path(icon_name);
g_free(icon_name);
- purple_debug_info("QQ", "Change prev icon %s to ...\n", icon_path);
+ purple_debug_info("QQ", "Change prev icon %s to...\n", icon_path);
purple_request_file(action, _("Select icon..."), icon_path,
FALSE,
G_CALLBACK(qq_change_icon_cb), NULL,
============================================================
--- libpurple/protocols/qq/qq_base.c f6d9f7cec2000687f44fdd7c88ec2874106dafa3
+++ libpurple/protocols/qq/qq_base.c c8da79024ef3f493ddd8eef7006c3f6db6433f5f
@@ -424,7 +424,7 @@ guint8 qq_process_login( PurpleConnectio
qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len,
">>> [default] decrypt and dump");
error = g_strdup_printf(
- _("Unknown reply code when login (0x%02X)"),
+ _("Unknown reply code when logging in (0x%02X)"),
ret );
reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR;
break;
@@ -464,14 +464,16 @@ gboolean qq_process_keep_alive(guint8 *d
qq_data *qd;
gchar **segments;
- g_return_val_if_fail(data != NULL && data_len != 0, FALSE);
+ g_return_val_if_fail(data != NULL, FALSE);
+ g_return_val_if_fail(data_len != 0, FALSE);
qd = (qq_data *) gc->proto_data;
/* qq_show_packet("Keep alive reply packet", data, len); */
/* the last one is 60, don't know what it is */
- if (NULL == (segments = split_data(data, data_len, "\x1f", 6)))
+ segments = split_data(data, data_len, "\x1f", 6);
+ if (segments == NULL)
return TRUE;
/* segments[0] and segment[1] are all 0x30 ("0") */
@@ -479,7 +481,7 @@ gboolean qq_process_keep_alive(guint8 *d
if(0 == qd->online_total) {
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
- _("Keep alive error"));
+ _("Lost connection with server"));
}
qd->my_ip.s_addr = inet_addr(segments[3]);
qd->my_port = strtol(segments[4], NULL, 10);
@@ -528,7 +530,7 @@ gboolean qq_process_keep_alive_2007(guin
if(0 == qd->online_total) {
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
- _("Keep alive error"));
+ _("Lost connection with server"));
}
bytes += qq_getIP(&qd->my_ip, data + bytes);
@@ -572,7 +574,7 @@ gboolean qq_process_keep_alive_2008(guin
if(0 == qd->online_total) {
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
- _("Keep alive error"));
+ _("Lost connection with server"));
}
bytes += qq_getIP(&qd->my_ip, data + bytes);
@@ -653,7 +655,7 @@ guint16 qq_process_get_server(PurpleConn
if (data_len < 15) {
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
- _("Can not decrypt get server reply"));
+ _("Could not decrypt server reply"));
return QQ_LOGIN_REPLY_ERR;
}
@@ -745,7 +747,7 @@ void qq_request_token_ex_next(PurpleConn
qd->send_seq++;
qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE);
- purple_connection_update_progress(gc, _("Requesting captcha ..."), 3, QQ_CONNECT_STEPS);
+ purple_connection_update_progress(gc, _("Requesting captcha"), 3, QQ_CONNECT_STEPS);
}
static void request_token_ex_code(PurpleConnection *gc,
@@ -790,7 +792,7 @@ static void request_token_ex_code(Purple
qd->send_seq++;
qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE);
- purple_connection_update_progress(gc, _("Checking code of captcha ..."), 3, QQ_CONNECT_STEPS);
+ purple_connection_update_progress(gc, _("Checking captcha"), 3, QQ_CONNECT_STEPS);
}
typedef struct {
@@ -813,7 +815,7 @@ static void captcha_input_cancel_cb(qq_c
purple_connection_error_reason(captcha_req->gc,
PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED,
- _("Failed captcha verify"));
+ _("Failed captcha verification"));
}
static void captcha_input_ok_cb(qq_captcha_request *captcha_req,
@@ -872,8 +874,8 @@ void qq_captcha_input_dialog(PurpleConne
purple_request_field_group_add_field(group, field);
purple_request_fields(account,
- _("QQ Captcha Verifying"),
- _("QQ Captcha Verifying"),
+ _("QQ Captcha Verification"),
+ _("QQ Captcha Verification"),
_("Enter the text from the image"),
fields,
_("OK"), G_CALLBACK(captcha_input_ok_cb),
@@ -1111,7 +1113,7 @@ guint8 qq_process_check_pwd( PurpleConne
qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len,
">>> [default] decrypt and dump");
error = g_strdup_printf(
- _("Unknown reply code when checking password (0x%02X)"),
+ _("Unknown reply when checking password (0x%02X)"),
ret );
reason = PURPLE_CONNECTION_ERROR_OTHER_ERROR;
break;
@@ -1257,7 +1259,7 @@ guint8 qq_process_login_2007( PurpleConn
/* Missing get server before login*/
default:
error = g_strdup_printf(
- _("Unknown reply code when login (0x%02X):\n%s"),
+ _("Unknown reply code when logging in (0x%02X):\n%s"),
ret, msg_utf8);
break;
}
@@ -1446,7 +1448,7 @@ guint8 qq_process_login_2008( PurpleConn
break;
default:
error = g_strdup_printf(
- _("Unknown reply code when login (0x%02X):\n%s"),
+ _("Unknown reply code when logging in (0x%02X):\n%s"),
ret, msg_utf8);
break;
}
============================================================
--- libpurple/protocols/qq/qq_network.c 6ef7bc80d675ecf13d5b89c1ec4034f14cb0bd58
+++ libpurple/protocols/qq/qq_network.c 239a1120df4db5c71119f0f12fef5aa49b34c611
@@ -376,7 +376,7 @@ static void tcp_pending(gpointer data, g
/* No worries */
return;
- error_msg = g_strdup_printf(_("Lost connection with server: %d, %s"), errno, g_strerror(errno));
+ error_msg = g_strdup_printf(_("Lost connection with server:\n%s"), g_strerror(errno));
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
error_msg);
@@ -773,12 +773,12 @@ static void connect_cb(gpointer data, gi
set_all_keys( gc );
if (qd->client_version >= 2007) {
- purple_connection_update_progress(gc, _("Get server ..."), 2, QQ_CONNECT_STEPS);
+ purple_connection_update_progress(gc, _("Getting server"), 2, QQ_CONNECT_STEPS);
qq_request_get_server(gc);
return;
}
- purple_connection_update_progress(gc, _("Request token"), 2, QQ_CONNECT_STEPS);
+ purple_connection_update_progress(gc, _("Requesting token"), 2, QQ_CONNECT_STEPS);
qq_request_token(gc);
}
@@ -935,7 +935,7 @@ gboolean connect_to_server(PurpleConnect
return FALSE;
}
- purple_connection_update_progress(gc, _("Connecting to server ..."), 1, QQ_CONNECT_STEPS);
+ purple_connection_update_progress(gc, _("Connecting to server"), 1, QQ_CONNECT_STEPS);
purple_debug_info("QQ", "Connect to %s:%d\n", server, port);
@@ -986,7 +986,7 @@ void qq_disconnect(PurpleConnection *gc)
g_return_if_fail(gc != NULL && gc->proto_data != NULL);
qd = (qq_data *) gc->proto_data;
- purple_debug_info("QQ", "Disconnecting ...\n");
+ purple_debug_info("QQ", "Disconnecting...\n");
if (qd->network_watcher > 0) {
purple_debug_info("QQ", "Remove network watcher\n");
============================================================
--- libpurple/protocols/qq/qq_process.c 85b85aafdc6f083c813b9d530db2d28d2310e2d1
+++ libpurple/protocols/qq/qq_process.c 7f3ccc2fd1731393f4f618090c7865fa3d1b54ca
@@ -87,7 +87,7 @@ static void do_im_ack(guint8 *data, gint
if (data[0] != 0) {
purple_debug_warning("QQ", "Failed sent IM\n");
- purple_notify_error(gc, _("Error"), _("Failed to send IM."), NULL);
+ purple_notify_error(gc, _("Error"), _("Unable to send message."), NULL);
return;
}
@@ -948,7 +948,7 @@ guint8 qq_proc_login_cmds(PurpleConnecti
qq_show_packet("Can not decrypted", rcved, rcved_len);
purple_connection_error_reason(gc,
PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
- _("Can not decrypt login reply"));
+ _("Could not decrypt login reply"));
return QQ_LOGIN_REPLY_ERR;
}
More information about the Commits
mailing list