diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index e8d53acc37..3238a83be6 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -673,23 +673,8 @@ Zotero.Cite.Locale = { if (str) { return str; } - var uri = `chrome://zotero/content/locale/csl/locales-${locale}.xml`; try { - let protHandler = Components.classes["@mozilla.org/network/protocol;1?name=chrome"] - .createInstance(Components.interfaces.nsIProtocolHandler); - let channel = protHandler.newChannel(protHandler.newURI(uri)); - let cstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"] - .createInstance(Components.interfaces.nsIConverterInputStream); - cstream.init(channel.open(), "UTF-8", 0, 0); - let obj = {}; - let read = 0; - let str = ""; - do { - // Read as much as we can and put it in obj.value - read = cstream.readString(0xffffffff, obj); - str += obj.value; - } while (read != 0); - cstream.close(); + str = Zotero.File.getResource(`chrome://zotero/content/locale/csl/locales-${locale}.xml`); this._cache.set(locale, str); return str; }