Using xul <stringbundle/> in mailnews instead of including strres.js everywhere. Patch by Mark Olson (maolson@earthlink.net). r=jag sr=bienvenu

This commit is contained in:
blakeross%telocity.com 2001-02-22 23:32:13 +00:00
Родитель eb6d0d33e6
Коммит a8fa2dbb3e
53 изменённых файлов: 236 добавлений и 180 удалений

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

@ -23,7 +23,7 @@
var editCard;
var gOnSaveListeners = new Array;
var Bundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");
var gAddressBookBundle;
function OnLoadNewCard()
{
@ -121,9 +121,9 @@ function OnLoadEditCard()
GetCardValues(editCard.card, document);
var displayName = editCard.card.displayName;
top.window.title = Bundle.formatStringFromName(editCard.titleProperty,
[ displayName ], 1);
var displayName = editCard.card.displayName;
top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
[ displayName ]);
}
function RegisterSaveListener(func)
@ -140,6 +140,7 @@ function CallSaveListeners()
function InitEditCard()
{
gAddressBookBundle = document.getElementById("bundle_addressBook");
// create editCard object that contains global variables for editCard.js
editCard = new Object;
@ -364,8 +365,8 @@ function GenerateDisplayName()
displayName = firstNameField.value + separator + lastNameField.value;
displayNameField.value = displayName;
top.window.title = Bundle.formatStringFromName(editCard.titleProperty,
[ displayName ], 1);
top.window.title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
[ displayName ]);
}
}
@ -375,8 +376,8 @@ function DisplayNameChanged()
editCard.generateDisplayName = false;
var displayName = document.getElementById('DisplayName').value;
var title = Bundle.formatStringFromName(editCard.titleProperty,
[ displayName ], 1);
var title = gAddressBookBundle.getFormattedString(editCard.titleProperty,
[ displayName ]);
if ( top.window.title != title )
top.window.title = title;
}

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

@ -21,13 +21,14 @@ Rights Reserved.
<!DOCTYPE window SYSTEM "chrome://messenger/locale/addressbook/abCardOverlay.dtd">
<overlay id="editcardOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCardOverlay.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
</stringbundleset>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCardOverlay.js"/>
<box id="editcard" align="vertical">

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

@ -21,26 +21,39 @@
* Alec Flett <alecf@netscape.com>
*/
var Bundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties")
//NOTE: gAddressBookBundle must be defined and set or this Overlay won't work
var zName = Bundle.GetStringFromName("propertyName") + ": ";
var zNickname = Bundle.GetStringFromName("propertyNickname") + ": ";
var zDisplayName = Bundle.GetStringFromName("propertyDisplayName") + ": ";
var zWork = Bundle.GetStringFromName("propertyWork") + ": ";
var zHome = Bundle.GetStringFromName("propertyHome") + ": ";
var zFax = Bundle.GetStringFromName("propertyFax") + ": ";
var zCellular = Bundle.GetStringFromName("propertyCellular") + ": ";
var zPager = Bundle.GetStringFromName("propertyPager") + ": ";
var zCustom1 = Bundle.GetStringFromName("propertyCustom1") + ": ";
var zCustom2 = Bundle.GetStringFromName("propertyCustom2") + ": ";
var zCustom3 = Bundle.GetStringFromName("propertyCustom3") + ": ";
var zCustom4 = Bundle.GetStringFromName("propertyCustom4") + ": ";
var zName;
var zNickname;
var zDisplayName;
var zWork;
var zHome;
var zFax;
var zCellular;
var zPager;
var zCustom1;
var zCustom2;
var zCustom3;
var zCustom4;
var rdf;
var cvData;
function OnLoadCardView()
{
zName = gAddressBookBundle.getString("propertyName") + ": ";
zNickname = gAddressBookBundle.getString("propertyNickname") + ": ";
zDisplayName = gAddressBookBundle.getString("propertyDisplayName") + ": ";
zWork = gAddressBookBundle.getString("propertyWork") + ": ";
zHome = gAddressBookBundle.getString("propertyHome") + ": ";
zFax = gAddressBookBundle.getString("propertyFax") + ": ";
zCellular = gAddressBookBundle.getString("propertyCellular") + ": ";
zPager = gAddressBookBundle.getString("propertyPager") + ": ";
zCustom1 = gAddressBookBundle.getString("propertyCustom1") + ": ";
zCustom2 = gAddressBookBundle.getString("propertyCustom2") + ": ";
zCustom3 = gAddressBookBundle.getString("propertyCustom3") + ": ";
zCustom4 = gAddressBookBundle.getString("propertyCustom4") + ": ";
rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService();
rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);
@ -133,7 +146,7 @@ function DisplayCardViewPane(abNode)
// set fields in card view pane
cvSetNode(data.CardTitle, Bundle.formatStringFromName("viewCardTitle", [ cardTitle], 1));
cvSetNode(data.CardTitle, gAddressBookBundle.getFormattedString("viewCardTitle", [ cardTitle]));
// Name section
cvSetNode(data.cvhName, nameHeader);

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

@ -25,10 +25,9 @@ Rights Reserved.
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCardViewOverlay.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCardViewOverlay.js"/>
<box id="CardViewBox" orient="vertical" flex="1">
<box id="CardViewBox" orient="vertical" flex="1">
<box id="CardViewInnerBox" orient="vertical" flex="1">

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

@ -30,6 +30,8 @@ Rights Reserved.
class="dialog"
align="vertical">
<stringbundleset id="stringbundleset"/>
<keyset id="keyset"/>
<box id="editcard"/>

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

@ -35,8 +35,7 @@ Rights Reserved.
ondragdrop="return DropOnAddressListTree(event);"
align="vertical">
<script language="JavaScript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundleset id="stringbundleset"/>
<keyset id="keyset"/>

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

@ -25,7 +25,10 @@ Rights Reserved.
<overlay id="editListOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
<box id="editlist" align="vertical">

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

@ -27,6 +27,7 @@ var parentURI;
var editList;
var hitReturnInList = false;
var oldListName = "";
var gAddressBookBundle;
function handleKeyPress(element, event)
{
@ -42,8 +43,7 @@ function mailingListExists(listname)
var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook);
if (addressbook.mailListNameExists(listname))
{
var strBundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");
var alertText = strBundle.GetStringFromName("mailListNameExists");
var alertText = gAddressBookBundle.getString("mailListNameExists");
alert(alertText);
return true;
}
@ -56,8 +56,7 @@ function GetListValue(mailList, doAdd)
if (mailList.listName.length == 0)
{
var strBundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");
var alertText = strBundle.GetStringFromName("emptyListName");
var alertText = gAddressBookBundle.getString("emptyListName");
alert(alertText);
return false;
}
@ -160,6 +159,8 @@ function MailListOKButton()
function OnLoadMailList()
{
//XXX: gAddressBookBundle is set in 2 places because of different callers
gAddressBookBundle = document.getElementById("bundle_addressBook");
doSetOKCancel(MailListOKButton, 0);
var selectedAB;
@ -219,6 +220,8 @@ function EditListOKButton()
function OnLoadEditList()
{
//XXX: gAddressBookBundle is set in 2 places because of different callers
gAddressBookBundle = document.getElementById("bundle_addressBook");
doSetOKCancel(EditListOKButton, 0);
parentURI = window.arguments[0].abURI;
@ -311,7 +314,7 @@ function awNotAnEmptyArea(event)
function awClickEmptySpace(targ, setFocus)
{
if (targ.localName != 'treechildren')
if ("localName" in targ && targ.localName != 'treechildren')
return;
dump("awClickEmptySpace\n");

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

@ -36,8 +36,7 @@ Rights Reserved.
ondragdrop="return DropOnAddressListTree(event);"
align="vertical">
<script language="JavaScript" src="chrome://messenger/content/addressbook/abMailListDialog.js"/>
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundleset id="stringbundleset"/>
<keyset id="keyset"/>

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

@ -26,7 +26,6 @@ Rights Reserved.
<!DOCTYPE window SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@ -35,6 +34,8 @@ Rights Reserved.
class="dialog"
align="vertical">
<stringbundleset id="stringbundleset"/>
<keyset id="keyset"/>
<box orient="horizontal" autostretch="never" valign="center">

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

@ -27,15 +27,20 @@ var msgCompFields = 0;
var editCardCallback = 0;
var gDialogResultsPaneSelectionChanged = 0;
var Bundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");
var gAddressBookBundle;
// localization strings
var prefixTo = Bundle.GetStringFromName("prefixTo") + ": ";
var prefixCc = Bundle.GetStringFromName("prefixCc") + ": ";
var prefixBcc = Bundle.GetStringFromName("prefixBcc") + ": ";
var prefixTo;
var prefixCc;
var prefixBcc;
function OnLoadSelectAddress()
{
gAddressBookBundle = document.getElementById("bundle_addressBook");
prefixTo = gAddressBookBundle.getString("prefixTo") + ": ";
prefixCc = gAddressBookBundle.getString("prefixCc") + ": ";
prefixBcc = gAddressBookBundle.getString("prefixBcc") + ": ";
InitCommonJS();
var toAddress="", ccAddress="", bccAddress="";
@ -144,8 +149,7 @@ function SelectAddressOKButton()
}
if(emptyEmail)
{
var Bundle = srGetStrBundle("chrome://messenger/locale/addressbook/addressBook.properties");
var alertText = Bundle.GetStringFromName("emptyEmailCard");
var alertText = gAddressBookBundle.getString("emptyEmailCard");
alert(alertText + emptyEmail);
return false;
}

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

@ -38,11 +38,12 @@ Rights Reserved.
onload="OnLoadSelectAddress()"
align="vertical">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCommon.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/abSelectAddressesDialog.js"/>
<script language="JavaScript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
<script language="JavaScript" src="chrome://global/content/globalOverlay.js"/>
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
<stringbundle id="bundle_composeMsgs" src="chrome://messenger/locale/messengercompose/composeMsgs.properties"/>
<script type="text/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
<script type="text/javascript" src="chrome://messenger/content/addressbook/abSelectAddressesDialog.js"/>
<script type="text/javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
<script type="text/javascript" src="chrome://global/content/globalOverlay.js"/>
<keyset id="keyset"/>

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

@ -1,9 +1,11 @@
var cvPrefs = 0;
var addressbook = 0;
var gUpdateCardView = 0;
var gAddressBookBundle;
function OnLoadAddressBook()
{
gAddressBookBundle = document.getElementById("bundle_addressBook");
verifyAccounts(); // this will do migration, if we need to.
top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance();
@ -289,8 +291,8 @@ function AbDeleteDirectory()
if (commonDialogsService)
{
commonDialogsService.Alert(window,
Bundle.GetStringFromName("cannotDeleteTitle"),
Bundle.GetStringFromName("cannotDeleteMessage"));
gAddressBookBundle.getString("cannotDeleteTitle"),
gAddressBookBundle.getString("cannotDeleteMessage"));
}
isPersonalOrCollectedAbsSelectedForDeletion = true;
@ -300,7 +302,7 @@ function AbDeleteDirectory()
if (!isPersonalOrCollectedAbsSelectedForDeletion) {
var confirmDeleteAddressbook =
Bundle.GetStringFromName("confirmDeleteAddressbook");
gAddressBookBundle.getString("confirmDeleteAddressbook");
if(!window.confirm(confirmDeleteAddressbook))
return;

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

@ -44,6 +44,10 @@ Rights Reserved.
persist="width height screenX screenY sizemode"
onload="OnLoadAddressBook()">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<script language="JavaScript" src="chrome://messenger/content/accountUtils.js"/>
<script language="JavaScript" src="chrome://messenger/content/widgetglue.js"/>
<script language="JavaScript" src="chrome://messenger/content/addressbook/addressbook.js"/>

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

@ -49,7 +49,7 @@ var currentPageId;
var pendingServerId;
var pendingPageId;
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
// services used
var RDF;
@ -65,6 +65,7 @@ var setDefaultButton;
// called when the whole document loads
// perform initialization here
function onLoad() {
gPrefsBundle = document.getElementById("bundle_prefs");
var selectedServer;
if (window.arguments && window.arguments[0])
@ -201,7 +202,7 @@ function onDuplicateAccount() {
accountManager.duplicateAccount(account);
}
catch (ex) {
var alertText = Bundle.GetStringFromName("failedDuplicateAccount");
var alertText = gPrefsBundle.getString("failedDuplicateAccount");
window.alert(alertText);
}
}
@ -242,7 +243,7 @@ function onDeleteAccount(event) {
if (!canDelete) return;
var confirmDeleteAccount =
Bundle.GetStringFromName("confirmDeleteAccount");
gPrefsBundle.getString("confirmDeleteAccount");
if (!window.confirm(confirmDeleteAccount)) return;
try {
@ -256,7 +257,7 @@ function onDeleteAccount(event) {
}
catch (ex) {
dump("failure to delete account: " + ex + "\n");
var alertText = Bundle.GetStringFromName("failedDeleteAccount");
var alertText = gPrefsBundle.getString("failedDeleteAccount");
window.alert(alertText);
}
}

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

@ -13,9 +13,9 @@
persist="screenX screenY width height"
onload="onLoad(event);">
<script language="JavaScript" src="chrome://messenger/content/accountUtils.js"/>
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script src="chrome://messenger/content/AccountManager.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script type="text/javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="text/javascript" src="chrome://messenger/content/AccountManager.js"/>
<keyset id="keyset"/>

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

@ -83,7 +83,7 @@ var accountCount = accounts.Count();
var nsIMsgIdentity = Components.interfaces.nsIMsgIdentity;
var nsIMsgIncomingServer = Components.interfaces.nsIMsgIncomingServer;
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
var commonDialogsService = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogsService = commonDialogsService.QueryInterface(Components.interfaces.nsICommonDialogs);
@ -96,6 +96,7 @@ var gCurrentAccountData;
// event handlers
function onLoad() {
gPrefsBundle = document.getElementById("bundle_prefs");
// wizard stuff
// instantiate the Wizard Manager
@ -164,8 +165,8 @@ function onCancel()
// really cancel if the user hits the "cancel" button
if (!(accountCount > 0)) {
var confirmTitle = Bundle.GetStringFromName("accountWizard");
var confirmMsg = Bundle.GetStringFromName("cancelWizard");
var confirmTitle = gPrefsBundle.getString("accountWizard");
var confirmMsg = gPrefsBundle.getString("cancelWizard");
if (commonDialogsService.Confirm(window,confirmTitle,confirmMsg))
window.close();
else
@ -571,18 +572,15 @@ function setDefaultCopiesAndFoldersPrefs(identity, server)
function AccountExists(userName,hostName,serverType)
{
dump("AccountExists("+userName+","+hostName+","+serverType+")\n");
var accountExists = false;
var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
try {
var server = accountManager.FindServer(userName,hostName,serverType);
if (server) {
dump("account exists\n");
accountExists = true;
}
}
catch (ex) {
dump("AccountExists() failed: "+ex+"\n");
accountExists = false;
}
return accountExists;

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

@ -33,7 +33,9 @@ Rights Reserved.
<keyset id="keyset"/>
<script src="chrome://global/content/strres.js"/>
<!-- XXX: strres.js is included so that WizardManager.js will work -->
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script src="chrome://global/content/wizardOverlay.js"/>
<script src="chrome://global/content/wizardHandlerSet.js"/>
<script src="chrome://global/content/wizardManager.js"/>

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

@ -28,15 +28,14 @@ var addButton;
var editButton;
var deleteButton;
var setDefaultButton;
var messengerStrings;
var gMessengerBundle;
var hasEdited=false; // whether any kind of edits have occured
// event handlersn
function onLoad()
{
if (!messengerStrings)
messengerStrings = srGetStrBundle("chrome://messenger/locale/messenger.properties");
gMessengerBundle = document.getElementById("bundle_messenger");
if (!smtpService)
smtpService = Components.classes["@mozilla.org/messengercompose/smtp;1"].getService(Components.interfaces.nsISmtpService);
@ -167,7 +166,7 @@ function createSmtpTreeItem(server, isDefault)
var hostname = server.hostname;
if (isDefault)
hostname += " " + messengerStrings.GetStringFromName("defaultServerTag");
hostname += " " + gMessengerBundle.getString("defaultServerTag");
treecell.setAttribute("value", hostname);
treeitem.setAttribute("key", server.key);

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

@ -38,7 +38,7 @@
style="width: 30em;"
>
<script language="javascript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<script language="javascript" src="SmtpServerList.js"/>
<keyset id="keyset"/>

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

@ -12,9 +12,11 @@
onload="parent.onPanelLoaded('am-copies.xul');"
align="vertical">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/widgetglue.js"/>
<script src="chrome://messenger/content/am-copies.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/am-copies.js"/>
<text hidden="true" wsm_persist="true" id="identity.fccFolder"/>
<text hidden="true" wsm_persist="true" id="identity.draftFolder"/>

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

@ -33,7 +33,6 @@
onload="onLoad();">
<script language="javascript" src="am-identity-advanced.js"/>
<script language="javascript" src="chrome://global/content/strres.js"/>
<html style="width: 20em; ">&smtpDesc.label;</html>
<separator class="thin"/>

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

@ -11,6 +11,7 @@
onload="parent.onPanelLoaded('am-main.xul');"
orient="vertical">
<!-- XXX: Replace strres.js when prefutilities is converted -->
<script src="chrome://global/content/strres.js"/>
<script src="chrome://communicator/content/pref/prefutilities.js"/>
<script src="chrome://messenger/content/am-main.js"/>

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

@ -45,8 +45,8 @@ function initServerType() {
var propertyName = "serverType-" + serverType;
var stringBundle = document.getElementById("bundle_messenger");
var verboseName = stringBundle.getString(propertyName);
var messengerBundle = document.getElementById("bundle_messenger");
var verboseName = messengerBundle.getString(propertyName);
setDivText("servertype.verbose", verboseName);
}

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

@ -22,13 +22,13 @@
* Seth Spitzer <sspitzer@netscape.com>
*/
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
function validate() {
var accountname = document.getElementById("prettyName").value;
if (!accountname || accountname =="") {
var alertText = Bundle.GetStringFromName("enterAccountName");
var alertText = gPrefsBundle.getString("enterAccountName");
window.alert(alertText);
return false;
}
@ -36,6 +36,7 @@ function validate() {
}
function onInit() {
gPrefsBundle = document.getElementById("bundle_prefs");
var accountNameInput = document.getElementById("prettyName");
if (accountNameInput.value=="") {
var pageData = parent.GetPageData();

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

@ -32,7 +32,7 @@ Rights Reserved.
orient="vertical"
onload="parent.wizardManager.onPageLoad('accname');">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script language="JavaScript" src="chrome://messenger/content/aw-accname.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>

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

@ -18,9 +18,10 @@
* Rights Reserved.
*/
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
function onInit() {
gPrefsBundle = document.getElementById("bundle_prefs");
var pageData = parent.wizardManager.WSM.PageData;
var showMailServerDetails = true;
@ -65,7 +66,7 @@ function onInit() {
{
var prettyName = currentAccountData.incomingServer.prettyName;
// Get the polished account name
accountName = Bundle.GetStringFromName("accountName")
accountName = gPrefsBundle.getString("accountName")
.replace(/%prettyName%/, prettyName)
.replace(/%username%/, userName);

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

@ -30,7 +30,7 @@ Rights Reserved.
class="color-dialog"
onload="parent.wizardManager.onPageLoad('done');">
<script src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script src="chrome://messenger/content/aw-done.js"/>
<box class="box-header" title="&completionTitle.label;"/>

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

@ -23,14 +23,14 @@
*/
var currentDomain;
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
function validate(data)
{
var name = document.getElementById("fullName").value;
if (! name || name=="") {
var alertText = Bundle.GetStringFromName("enterName");
var alertText = gPrefsBundle.getString("enterName");
window.alert(alertText);
return false;
}
@ -64,7 +64,7 @@ function validateEmail() {
}
if (email.length =="") {
var alertText = Bundle.GetStringFromName("enterValidEmailPrefix");
var alertText = gPrefsBundle.getString("enterValidEmailPrefix");
window.alert(alertText);
return false;
}
@ -74,7 +74,7 @@ function validateEmail() {
if (emailArray.length != 2 ||
emailArray[0] == "" ||
emailArray[1] == "") {
alertText = Bundle.GetStringFromName("enterValidEmail");
alertText = gPrefsBundle.getString("enterValidEmail");
window.alert(alertText);
return false;
}
@ -85,6 +85,7 @@ function validateEmail() {
function onInit()
{
gPrefsBundle = document.getElementById("bundle_prefs");
setEmailDescriptionText();
checkForDomain();
checkForFullName();
@ -120,7 +121,7 @@ function setEmailDescriptionText()
emailIDTitle)
{
// Get email description data
displayText = Bundle.GetStringFromName("customizedEmailText")
displayText = gPrefsBundle.getString("customizedEmailText")
.replace(/%emailProvider%/g, emailProvider)
.replace(/%mailIDDesc%/g, emailIDDesc)
.replace(/%sampleEmail%/, sampleEmail)
@ -138,10 +139,10 @@ function setEmailDescriptionText()
if (setDefaultEmailDescStrings)
{
// Check for obtained values and set with default values if needed
var username = Bundle.GetStringFromName("exampleEmailUserName");
var domain = Bundle.GetStringFromName("exampleEmailDomain");
var username = gPrefsBundle.getString("exampleEmailUserName");
var domain = gPrefsBundle.getString("exampleEmailDomain");
displayText = Bundle.GetStringFromName("defaultEmailText")
displayText = gPrefsBundle.getString("defaultEmailText")
.replace(/%username%/, username)
.replace(/%domain%/, domain);
}

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

@ -31,7 +31,7 @@ Rights Reserved.
class="color-dialog"
onload="parent.wizardManager.onPageLoad('identity');">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script language="JavaScript" src="chrome://messenger/content/aw-identity.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>

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

@ -23,13 +23,13 @@
*/
var protocolinfo = null;
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
function validate() {
var username = document.getElementById("username").value;
if (protocolinfo && protocolinfo.requiresUsername && (!username || username == "")) {
var alertText = Bundle.GetStringFromName("enterUserName");
var alertText = gPrefsBundle.getString("enterUserName");
window.alert(alertText);
return false;
}
@ -39,7 +39,7 @@ function validate() {
var hostName = parent.getCurrentHostname(pageData);
if (parent.AccountExists(username,hostName,serverType)) {
alertText = Bundle.GetStringFromName("accountExists");
alertText = gPrefsBundle.getString("accountExists");
window.alert(alertText);
return false;
}
@ -47,6 +47,7 @@ function validate() {
}
function onInit() {
gPrefsBundle = document.getElementById("bundle_prefs");
var loginNameInput = document.getElementById("username");
if (loginNameInput.value == "") {

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

@ -31,7 +31,7 @@ Rights Reserved.
class="color-dialog"
onload="parent.wizardManager.onPageLoad('login');">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script language="JavaScript" src="chrome://messenger/content/aw-login.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>

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

@ -31,7 +31,7 @@ Rights Reserved.
class="color-dialog"
onload="parent.wizardManager.onPageLoad('newsserver');">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script language="JavaScript" src="chrome://messenger/content/aw-server.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>

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

@ -22,7 +22,7 @@
* Seth Spitzer <sspitzer@netscape.com>
*/
var Bundle = srGetStrBundle("chrome://messenger/locale/prefs.properties");
var gPrefsBundle;
function validate() {
var servername = document.getElementById("hostname");
@ -30,7 +30,7 @@ function validate() {
if ((servername && servername.value =="") ||
(smtpserver && smtpserver.value == "")) {
var alertText = Bundle.GetStringFromName("enterValidHostname");
var alertText = gPrefsBundle.getString("enterValidHostname");
window.alert(alertText);
return false;
}
@ -47,7 +47,7 @@ function validate() {
var hostName = servername.value;
if (parent.AccountExists(userName,hostName,serverType)) {
alertText = Bundle.GetStringFromName("accountExists");
alertText = gPrefsBundle.getString("accountExists");
window.alert(alertText);
return false;
}
@ -57,7 +57,7 @@ function validate() {
}
function onInit() {
gPrefsBundle = document.getElementById("bundle_prefs");
var smtpTextField = document.getElementById("smtphostname");
var smtpServer = parent.smtpService.defaultServer;

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

@ -31,7 +31,7 @@ Rights Reserved.
class="color-dialog"
onload="parent.wizardManager.onPageLoad('server');">
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script language="JavaScript" src="chrome://messenger/content/aw-server.js"/>
<script language="JavaScript" src="chrome://messenger/content/aw-wizardAdapter.js"/>

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

@ -41,6 +41,7 @@ Contributor(s):
"newMailNotification" ];
]]>
</script>
<!-- XXX: Replace strres.js when prefutilities is converted -->
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<script type="text/javascript" src="chrome://communicator/content/pref/prefutilities.js"/>
<script type="text/javascript" src="chrome://messenger/content/pref-mailnews.js"/>

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

@ -38,7 +38,8 @@
}
]]>
</script>
<!-- XXX: Replace strres.js when prefutilities is converted -->
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<script type="text/javascript" src="chrome://communicator/content/pref/prefutilities.js"/>

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

@ -25,9 +25,14 @@
//The eventual goal is for this file to go away and for the functions to either be brought into
//mailCommands.js or into 3pane specific code.
//NOTE: gMessengerBundle and gBrandBundle must be defined and set
// for this Overlay to work properly
var gFolderJustSwitched = false;
var gBeforeFolderLoadTime;
var gRDFNamespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
function OpenURL(url)
{
//dump("\n\nOpenURL from XUL\n\n\n");
@ -35,9 +40,6 @@ function OpenURL(url)
messenger.OpenURL(url);
}
function GetMsgFolderFromNode(folderNode)
{
var folderURI = folderNode.getAttribute("id");
@ -141,7 +143,7 @@ function setTitleFromFolder(msgfolder, subject)
var end;
if (server.type == "nntp") {
// <folder> on <hostname>
middle = Bundle.GetStringFromName("titleNewsPreHost");
middle = gMessengerBundle.getString("titleNewsPreHost");
end = server.hostName;
} else {
var identity;
@ -150,7 +152,7 @@ function setTitleFromFolder(msgfolder, subject)
identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity);
// <folder> for <email>
middle = Bundle.GetStringFromName("titleMailPreHost");
middle = gMessengerBundle.getString("titleMailPreHost");
end = identity.email;
} catch (ex) {
}
@ -162,7 +164,7 @@ function setTitleFromFolder(msgfolder, subject)
if (end) title += " " + end;
}
title += " - " + BrandBundle.GetStringFromName("brandShortName");
title += " - " + gBrandBundle.getString("brandShortName");
window.title = title;
}
@ -327,14 +329,14 @@ function SetSentFolderColumns(isSentFolder)
if(isSentFolder)
{
senderColumn.setAttribute("value", Bundle.GetStringFromName("recipientColumnHeader"));
senderColumn.setAttribute("value", gMessengerBundle.getString("recipientColumnHeader"));
senderColumn.setAttribute("onclick", "return top.MsgSortByRecipient();");
senderColumnTemplate.setAttribute("value", "rdf:http://home.netscape.com/NC-rdf#Recipient");
authorColumnHeader.setAttribute("resource", "http://home.netscape.com/NC-rdf#Recipient");
}
else
{
senderColumn.setAttribute("value", Bundle.GetStringFromName("senderColumnHeader"));
senderColumn.setAttribute("value", gMessengerBundle.getString("senderColumnHeader"));
senderColumn.setAttribute("onclick", "return top.MsgSortBySender();");
senderColumnTemplate.setAttribute("value", "rdf:http://home.netscape.com/NC-rdf#Sender");
authorColumnHeader.setAttribute("resource", "http://home.netscape.com/NC-rdf#Sender");
@ -352,14 +354,14 @@ function SetNewsFolderColumns(isNewsFolder)
if (isNewsFolder)
{
sizeColumn.setAttribute("value",Bundle.GetStringFromName("linesColumnHeader"));
sizeColumn.setAttribute("value", gMessengerBundle.getString("linesColumnHeader"));
sizeColumn.setAttribute("onclick", "return top.MsgSortByLines();");
sizeColumnTemplate.setAttribute("value", "rdf:http://home.netscape.com/NC-rdf#Lines");
memoryColumnHeader.setAttribute("resource","http://home.netscape.com/NC-rdf#Lines");
}
else
{
sizeColumn.setAttribute("value", Bundle.GetStringFromName("sizeColumnHeader"));
sizeColumn.setAttribute("value", gMessengerBundle.getString("sizeColumnHeader"));
sizeColumn.setAttribute("onclick", "return top.MsgSortBySize();");
sizeColumnTemplate.setAttribute("value", "rdf:http://home.netscape.com/NC-rdf#Size");
memoryColumnHeader.setAttribute("resource","http://home.netscape.com/NC-rdf#Size");
@ -376,11 +378,11 @@ function UpdateStatusMessageCounts(folder)
if(folder && unreadElement && totalElement)
{
var numUnread =
Bundle.formatStringFromName("unreadMsgStatus",
[ folder.getNumUnread(false)], 1);
gMessengerBundle.getFormattedString("unreadMsgStatus",
[ folder.getNumUnread(false)]);
var numTotal =
Bundle.formatStringFromName("totalMsgStatus",
[folder.getTotalMessages(false)], 1);
gMessengerBundle.getFormattedString("totalMsgStatus",
[folder.getTotalMessages(false)]);
unreadElement.setAttribute("value", numUnread);
totalElement.setAttribute("value", numTotal);
@ -1001,4 +1003,3 @@ function Redo()
{
messenger.Redo(msgWindow);
}

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

@ -36,7 +36,6 @@
class="dialog" orient="vertical">
<script language="Javascript" src="chrome://global/content/globalOverlay.js"></script>
<script language="JavaScript" src="chrome://global/content/strres.js"></script>
<script language="JavaScript" src="chrome://messenger/content/folderProps.js"></script>
<keyset id="keyset"/>

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

@ -50,8 +50,10 @@ Rights Reserved.
persist="width height screenX screenY sizemode"
windowtype="mail:3pane">
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/shareglue.js"/>
@ -92,8 +94,6 @@ Rights Reserved.
<broadcasterset id="broadcasterset"/>
<stringbundleset id="stringbundleset"/>
<keyset id="keyset"/>
<popupset>

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

@ -20,6 +20,8 @@
*
*/
//NOTE: gMessengerBundle must be defined and set or this Overlay won't work
function fillThreadPaneContextMenu()
{
var selectedMessages = GetSelectedMessages();
@ -139,13 +141,13 @@ function SetupDeleteMenuItem(menuID, numSelected, isNewsgroup, forceHide)
EnableMenuItem(menuID, (numSelected > 0));
if(!isNewsgroup)
{
SetMenuItemValue(menuID, Bundle.GetStringFromName("delete"));
SetMenuItemAccessKey(menuID, Bundle.GetStringFromName("deleteAccessKey"));
SetMenuItemValue(menuID, gMessengerBundle.getString("delete"));
SetMenuItemAccessKey(menuID, gMessengerBundle.getString("deleteAccessKey"));
}
else
{
SetMenuItemValue(menuID, Bundle.GetStringFromName("cancel"));
SetMenuItemAccessKey(menuID, Bundle.GetStringFromName("cancelAccessKey"));
SetMenuItemValue(menuID, gMessengerBundle.getString("cancel"));
SetMenuItemAccessKey(menuID, gMessengerBundle.getString("cancelAccessKey"));
}
}
}
@ -232,7 +234,7 @@ function SetupRenameMenuItem(targetFolder, numSelected, isServer, serverType, sp
if(canRename)
{
SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameFolder"));
SetMenuItemValue("folderPaneContext-rename", gMessengerBundle.getString("renameFolder"));
}
}
@ -249,7 +251,7 @@ function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, sp
if(isMail && !isSpecialFolder)
{
SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeFolder"));
SetMenuItemValue("folderPaneContext-remove", gMessengerBundle.getString("removeFolder"));
}
}
@ -261,7 +263,7 @@ function SetupCompactMenuItem(targetFolder, numSelected)
if(canCompact)
{
SetMenuItemValue("folderPaneContext-compact", Bundle.GetStringFromName("compactFolder"));
SetMenuItemValue("folderPaneContext-compact", gMessengerBundle.getString("compactFolder"));
}
}
@ -276,9 +278,9 @@ function SetupNewMenuItem(targetFolder, numSelected, isServer, serverType, speci
if(showNew)
{
if(isServer || isInbox)
SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newFolder"));
SetMenuItemValue("folderPaneContext-new", gMessengerBundle.getString("newFolder"));
else
SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newSubfolder"));
SetMenuItemValue("folderPaneContext-new", gMessengerBundle.getString("newSubfolder"));
}
}
@ -431,7 +433,3 @@ function IsMenuItemShowingWithStyle(menuID)
}
return false;
}

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

@ -43,8 +43,8 @@ var msgComposeFormat;
var mailSession;
var Bundle;
var BrandBundle;
var gMessengerBundle;
var gBrandBundle;
var datasourceContractIDPrefix = "@mozilla.org/rdf/datasource;1?name=";
var accountManagerDSContractID = datasourceContractIDPrefix + "msgaccountmanager";
@ -152,8 +152,8 @@ function CreateMailWindowGlobals()
msgComposeType = Components.interfaces.nsIMsgCompType;
msgComposeFormat = Components.interfaces.nsIMsgCompFormat;
Bundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
BrandBundle = srGetStrBundle("chrome://global/locale/brand.properties");
gMessengerBundle = document.getElementById("bundle_messenger");
gBrandBundle = document.getElementById("bundle_brand");
//Create datasources
accountManagerDataSource = Components.classes[accountManagerDSContractID].createInstance();
@ -338,8 +338,8 @@ nsMsgStatusFeedback.prototype =
this.ensureStatusFields();
// Record page loading time.
var elapsed = ( (new Date()).getTime() - this.startTime ) / 1000;
var msg = Bundle.GetStringFromName("documentDonePrefix") +
elapsed + Bundle.GetStringFromName("documentDonePostfix");
var msg = gMessengerBundle.getString("documentDonePrefix") +
elapsed + gMessengerBundle.getString("documentDonePostfix");
this.showStatusString(msg);
defaultStatus = msg;

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

@ -21,8 +21,12 @@
* slucy@objectivesw.co.uk
*/
var gMessengerBundle;
function file_init()
{
if (!gMessengerBundle)
gMessengerBundle = document.getElementById("bundle_messenger");
file_attachments();
/* file_attachments() can return false to indicate a load failure,
but if you return false to oncreate then
@ -53,6 +57,8 @@ function file_attachments()
function view_init()
{
if (!gMessengerBundle)
gMessengerBundle = document.getElementById("bundle_messenger");
var message_menuitem=document.getElementById('menu_showMessage');
if (message_menuitem)
@ -593,10 +599,9 @@ function MsgSubscribe()
function ConfirmUnsubscribe(folder)
{
var sBundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
var titleMsg = sBundle.GetStringFromName("confirmUnsubscribeTitle");
var dialogMsg = sBundle.formatStringFromName("confirmUnsubscribeText",
[ folder.name], 1);
var titleMsg = gMessengerBundle.getString("confirmUnsubscribeTitle");
var dialogMsg = gMessengerBundle.getFormattedString("confirmUnsubscribeText",
[ folder.name]);
var commonDialogService = nsJSComponentManager.getService("@mozilla.org/appshell/commonDialogs;1",
"nsICommonDialogs");
@ -607,7 +612,7 @@ function MsgUnsubscribe()
{
var folder = GetFirstSelectedMsgFolder();
if (ConfirmUnsubscribe(folder)) {
UnSubscribe(folder);
UnSubscribe(folder);
}
}
@ -921,8 +926,8 @@ function IsGetNextNMessagesEnabled()
var menuItem = document.getElementById("menu_getnextnmsg");
if((serverType == "nntp")) {
var newsServer = server.QueryInterface(Components.interfaces.nsINntpIncomingServer);
var menuValue = Bundle.formatStringFromName("getNextNMessages",
[ newsServer.maxArticles], 1);
var menuValue = gMessengerBundle.getFormattedString("getNextNMessages",
[ newsServer.maxArticles ]);
menuItem.setAttribute("value",menuValue);
menuItem.setAttribute("hidden","false");
return true;
@ -947,7 +952,7 @@ function IsCompactFolderEnabled()
if (numFolders <= 0 )
return false;
var folder = selectedFolders[0];
var folder = selectedFolders[0];
if (!folder)
return false;

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

@ -45,8 +45,11 @@ Rights Reserved.
persist="width height screenX screenY sizemode"
windowtype="mail:messageWindow">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<script type="text/javascript" src="chrome://messenger/content/shareglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/mailWindow.js"/>
@ -69,8 +72,6 @@ Rights Reserved.
oncommandupdate="CommandUpdate_Mail()"/>
</commands>
<stringbundleset id="stringbundleset"/>
<broadcasterset id="broadcasterset"/>
<keyset id="keyset"/>

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

@ -50,8 +50,10 @@ Rights Reserved.
persist="width height screenX screenY sizemode"
windowtype="mail:3pane">
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/commandglue.js"/>
<script type="text/javascript" src="chrome://messenger/content/shareglue.js"/>
@ -91,8 +93,6 @@ Rights Reserved.
</commands>
<stringbundleset id="stringbundleset"/>
<broadcasterset id="broadcasterset"/>
<keyset id="keyset"/>

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

@ -18,9 +18,7 @@
* Rights Reserved.
*/
var selectedServer = null;
var brandBundle = null;
var msgBundle = null;
var selectedServer = null;
function OnInit()
{
@ -29,6 +27,8 @@ function OnInit()
var brandName = null;
var acctType = null;
var acctName = null;
var brandBundle;
var messengerBundle;
// Set the header for the page.
// Title containts the brand name of the application and the account
@ -38,22 +38,22 @@ function OnInit()
titleElement = document.getElementById("AccountCentralTitle");
// Get the brand name
brandBundle = srGetStrBundle("chrome://global/locale/brand.properties");
brandName = brandBundle.GetStringFromName("brandShortName");
brandBundle = document.getElementById("bundle_brand");
brandName = brandBundle.getString("brandShortName");
// Get the account type
msgBundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
messengerBundle = document.getElementById("brand_messenger");
selectedServer = GetSelectedServer();
var serverType = selectedServer.type;
if (serverType == "nntp")
acctType = msgBundle.GetStringFromName("newsAcctType");
acctType = messengerBundle.getString("newsAcctType");
else
acctType = msgBundle.GetStringFromName("mailAcctType");
acctType = messengerBundle.getString("mailAcctType");
// Get the account name
acctName = GetSelectedMsgFolderName();
title = msgBundle.GetStringFromName("acctCentralTitleFormat")
title = messengerBundle.getString("acctCentralTitleFormat")
.replace(/%brandName%/, brandName)
.replace(/%accountType%/, acctType)
.replace(/%accountName%/, acctName);

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

@ -36,7 +36,9 @@ Rights Reserved.
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="OnInit();">
<script language="javascript" src="chrome://global/content/strres.js"/>
<stringbundle id="bundle_brand" src="chrome://global/locale/brand.properties"/>
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
<stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
<script type="text/javascript" src="chrome://messenger/content/AccountManager.js"/>
<script type="text/javascript" src="chrome://messenger/content/accountUtils.js"/>
<script type="text/javascript" src="chrome://messenger/content/mailCommands.js"/>

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

@ -21,12 +21,11 @@
* Alec Flett <alecf@netscape.com>
*/
var pickerBundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
var gMessengerBundle;
// call this from dialog onload() to set the menu item to the correct value
function MsgFolderPickerOnLoad(pickerID)
{
//dump("in MsgFolderPickerOnLoad()\n");
var uri = null;
try {
uri = window.arguments[0].preselectedURI;
@ -72,6 +71,9 @@ function PickedMsgFolder(selection,pickerID)
function SetFolderPicker(uri,pickerID)
{
if (!gMessengerBundle)
gMessengerBundle = document.getElementById("bundle_messenger");
var picker = document.getElementById(pickerID);
var msgfolder = GetMsgFolderFromUri(uri);
@ -90,7 +92,7 @@ function SetFolderPicker(uri,pickerID)
serverName = "???";
}
selectedValue = pickerBundle.GetStringFromName("verboseFolderFormat")
selectedValue = gMessengerBundle.getString("verboseFolderFormat")
.replace(/%folderName%/, msgfolder.name)
.replace(/%serverName%/, serverName);
}

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

@ -24,9 +24,11 @@ Rights Reserved.
<overlay id="msgFolderPicker"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script language="JavaScript" src="chrome://messenger/content/msgFolderPickerOverlay.js"/>
<script language="JavaScript" src="chrome://messenger/content/mailCommands.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
</stringbundleset>
<script type="text/javascript" src="chrome://messenger/content/msgFolderPickerOverlay.js"/>
<script type="text/javascript" src="chrome://messenger/content/mailCommands.js"/>
<menu class="push" value="&newfolderclickhere.label;" uri="" id="msgNewFolderPicker" datasources="rdf:msgaccountmanager rdf:mailnewsfolders" ignore="http://home.netscape.com/NC-rdf#MessageChild"
ref="msgaccounts:/">

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

@ -32,6 +32,8 @@
//
////////////////////////////////////////////////////////////////////////////////////
//NOTE: gMessengerBundle must be defined and set or this Overlay won't work
var msgHeaderParserContractID = "@mozilla.org/messenger/headerparser;1";
var abAddressCollectorContractID = "@mozilla.org/addressbook/services/addressCollecter;1";
@ -65,6 +67,7 @@ var numOfEmailsInCcField = 0;
// beginning or at the end of a list of emails in to/cc fields.
var gNumOfEmailsToShowToggleButtonInFront = 15;
function OnLoadMsgHeaderPane()
{
// build a document object for the header pane so we can cache fetches for elements
@ -217,7 +220,7 @@ var messageHeaderSink = {
if (notDownloaded)
{
screenDisplayName += " " + Bundle.GetStringFromName("notDownloaded");
screenDisplayName += " " + gMessengerBundle.getString("notDownloaded");
}
AddAttachmentToMenu(screenDisplayName, commandString);
@ -850,4 +853,3 @@ function hdrViewSetVisible(boxNode, visible)
else
boxNode.setAttribute("collapsed", "true");
}

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

@ -42,6 +42,7 @@ Rights Reserved.
screenY="10000"
windowtype="mail:printEngine">
<!-- XXX: utilityOverlay.xul uses strres.js - once it is converted, this should be removed-->
<html:script src="chrome://global/content/strres.js"/>
<html:script src="chrome://messenger/content/msgPrintEngine.js"/>

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

@ -20,23 +20,25 @@
/* This file contains the js functions necessary to implement view navigation within the 3 pane. */
//NOTE: gMessengerBundle must be defined and set or this Overlay won't work
// These are the types of navigation you can do
var navigateAny=0;
var navigateUnread = 1;
var navigateFlagged = 2;
var navigateNew = 3;
var Bundle = srGetStrBundle("chrome://messenger/locale/messenger.properties");
var commonDialogs = Components.classes["@mozilla.org/appshell/commonDialogs;1"].getService();
commonDialogs = commonDialogs.QueryInterface(Components.interfaces.nsICommonDialogs);
var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);
function FindNextFolder(originalFolderURI)
{
if (!originalFolderURI) return null;
var originalFolderResource = RDF.GetResource(originalFolderURI);
var folder = originalFolderResource.QueryInterface(Components.interfaces.nsIFolder);
var folder = originalFolderResource.QueryInterface(Components.interfaces.nsIFolder);
if (!folder) return null;
dump("folder = " + folder.URI + "\n");
@ -168,7 +170,8 @@ function GoNextMessage(type, startFromBeginning )
break;
case 1:
var promptText = Bundle.formatStringFromName("advanceNextPrompt", [ nextFolder.name ], 1);
var promptText = gMessengerBundle.getFormattedString("advanceNextPrompt",
[ nextFolder.name ]);
if (commonDialogs.Confirm(window, promptText, promptText)) {
gNextMessageAfterLoad = true;
SelectFolder(nextFolderURI);

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

@ -37,7 +37,7 @@
width="200" height="180"
onload="onLoad();">
<script type="text/javascript" src="chrome://global/content/strres.js"/>
<stringbundleset id="stringbundleset"/>
<script type="text/javascript" src="chrome://messenger/content/mailCommands.js"/>
<script type="text/javascript" src="chrome://messenger/content/newFolderDialog.js"/>