commit 1dd4761f26e503d26132e13590f60521f21a4f39
parent e82a56bb4c9cb6819457c05543a1ac37eb0f08b8
Author: Simon Kornblith <simon@simonster.com>
Date: Fri, 4 Mar 2011 18:41:05 +0000
Udpate to citeproc-js 1.0.120
Diffstat:
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -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];