comparison libpurple/protocols/qq/qq_base.c @ 24374:75545fdf8944

String changes. I'm kind of blindly making changes to the qq strings
author Mark Doliner <mark@kingant.net>
date Fri, 14 Nov 2008 19:58:32 +0000
parents 7c0a56c5fea0
children fecedf6d9ee1
comparison
equal deleted inserted replaced
24373:ad685dadbaca 24374:75545fdf8944
69 /* qq_show_packet("Login reply", data, len); */ 69 /* qq_show_packet("Login reply", data, len); */
70 70
71 if (len < 139) { 71 if (len < 139) {
72 purple_connection_error_reason(gc, 72 purple_connection_error_reason(gc,
73 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, 73 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
74 _("Can not decrypt get server reply")); 74 _("Can not decrypt server reply"));
75 return QQ_LOGIN_REPLY_ERR; 75 return QQ_LOGIN_REPLY_ERR;
76 } 76 }
77 77
78 bytes = 0; 78 bytes = 0;
79 bytes += qq_get8(&ret, data + bytes); 79 bytes += qq_get8(&ret, data + bytes);
402 case QQ_LOGIN_REPLY_REDIRECT: 402 case QQ_LOGIN_REPLY_REDIRECT:
403 purple_debug_info("QQ", "Redirect new server\n"); 403 purple_debug_info("QQ", "Redirect new server\n");
404 return process_login_redirect(gc, data, data_len); 404 return process_login_redirect(gc, data, data_len);
405 405
406 case 0x0A: /* extend redirect used in QQ2006 */ 406 case 0x0A: /* extend redirect used in QQ2006 */
407 error = g_strdup( _("Not support Redirect_EX now") ); 407 error = g_strdup( _("Redirect_EX is not currently supported") );
408 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; 408 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
409 break; 409 break;
410 case 0x05: /* invalid password */ 410 case 0x05: /* invalid password */
411 if (!purple_account_get_remember_password(gc->account)) { 411 if (!purple_account_get_remember_password(gc->account)) {
412 purple_account_set_password(gc->account, NULL); 412 purple_account_set_password(gc->account, NULL);
413 } 413 }
414 error = g_strdup( _("Error password")); 414 error = g_strdup( _("Incorrect password."));
415 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; 415 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
416 break; 416 break;
417 case 0x06: /* need activation */ 417 case 0x06: /* need activation */
418 error = g_strdup( _("Need active")); 418 error = g_strdup( _("Activation required"));
419 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; 419 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
420 break; 420 break;
421 421
422 default: 422 default:
423 qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len, 423 qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len,
787 bytes += qq_putdata(buf + bytes, encrypted, encrypted_len); 787 bytes += qq_putdata(buf + bytes, encrypted, encrypted_len);
788 788
789 qd->send_seq++; 789 qd->send_seq++;
790 qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE); 790 qq_send_cmd_encrypted(gc, QQ_CMD_TOKEN_EX, qd->send_seq, buf, bytes, TRUE);
791 791
792 purple_connection_update_progress(gc, _("Checking code of captcha ..."), 3, QQ_CONNECT_STEPS); 792 purple_connection_update_progress(gc, _("Checking code of captcha ..."), 3, QQ_CONNECT_STEPS);
793 } 793 }
794 794
795 typedef struct { 795 typedef struct {
796 PurpleConnection *gc; 796 PurpleConnection *gc;
797 guint8 *token; 797 guint8 *token;
871 purple_request_field_group_add_field(group, field); 871 purple_request_field_group_add_field(group, field);
872 872
873 purple_request_fields(account, 873 purple_request_fields(account,
874 _("QQ Captcha Verifing"), 874 _("QQ Captcha Verifing"),
875 _("QQ Captcha Verifing"), 875 _("QQ Captcha Verifing"),
876 _("Please fill code according to image"), 876 _("Enter the text from the image"),
877 fields, 877 fields,
878 _("OK"), G_CALLBACK(captcha_input_ok_cb), 878 _("OK"), G_CALLBACK(captcha_input_ok_cb),
879 _("Cancel"), G_CALLBACK(captcha_input_cancel_cb), 879 _("Cancel"), G_CALLBACK(captcha_input_cancel_cb),
880 purple_connection_get_account(gc), NULL, NULL, 880 purple_connection_get_account(gc), NULL, NULL,
881 captcha_req); 881 captcha_req);
1092 { 1092 {
1093 case 0x34: /* invalid password */ 1093 case 0x34: /* invalid password */
1094 if (!purple_account_get_remember_password(gc->account)) { 1094 if (!purple_account_get_remember_password(gc->account)) {
1095 purple_account_set_password(gc->account, NULL); 1095 purple_account_set_password(gc->account, NULL);
1096 } 1096 }
1097 error = g_strdup(_("Error password")); 1097 error = g_strdup(_("Incorrect password."));
1098 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; 1098 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
1099 break; 1099 break;
1100 case 0x33: /* need activation */ 1100 case 0x33: /* need activation */
1101 case 0x51: /* need activation */ 1101 case 0x51: /* need activation */
1102 error = g_strdup(_("Need active")); 1102 error = g_strdup(_("Activation required"));
1103 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; 1103 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
1104 break; 1104 break;
1105 case 0xBF: /* uid is not exist */ 1105 case 0xBF: /* uid is not exist */
1106 error = g_strdup(_("invalid user name")); 1106 error = g_strdup(_("Invalid username."));
1107 reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME; 1107 reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME;
1108 break; 1108 break;
1109 default: 1109 default:
1110 qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len, 1110 qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ", data, data_len,
1111 ">>> [default] decrypt and dump"); 1111 ">>> [default] decrypt and dump");