зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
aabb968456
Коммит
9ecd70ef6b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче