Fix "%S" in displayed startup error message

This commit is contained in:
Abe Jellinek 2022-04-11 19:03:29 -07:00
parent 38f5551ee5
commit e03c1603ca

View file

@ -5175,14 +5175,18 @@ var ZoteroPane = new function()
var errFunc = Zotero.startupErrorHandler;
}
var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService);
var stringBundleService = Services.strings;
var src = 'chrome://zotero/locale/zotero.properties';
var stringBundle = stringBundleService.createBundle(src);
var title = stringBundle.GetStringFromName('general.error');
if (!errMsg) {
var errMsg = stringBundle.GetStringFromName('startupError');
var appName = Zotero && Zotero.appName
? Zotero.appName
: stringBundleService
.createBundle('chrome://branding/locale/brand.properties')
.GetStringFromName('brandShortName');
var errMsg = stringBundle.formatStringFromName('startupError', [appName], 1);
}
if (errFunc) {