commit 9457927a3e49afd17af4da200c9f1e1daa531ce7
parent b526a7f801329565e95e4c00136c42f03b409373
Author: Frank <biercenator@gmail.com>
Date: Fri, 27 Jan 2012 16:05:36 +0800
Upgrade citeproc-js to version 1.0.269
Diffstat:
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js
@@ -1989,7 +1989,7 @@ CSL.DateParser = function () {
};
CSL.Engine = function (sys, style, lang, forceLang) {
var attrs, langspec, localexml, locale;
- this.processor_version = "1.0.268";
+ this.processor_version = "1.0.269";
this.csl_version = "1.0";
this.sys = sys;
this.sys.xml = new CSL.System.Xml.Parsing();
@@ -6605,25 +6605,27 @@ CSL.evaluateLabel = function (node, state, Item, item) {
} else {
myterm = node.strings.term;
}
- var plural = 0;
- if ("locator" === node.strings.term) {
- if (item && item.locator) {
- if (state.opt.development_extensions.locator_parsing_for_plurals) {
- if (!state.tmp.shadow_numbers.locator) {
- state.processNumber(false, item, "locator");
+ var plural = node.strings.plural;
+ if ("number" !== typeof plural) {
+ if ("locator" === node.strings.term) {
+ if (item && item.locator) {
+ if (state.opt.development_extensions.locator_parsing_for_plurals) {
+ if (!state.tmp.shadow_numbers.locator) {
+ state.processNumber(false, item, "locator");
+ }
+ plural = state.tmp.shadow_numbers.locator.plural;
+ } else {
+ plural = CSL.evaluateStringPluralism(item.locator);
}
- plural = state.tmp.shadow_numbers.locator.plural;
- } else {
- plural = CSL.evaluateStringPluralism(item.locator);
}
+ } else if (["page", "page-first"].indexOf(node.variables[0]) > -1) {
+ plural = CSL.evaluateStringPluralism(Item[myterm]);
+ } else {
+ if (!state.tmp.shadow_numbers[myterm]) {
+ state.processNumber(false, Item, myterm);
+ }
+ plural = state.tmp.shadow_numbers[myterm].plural;
}
- } else if (["page", "page-first"].indexOf(node.variables[0]) > -1) {
- plural = CSL.evaluateStringPluralism(Item[myterm]);
- } else {
- if (!state.tmp.shadow_numbers[myterm]) {
- state.processNumber(false, Item, myterm);
- }
- plural = state.tmp.shadow_numbers[myterm].plural;
}
return CSL.castLabel(state, node, myterm, plural);
};