Fix Firefox 55 breakage (and remove unnecessary locale lookups)

We were manually looking up the current locale in various places and
passing it to nsIStringBundleService::createBundle(), but that hasn't
even been a supported argument for years. (I assume it was a long time
ago?)
This commit is contained in:
Dan Stillman 2017-07-09 06:56:56 -04:00
parent 59edca783e
commit 55b2dc39bf
5 changed files with 32 additions and 64 deletions

View file

@ -378,18 +378,10 @@ function ZoteroService() {
let quitStr = "Quit";
let checkForUpdateStr = "Check for Update";
try {
let appLocale;
if (Services.locale.getAppLocale) {
appLocale = Services.locale.getAppLocale();
}
// Fx <=53
else {
appLocale = Services.locale.getApplicationLocale();
}
let src = 'chrome://zotero/locale/zotero.properties';
let stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"]
.getService(Components.interfaces.nsIStringBundleService);
let stringBundle = stringBundleService.createBundle(src, appLocale);
let stringBundle = stringBundleService.createBundle(src);
errorStr = stringBundle.GetStringFromName('general.error');
checkForUpdateStr = stringBundle.GetStringFromName('general.checkForUpdate');
quitStr = stringBundle.GetStringFromName('general.quit');