Udpate to citeproc-js 1.0.120

This commit is contained in:
Simon Kornblith 2011-03-04 18:41:05 +00:00
parent e82a56bb4c
commit 1dd4761f26

View File

@ -1752,7 +1752,7 @@ CSL.DateParser = function (txt) {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
this.processor_version = "1.0.118";
this.processor_version = "1.0.120";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@ -2158,6 +2158,13 @@ CSL.Engine.prototype.setOriginalCreatorNameFormatOption = function (arg) {
this.opt["locale-use-original-name-format"] = false;
}
};
CSL.Engine.prototype.setSuppressTitleTransliterationOption = function (arg) {
if (arg) {
this.opt["locale-suppress-title-transliteration"] = true;
} else {
this.opt["locale-suppress-title-transliteration"] = false;
}
};
CSL.Engine.prototype.setAutoVietnameseNamesOption = function (arg) {
if (arg) {
this.opt["auto-vietnamese-names"] = true;
@ -6244,7 +6251,16 @@ CSL.Transform = function (state) {
} else if (transform_locale === "locale-sec") {
return function (state, Item) {
var primary, secondary, primary_tok, secondary_tok, key;
primary = getTextSubField(Item, myfieldname, "locale-pri", transform_fallback);
if (state.opt["locale-suppress-title-transliteration"]
&& (state.tmp.area === 'bibliography'
|| (state.opt.xclass === "note" &&
state.tmp.area === "citation")
)
) {
primary = Item[myfieldname];
} else {
primary = getTextSubField(Item, myfieldname, "locale-pri", transform_fallback);
}
secondary = getTextSubField(Item, myfieldname, "locale-sec");
if (secondary) {
primary_tok = CSL.Util.cloneToken(this);
@ -8615,7 +8631,7 @@ CSL.Registry.Comparifier = function (state, keyset) {
} else if ("undefined" === typeof b.sortkeys[pos]) {
cmp = sort_directions[pos][0];
} else {
cmp = a.sortkeys[pos].toLocaleLowerCase().localeCompare(b.sortkeys[pos].toLocaleLowerCase());
cmp = a.sortkeys[pos].localeCompare(b.sortkeys[pos]);
}
if (0 < cmp) {
return sort_directions[pos][1];