Merging locale fallback fix to 1.0.0 tag

This commit is contained in:
Dan Stillman 2007-11-01 17:01:18 +00:00
parent 2dc8e439cf
commit 25ffb504b4
2 changed files with 32 additions and 8 deletions

View File

@ -1194,9 +1194,15 @@ Zotero.CSL.Global = new function() {
createInstance();
req.open("GET", prefix + loc + ext, false);
req.overrideMimeType("text/plain");
req.send(null);
var fail = false;
try {
req.send(null);
}
catch (e) {
fail = true;
}
if (req.responseText) {
if (!fail) {
Zotero.CSL.Global._xmlLang = loc;
var xml = req.responseText;
}
@ -1209,9 +1215,15 @@ Zotero.CSL.Global = new function() {
createInstance();
req.open("GET", prefix + loc + ext, false);
req.overrideMimeType("text/plain");
req.send(null);
var fail = false;
try {
req.send(null);
}
catch (e) {
fail = true;
}
if (req.responseText) {
if (!fail) {
Zotero.CSL.Global._xmlLang = loc;
var xml = req.responseText;
}

View File

@ -143,9 +143,15 @@ Zotero.CSL.Compat.Global = new function() {
createInstance();
req.open("GET", prefix + loc + ext, false);
req.overrideMimeType("text/plain");
req.send(null);
var fail = false;
try {
req.send(null);
}
catch (e) {
fail = true;
}
if (req.responseText) {
if (!fail) {
Zotero.CSL.Compat.Global._xmlLang = bibLocale;
var xml = req.responseText;
}
@ -158,9 +164,15 @@ Zotero.CSL.Compat.Global = new function() {
createInstance();
req.open("GET", prefix + loc + ext, false);
req.overrideMimeType("text/plain");
req.send(null);
var fail = false;
try {
req.send(null);
}
catch (e) {
fail = true;
}
if (req.responseText) {
if (!fail) {
Zotero.CSL.Compat.Global._xmlLang = loc;
var xml = req.responseText;
}