protected override IEnumerable <KeyValuePair <string, object> > GetClientVariables(HttpContext context) { var autoreplyDaysInterval = Convert.ToInt32(ConfigurationManager.AppSettings["mail.autoreply-days-interval"] ?? "1"); return(new List <KeyValuePair <string, object> >(6) { RegisterResourceSet("MailResource", MailResource.ResourceManager), RegisterResourceSet("MailScriptResource", MailScriptResource.ResourceManager), RegisterResourceSet("MailAttachmentsResource", MailAttachmentsResource.ResourceManager), RegisterResourceSet("MailActionCompleteResource", MailActionCompleteResource.ResourceManager), RegisterResourceSet("MailAdministrationResource", MailAdministrationResource.ResourceManager), RegisterResourceSet("MailApiErrorsResource", MailApiErrorsResource.ResourceManager), RegisterObject(new { ErrorOpenMessageHelp = string.Format(MailScriptResource.ErrorOpenMessageHelp.HtmlEncode(), "<a href=\"" + MailPage.GetMailSupportUri() + "\" target=\"_blank\">", "</a>"), ErrorParseMessageHelp = string.Format(MailScriptResource.ErrorParseMessageHelp.HtmlEncode(), "<a href=\"" + MailPage.GetMailSupportUri() + "\" target=\"_blank\">", "</a>"), FilesCannotBeAttachedAsLinks = string.Format(MailResource.FilesCannotBeAttachedAsLinks_Body, "<br/>"), Autoreply = string.Format(MailResource.AutoreplyInformationText, string.Format(GrammaticalHelper.ChooseNumeralCase(autoreplyDaysInterval, Resource.DrnAgoDaysI, Resource.DrnAgoDaysR1, Resource.DrnAgoDaysRm), autoreplyDaysInterval)), Resource.ErrorPasswordMessage, Resource.ErrorPasswordLength, Resource.ErrorPasswordNoDigits, Resource.ErrorPasswordNoUpperCase, Resource.ErrorPasswordNoSpecialSymbols, Resource.CopyEmailAndPassword, Resource.EmailAndPasswordCopiedToClipboard, Resource.ChangePasswordSuccess, Resource.ErrorPasswordOnlyLatinLetters, Resource.ErrorPasswordNoSpaces }) }); }