Mercurial > pidgin
changeset 28627:1b8e39c6d1f3
merge of '4ede3b155e9d443dcec45785cecef60b7af55de9'
and 'a32b7088cc5f5afb18b147305a3b0b278b7c3dfb'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 23 Nov 2009 06:13:24 +0000 |
parents | a401d3500a75 (current diff) 588fb0db1cd8 (diff) |
children | 66c4fbe088d0 |
files | |
diffstat | 4 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/mxit/actions.c Mon Nov 23 06:12:47 2009 +0000 +++ b/libpurple/protocols/mxit/actions.c Mon Nov 23 06:13:24 2009 +0000 @@ -150,37 +150,37 @@ /* validate pin */ pin = purple_request_fields_get_string( fields, "pin" ); if ( !pin ) { - err = _("The PIN you entered is invalid."); + err = _( "The PIN you entered is invalid." ); goto out; } len = strlen( pin ); if ( ( len < 4 ) || ( len > 10 ) ) { - err = _("The PIN you entered has an invalid length [4-10]."); + err = _( "The PIN you entered has an invalid length [4-10]." ); goto out; } for ( i = 0; i < len; i++ ) { if ( !g_ascii_isdigit( pin[i] ) ) { - err = _("The PIN is invalid. It should only consist of digits [0-9]."); + err = _( "The PIN is invalid. It should only consist of digits [0-9]." ); goto out; } } pin2 = purple_request_fields_get_string( fields, "pin2" ); if ( ( !pin2 ) || ( strcmp( pin, pin2 ) != 0 ) ) { - err = _("The two PINs you entered do not match."); + err = _( "The two PINs you entered do not match." ); goto out; } /* validate name */ name = purple_request_fields_get_string( fields, "name" ); if ( ( !name ) || ( strlen( name ) < 3 ) ) { - err = _("The name you entered is invalid."); + err = _( "The name you entered is invalid." ); goto out; } /* validate birthdate */ bday = purple_request_fields_get_string( fields, "bday" ); if ( ( !bday ) || ( strlen( bday ) < 10 ) || ( !validateDate( bday ) ) ) { - err = _("The birthday you entered is invalid. The correct format is: 'YYYY-MM-DD'."); + err = _( "The birthday you entered is invalid. The correct format is: 'YYYY-MM-DD'." ); goto out; } @@ -218,7 +218,7 @@ acount++; /* update gender */ - profile->male = ( purple_request_fields_get_choice( fields, "male" ) == 0 ); + profile->male = ( purple_request_fields_get_choice( fields, "male" ) != 0 ); g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_GENDER, CP_PROF_TYPE_BOOL, ( profile->male ) ? "1" : "0" ); g_string_append( attributes, attrib ); acount++; @@ -279,7 +279,7 @@ } else { /* show error to user */ - mxit_popup( PURPLE_NOTIFY_MSG_ERROR, _( "Profile Update Error" ), _( err ) ); + mxit_popup( PURPLE_NOTIFY_MSG_ERROR, _( "Profile Update Error" ), err ); } }
--- a/libpurple/protocols/mxit/login.c Mon Nov 23 06:12:47 2009 +0000 +++ b/libpurple/protocols/mxit/login.c Mon Nov 23 06:13:24 2009 +0000 @@ -254,7 +254,7 @@ g_strlcpy( profile->birthday, str, sizeof( profile->birthday ) ); /* gender */ - profile->male = ( purple_request_fields_get_choice( fields, "male" ) == 0 ); + profile->male = ( purple_request_fields_get_choice( fields, "male" ) != 0 ); /* pin */ pin = purple_request_fields_get_string( fields, "pin" ); @@ -287,7 +287,7 @@ } else { /* show error to user */ - mxit_popup( PURPLE_NOTIFY_MSG_ERROR, _( "Registration Error" ), _( err ) ); + mxit_popup( PURPLE_NOTIFY_MSG_ERROR, _( "Registration Error" ), err ); mxit_register_view( session ); } }
--- a/libpurple/protocols/mxit/mxit.c Mon Nov 23 06:12:47 2009 +0000 +++ b/libpurple/protocols/mxit/mxit.c Mon Nov 23 06:13:24 2009 +0000 @@ -205,7 +205,7 @@ case MXIT_TYPE_CHATROOM : case MXIT_TYPE_GALLERY : case MXIT_TYPE_INFO : - tmp = g_strdup_printf("<font color=\"#999999\">%s</font>\n", _("Loading menu...")); + tmp = g_strdup_printf("<font color=\"#999999\">%s</font>\n", _( "Loading menu..." )); serv_got_im( session->con, who, tmp, PURPLE_MESSAGE_NOTIFY, time( NULL ) ); g_free(tmp); mxit_send_message( session, who, " ", FALSE ); @@ -690,7 +690,8 @@ option = purple_account_option_bool_new( _( "Enable splash-screen popup" ), MXIT_CONFIG_SPLASHPOPUP, FALSE ); proto_info.protocol_options = g_list_append( proto_info.protocol_options, option ); - g_assert( sizeof( struct raw_chunk ) == 5 ); + if ( sizeof( struct raw_chunk ) != 5 ) + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "sizeof(struct raw_chunk) != 5! MXit probably won't work!\n"); } PURPLE_INIT_PLUGIN( mxit, init_plugin, plugin_info );
--- a/libpurple/protocols/mxit/protocol.c Mon Nov 23 06:12:47 2009 +0000 +++ b/libpurple/protocols/mxit/protocol.c Mon Nov 23 06:13:24 2009 +0000 @@ -1958,7 +1958,7 @@ } else { sprintf( errmsg, _( "Login error: %s (%i)" ), errdesc, packet->errcode ); - purple_connection_error( session->con, _( errmsg ) ); + purple_connection_error( session->con, errmsg ); return -1; } case CP_CMD_LOGOUT :