Fix for 128543. Convert server msg which contains key word "exceed max record" to a more user-friendly one. r=ducarroz, sr=mscott, a=asa.

This commit is contained in:
cavin%netscape.com 2002-03-05 22:33:00 +00:00
Родитель aabb968456
Коммит 9ecd70ef6b
3 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -37,3 +37,4 @@ passwordPrompt=Enter your Netcenter User Name and Password for Address Book Sync
passwordTitle=Enter Password
passwordError=You must enter a valid screen name and password for Address Book Synchronization
syncInProgress=Address Book Synchronization in progress...please wait...
exceedMaxRecordError=Synchronization failed because your Personal Address Book has exceeded the maximum limit of 1500 entries. Remove some entries from your Personal Address Book, and then try again.

Просмотреть файл

@ -2198,10 +2198,16 @@ nsAbSync::ProcessServerResponse(const char *aProtocolResponse)
if (ErrorFromServer(&errorString))
{
PRUnichar *outValue = GetString(NS_LITERAL_STRING("syncServerError").get());
PRUnichar *msgValue;
PRUnichar *msgValue, *outValue=nsnull;
// Covert server exceed max record msg here.
if (! nsCRT::strncasecmp(errorString, SYNC_ERROR_EXCEED_MAX_RECORD, nsCRT::strlen(SYNC_ERROR_EXCEED_MAX_RECORD)))
msgValue = GetString(NS_LITERAL_STRING("exceedMaxRecordError").get());
else
{
outValue = GetString(NS_LITERAL_STRING("syncServerError").get());
msgValue = nsTextFormatter::smprintf(outValue, errorString);
}
DisplayErrorMessage(msgValue);

Просмотреть файл

@ -136,6 +136,9 @@ typedef struct {
#define SYNC_GROUP_TYPE 3
#define SYNC_UNKNOWN_TYPE 0
// Server errors that need to be converted to more user-friendly ones.
#define SYNC_ERROR_EXCEED_MAX_RECORD "exceed max record"
//
// We need this structure for mapping our field names to the server
// field names