Firefox 54 compatiblity for locale service

Services.locale.getApplicationLocale() -> getAppLocale()
(nsILocaleService -> mozILocaleService)

It's possible this will fix some of the locale resolution problems in
Standalone:

"This is actually a meaningful change because the old one was actually
using OS locale for platforms other than Windows. The new one is using
the app locale for all platforms." [1]

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1346674#c0
This commit is contained in:
Dan Stillman 2017-05-22 06:04:51 -04:00
parent 1b8704f133
commit 0ac37ab65a

View file

@ -242,7 +242,13 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
}
// Load in the localization stringbundle for use by getString(name)
if (Services.locale.getAppLocale) {
var appLocale = Services.locale.getAppLocale();
}
// Fx <=53
else {
var appLocale = Services.locale.getApplicationLocale();
}
_localizedStringBundle = Services.strings.createBundle(
"chrome://zotero/locale/zotero.properties", appLocale);